prepare for docker hub
This commit is contained in:
parent
e49ae83977
commit
7b2e975acd
@ -4,6 +4,7 @@ stages:
|
|||||||
|
|
||||||
variables:
|
variables:
|
||||||
IMAGE_NAME: registry.gitlab.com/wolutator/mosquitto-with-auth
|
IMAGE_NAME: registry.gitlab.com/wolutator/mosquitto-with-auth
|
||||||
|
HUB_IMAGE_NAME: wollud1969/mosquitto-with-auth
|
||||||
|
|
||||||
build:
|
build:
|
||||||
stage: build
|
stage: build
|
||||||
@ -54,8 +55,11 @@ dockerize:
|
|||||||
- build
|
- build
|
||||||
script:
|
script:
|
||||||
- VERSION=`cat generated-version.txt`
|
- VERSION=`cat generated-version.txt`
|
||||||
- docker build --tag $IMAGE_NAME:latest --tag $IMAGE_NAME:$VERSION .
|
- docker build --tag $IMAGE_NAME:latest --tag $IMAGE_NAME:$VERSION --tag $HUB_IMAGE_NAME:latest --tag $HUB_IMAGE_NAME:$VERSION .
|
||||||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
||||||
- docker push $IMAGE_NAME:latest
|
- docker push $IMAGE_NAME:latest
|
||||||
- docker push $IMAGE_NAME:$VERSION
|
- 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
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@ FROM debian:latest
|
|||||||
|
|
||||||
LABEL Maintainer="Wolfgang Hottgenroth <woho@hottis.de>"
|
LABEL Maintainer="Wolfgang Hottgenroth <woho@hottis.de>"
|
||||||
LABEL ImageName="registry.gitlab.com/wolutator/mosquitto-with-auth"
|
LABEL ImageName="registry.gitlab.com/wolutator/mosquitto-with-auth"
|
||||||
|
LABEL AlternativeImageName="wollud1969/mosquitto-with-auth"
|
||||||
|
|
||||||
ARG MOSQ_USER="mosquitto"
|
ARG MOSQ_USER="mosquitto"
|
||||||
ARG MOSQ_UID="1883"
|
ARG MOSQ_UID="1883"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user