homepage/.gitlab-ci.yml

32 lines
994 B
YAML

image: docker:stable
stages:
- build
- deploy
build:
stage: build
tags:
- hottis
- linux
- docker
script:
- VERSION=`cat VERSION`
- echo "Version is $VERSION"
- docker build --tag registry.gitlab.com/wolutator/homepage:latest --tag registry.gitlab.com/wolutator/homepage:$VERSION .
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker push registry.gitlab.com/wolutator/homepage:latest
- docker push registry.gitlab.com/wolutator/homepage:$VERSION
deploy:
stage: deploy
tags:
- hottis
- linux
- docker
script:
- VERSION=`cat VERSION`
- echo "Version is $VERSION"
- docker pull registry.gitlab.com/wolutator/homepage:latest
- docker restart homepage