From 953f92711c0ac5b9ef133da6fcdd6553d1b90f1e Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Sat, 16 Feb 2019 18:06:45 +0100 Subject: [PATCH] add build docker image in ci script --- .gitlab-ci.yml | 29 +++++++++++++++-------------- VERSION | 1 + 2 files changed, 16 insertions(+), 14 deletions(-) create mode 100644 VERSION diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b2c5415..c9e7d54 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,28 +1,29 @@ +image: docker:stable + stages: - - hello + - build + - deploy - -job1: - stage: hello +build: + stage: build tags: - hottis - linux - - debian - docker script: - - echo "Hallo" - - echo "Welt" - - whoami + - version=`cat VERSION` + - echo "Version is $VERSION" + - docker build --tag registry.gitlab.com/wolutator/homepage:latest --tag registry.gitlab.com/wolutator/homepage:$VERSION . + - docker push registry.gitlab.com/wolutator/homepage:latest + - docker push registry.gitlab.com/wolutator/homepage:$VERSION -job2: - stage: hello +deploy: + stage: deploy tags: - hottis - linux - - debian - docker script: - - echo "Hello" - - echo "World" - - whoami + - version=`cat VERSION` + - echo "Version is $VERSION" diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..3eefcb9 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +1.0.0