Added automatic pipeline trigger build via variable

This commit is contained in:
Deon George 2018-09-03 10:04:02 +10:00
parent 28e2b415ba
commit 18bfc8afd5
2 changed files with 3 additions and 0 deletions

View File

@ -13,6 +13,7 @@ services:
- docker:dind - docker:dind
before_script: before_script:
- apk add curl
- docker info - docker info
- docker version - docker version
- echo "$CI_JOB_TOKEN" | docker login -u "$CI_REGISTRY_USER" "$CI_REGISTRY" --password-stdin - echo "$CI_JOB_TOKEN" | docker login -u "$CI_REGISTRY_USER" "$CI_REGISTRY" --password-stdin
@ -37,6 +38,7 @@ build:
- docker build --cache-from ${CI_REGISTRY_IMAGE}:${CACHETAG} -t ${CI_REGISTRY_IMAGE}:${VERSION} -t ${CI_REGISTRY_IMAGE}:${CACHETAG} . - docker build --cache-from ${CI_REGISTRY_IMAGE}:${CACHETAG} -t ${CI_REGISTRY_IMAGE}:${VERSION} -t ${CI_REGISTRY_IMAGE}:${CACHETAG} .
- docker push ${CI_REGISTRY_IMAGE}:${VERSION} - docker push ${CI_REGISTRY_IMAGE}:${VERSION}
- docker push ${CI_REGISTRY_IMAGE}:${CACHETAG} - docker push ${CI_REGISTRY_IMAGE}:${CACHETAG}
- [ -n "${TRIGGER_PIPELINE}" ] && curl -X POST -F token=${TRIGGER_PIPELINE} -F ref=x86_64-extras http://dev.leenooks.net/api/v4/projects/45/trigger/pipeline
tags: tags:
- docker - docker
only: only:

View File

@ -5,6 +5,7 @@ FROM debian:stretch-slim
MAINTAINER Deon George <deon@leenooks.net> MAINTAINER Deon George <deon@leenooks.net>
# Pre-requisites
# + Base application requires unzip zip curl libhunspell-dev libpython2.7 # + Base application requires unzip zip curl libhunspell-dev libpython2.7
RUN apt-get update \ RUN apt-get update \
&& apt-get install -yqq unzip zip curl libhunspell-dev libpython2.7 \ && apt-get install -yqq unzip zip curl libhunspell-dev libpython2.7 \