use common ci script

This commit is contained in:
2020-09-25 13:38:42 +02:00
parent e317867042
commit e3b8de920b

View File

@ -1,26 +1,6 @@
image: docker:stable include:
- project: dockerized/commons
stages: ref: master
- build file: gitlab-ci-template.yml
variables:
IMAGE_NAME: registry.hottis.de/dockerized/build-env-arduino
HUB_IMAGE_NAME: wollud1969/build-env-arduino
build:
stage: build
tags:
- hottis
- linux
- docker
script:
- VERSION=`cat VERSION`
- echo "Version is $VERSION"
- docker build --tag $HUB_IMAGE_NAME:latest --tag $HUB_IMAGE_NAME:$VERSION --tag $IMAGE_NAME:latest --tag $IMAGE_NAME:$VERSION .
- 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