dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit bdaeb28a57fef20700577f73bacbfa6e389b9584
parent d492aa2d3c57310f104f8802c842347bcd589bc9
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Tue,  4 Dec 2018 09:30:18 +0100

Add script to run one or more gitlab-ci jobs locally

Diffstat:
Alinks/bin/gitlab-ci | 25+++++++++++++++++++++++++
1 file changed, 25 insertions(+), 0 deletions(-)

diff --git a/links/bin/gitlab-ci b/links/bin/gitlab-ci @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +function help { + echo "Usage: ${0##*/} JOBNAME1 [JOBNAME2,...,[JOBNAME N]]" +} + +[ $# -lt 1 ] && (help && exit 1) +case "$1" in + -h) + help + exit 0 + ;; + --help) + help + exit 0 + ;; + *) + [ "$(uname)" = "Linux" ] && runnercmd="sudo docker" || runnercmd=docker + ;; +esac + + +for jobname in "$@"; do + eval "$runnercmd" exec docker "$jobname" +done