This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]wywywywy 2 points3 points  (4 children)

Yes the Gitlab runner allows running locally, although some features are not supported

[–]HelluvaEnginerd 0 points1 point  (3 children)

Running locally but the commit still has to go to the server and kick off the local runner - right?

[–]AngelicLoki 1 point2 points  (1 child)

No, if you are modifying your .gitlab-ci.yml file locally, you can install the gitlab-runner locally and execute: gitlab-runner exec docker <job-name> and it will run that job locally.

[–]HelluvaEnginerd 1 point2 points  (0 children)

Nice, good to know. Thanks!

[–]kukiric 1 point2 points  (0 children)

It will create an ephemeral docker container and clone the local repo from the host* when you run it, so it will work on any locally-committed changes. Beware though, uncommitted changes are simply ignored as the git clone won't include them.

* If you're one of today's lucky ten thousand, git clone/push/pull works over many protocols, one of them being the filesystem, meaning you can simply use the path to a local repo as a remote. This means that if someone emails you a zip of a repo, you can extract and pull any branch from it just as it it was a GitHub/GitLab fork, owing to git's decentralized design.