From 6bd6665f63926226793dc34e1f166a388e62d61a Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Mon, 30 May 2016 13:22:51 +0000 Subject: [PATCH] Add new file --- .gitlab-ci.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..82b4f25 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,35 @@ +image: docker:git +services: +- docker:dind + +stages: +- test +- release + +variables: + CONTAINER_TEST_IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:$CI_BUILD_REF_NAME + CONTAINER_RELEASE_IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:latest + +before_script: + - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com + +test: + stage: test + script: + - docker version + - docker build -t $CONTAINER_TEST_IMAGE . + only: + - master + tags: + - dockerbuild + +release: + stage: release + script: + - docker version + - docker build -t $CONTAINER_RELEASE_IMAGE . + - docker push $CONTAINER_RELEASE_IMAGE + only: + - master + tags: + - dockerbuild \ No newline at end of file