Gitlab CI Development Workflow Ideas

Hello,

I’m trying to implement Gitlab CI but I’m wondering if anyone has workflow suggestions/ideas to provide.

For example, as everything is driven by .gitlab-ci.yml, I’m wondering how people here develop/debug the yml without creating bazillions of commits during the development process. Is there a way to “locally” (i.e. on the runner it gitlab server) edit the yml and trigger the build for debugging purposes?

clone your project to server with runner, change to directory containing your .gitlab-ci.yml and run:

gitlab-runner exec <executor> <job>

where executor is shell, docker, virtualbox etc.
job defined in your CI config.
If you use predefined variables like CI_PROJECT_NAME, define them as arguments:

gitlab-runner exec <executor> <job> --env CI_PROJECT_NAME="gitlab-ce" --env CI_BUILD_STAGE="test"
1 Like

Thanks nivanko, that’s exactly the approach I was looking for!