summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorBalasankar C <balasankar@gitlab.com>2017-05-05 08:41:16 +0000
committerMarin Jankovski <marin@gitlab.com>2017-05-05 08:41:16 +0000
commitb667fba826e02bec2c94ee4922edf348b84f8075 (patch)
tree609358fd50d29ef8d1ba6d538b9fc02d81c6a32c /.gitlab-ci.yml
parentccb783ea0ad1bfeed38422c7e6366f25fbebebff (diff)
downloadgitlab-ce-b667fba826e02bec2c94ee4922edf348b84f8075.tar.gz
Add a manual job to trigger package build in omnibus
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml23
1 files changed, 23 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 44620d390ad..588f255eff8 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -23,6 +23,7 @@ before_script:
- source scripts/prepare_build.sh
stages:
+- build
- prepare
- test
- post-test
@@ -137,6 +138,28 @@ stages:
<<: *only-master-and-ee-or-mysql
<<: *except-docs
+# Trigger a package build on omnibus-gitlab repository
+
+build-package:
+ services: []
+ variables:
+ SETUP_DB: "false"
+ USE_BUNDLE_INSTALL: "false"
+ stage: build
+ when: manual
+ script:
+ # If no branch in omnibus is specified, trigger pipeline against master
+ - if [ -z "$OMNIBUS_BRANCH" ] ; then export OMNIBUS_BRANCH=master ;fi
+ - echo "token=${BUILD_TRIGGER_TOKEN}" > version_details
+ - echo "ref=${OMNIBUS_BRANCH}" >> version_details
+ - echo "variables[ALTERNATIVE_SOURCES]=true" >> version_details
+ - echo "variables[GITLAB_VERSION]=${CI_COMMIT_SHA}" >> version_details
+ # Collect version details of all components
+ - for f in *_VERSION; do echo "variables[$f]=$(cat $f)" >> version_details; done
+ # Trigger the API and pass values collected above as parameters to it
+ - cat version_details | tr '\n' '&' | curl -X POST https://gitlab.com/api/v4/projects/20699/trigger/pipeline --data-binary @-
+ - rm version_details
+
# Prepare and merge knapsack tests
knapsack:
<<: *knapsack-state