Are you tired of pushing commits to test your Gitlab CI?
Then this is the tool for you.
It lets you simulate a CI pipeline on your local machine.
Download and put binary in /usr/local/bin
$ sudo su # must be installed as root, if placed in /usr/local/bin/
$ curl -L https://github.com/firecow/gitlab-ci-local/releases/latest/download/linux.gz | gunzip -c > /usr/local/bin/gitlab-ci-local
$ chmod +x /usr/local/bin/gitlab-ci-local
$ exit
Install gitbash
Download and put binary in C:\Program Files\Git\mingw64\bin
$ curl -L https://github.com/firecow/gitlab-ci-local/releases/latest/download/win.gz | gunzip -c > /c/Program\ Files/Git/mingw64/bin/gitlab-ci-local.exe
Download and put binary in /usr/local/bin
$ sudo su # must be installed as root, if placed in /usr/local/bin/
$ curl -L https://github.com/firecow/gitlab-ci-local/releases/latest/download/macOS.gz | gunzip -c > /usr/local/bin/gitlab-ci-local
$ chmod +x /usr/local/bin/gitlab-ci-local
$ exit
$ cd /home/user/workspace/myproject
$ gitlab-ci-local
$ echo "alias gcl='gitlab-ci-local'" >> ~/.bashrc
Add this to ~/.bashrc
_yargs_completions()
{
local cur_word args type_list
cur_word="${COMP_WORDS[COMP_CWORD]}"
args=("${COMP_WORDS[@]}")
# ask yargs to generate completions.
type_list=$(/usr/local/bin/gitlab-ci-local --get-yargs-completions "${args[@]}")
COMPREPLY=( $(compgen -W "${type_list}" -- ${cur_word}) )
# if no match was found, fall back to filename completion
if [ ${#COMPREPLY[@]} -eq 0 ]; then
COMPREPLY=()
fi
return 0
}
complete -o default -F _yargs_completions gitlab-ci-local
Artifacts works right now, as along as you don't overwrite tracked files.
$ npm install
$ npm run build
$ node -r source-map-support/register dist/index.js --cwd /home/user/workspace/project-folder/
$ npm run pkg-linux
$ npm run pkg-win
$ npm run pkg-macos
$ npm run pkg-all
- rules
- environment
- when:always
- when:on_failure
- when:delayed
- start_in (Used only with when:delayed)
- include:template
- include:remote
- coverage (code coverage)
- retry (in case of failure)
- timeout (job max execution time)
- services
- image
- cache
- pages
- resource_group
- interruptible
- artifacts (reset/restore/uploads "files" from job to job)
- dependencies (depend or non-depend on artifacts, default is depend ALL)
- only
- except
- parallel
- trigger