Skip to content

POC: Step/Gitlab Runner integration - Gitlab Runner

Axel von Bertoldi requested to merge avonbertoldi/steps-integration-poc into main

A very POC of integrating step-runner into runner's docker executor. This MR roughly implements the runner side of the spec described in https://docs.gitlab.com/ee/architecture/blueprints/gitlab_steps/runner-integration.html for the docker executor only!!! It is intended to be used (and works) with step-runner!21.

Running the POC

  1. Check out this MRs branch
  2. Build the (updated) image here by running make image
  3. Check out the branch in !4555, and ensure the replace directive replace gitlab.com/gitlab-org/step-runner => ../steps/step-runner in go.mod makes sense.
  4. Create a job that uses the above image and executes some commands. I used the following job:

.gitlab-ci.yml

stages:
  - test

test:
  stage: test
  image: step-runner:latest
  script:
    - neofetch
    - ls -l
    - pwd
  artifacts:
    paths:
      - step-results.json
  1. Run runner: go run . run -c <path/to/your/docker/executor/runner/config>
  2. Trigger the job/pipeline.

Saving the step results as an artifact does not work (see !4555 (540c904b))

Examining the code

The Code is best consumed commit-at-a-time. Commits have relevant messages.

Edited by Axel von Bertoldi

Merge request reports