Skip to content

Instantly share code, notes, and snippets.

@chewbakartik
Last active September 16, 2015 16:47
Show Gist options
  • Save chewbakartik/8911116 to your computer and use it in GitHub Desktop.
Save chewbakartik/8911116 to your computer and use it in GitHub Desktop.
Gitlab-CI - Build script per branch
# This is the script that is edited in the UI for Gitlab-CI
#
# $CI_BUILD_REF_NAME is provided by Gitlab-CI, it contains the branch the runner is working in.
branch=$CI_BUILD_REF_NAME
if [ $branch = "branch1" ]; then
bash deploy/branch1.sh
fi
if [ $branch = "branch2" ]; then
bash deploy/branch2.sh
fi
# etc...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment