use common ci script

This commit is contained in:
Wolfgang Hottgenroth 2020-09-25 13:38:42 +02:00
parent e317867042
commit e3b8de920b
Signed by: wn
GPG Key ID: B586EAFCDF2F65F4

View File

@ -1,26 +1,6 @@
image: docker:stable
stages:
- build
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
include:
- project: dockerized/commons
ref: master
file: gitlab-ci-template.yml