use common build and publish approach
This commit is contained in:
parent
53f4671832
commit
6f03f05ac4
@ -1,25 +1,4 @@
|
||||
stages:
|
||||
- dockerize
|
||||
|
||||
variables:
|
||||
IMAGE_NAME: registry.hottis.de/dockerized/httpdispatcher
|
||||
HUB_IMAGE_NAME: wollud1969/httpdispatcher
|
||||
|
||||
|
||||
dockerize:
|
||||
stage: dockerize
|
||||
image: wollud1969/docker-bash:0.3
|
||||
tags:
|
||||
- linux
|
||||
- docker
|
||||
script:
|
||||
- VERSION="$(cat VERSION).$(git rev-list --all --count).$CI_COMMIT_REF_NAME"
|
||||
- cat httpd-vhosts.conf-template | sed -e 's/%AuthLDAPBindDN%/'"${AuthLDAPBindDN/\\/\\\\}"'/' -e 's/%AuthLDAPBindPassword%/'"${AuthLDAPBindPassword//&/\\&}"'/' -e 's@%AuthLDAPURL%@'"$AuthLDAPURL"'@' > httpd-vhosts.conf
|
||||
- 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 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
|
||||
|
@ -26,7 +26,7 @@ RUN \
|
||||
mkdir conf/editable/ssl/private && \
|
||||
mkdir conf/editable/ssl/certs
|
||||
|
||||
COPY httpd-vhosts.conf conf/editable/
|
||||
COPY httpd-vhosts.conf-template conf/editable/
|
||||
|
||||
VOLUME /usr/local/apache2/conf/editable
|
||||
VOLUME /usr/local/apache2/logs
|
||||
|
Loading…
x
Reference in New Issue
Block a user