From 18bfc8afd5482cbc6f0a3def954fa56f6e2700c7 Mon Sep 17 00:00:00 2001 From: Deon George Date: Mon, 3 Sep 2018 10:04:02 +1000 Subject: [PATCH] Added automatic pipeline trigger build via variable --- .gitlab-ci.yml | 2 ++ Dockerfile | 1 + 2 files changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 93c9040..2722910 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,6 +13,7 @@ services: - docker:dind before_script: +- apk add curl - docker info - docker version - 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 push ${CI_REGISTRY_IMAGE}:${VERSION} - 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: - docker only: diff --git a/Dockerfile b/Dockerfile index dbad30c..4f939ee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,7 @@ FROM debian:stretch-slim MAINTAINER Deon George +# Pre-requisites # + Base application requires unzip zip curl libhunspell-dev libpython2.7 RUN apt-get update \ && apt-get install -yqq unzip zip curl libhunspell-dev libpython2.7 \