use common build and publish approach

This commit is contained in:
2020-09-26 12:05:06 +02:00
parent a4b54d7312
commit c8b79ac369
2 changed files with 4 additions and 26 deletions

View File

@ -1,25 +1,4 @@
image: wollud1969/docker-bash:latest
stages:
- build
variables:
IMAGE_NAME: registry.hottis.de/dockerized/base-build-env
HUB_IMAGE_NAME: wollud1969/base-build-env
build:
stage: build
tags:
- hottis
- linux
- docker
script:
- VERSION=`cat VERSION`
- docker build --tag $IMAGE_NAME:latest --tag $IMAGE_NAME:$VERSION --tag $HUB_IMAGE_NAME:$VERSION --tag $HUB_IMAGE_NAME:latest .
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker push $IMAGE_NAME:latest
- docker push $IMAGE_NAME:$VERSION
- docker login -u $DOCKER_HUB_LOGIN -p $DOCKER_HUB_PASSWORD
- docker push $HUB_IMAGE_NAME:latest
- docker push $HUB_IMAGE_NAME:$VERSION
include:
- project: dockerized/commons
ref: master
file: gitlab-ci-template.yml

View File

@ -12,6 +12,5 @@ Contains additionally:
* wget and curl
* zip, unzip and 7z
* vim.tiny
* texlive
* GitLab release tool: https://home.hottis.de/gitlab/wolutator/gitlabreleaseuploader including validator for semantic version according to https://semver.org/