Skip to content

POC: Step/Gitlab Runner integration - Step Runner

Axel von Bertoldi requested to merge avonbertoldi/grpc-endpoint into main

A very POC of a GRPC step-runner service. This MR roughly implements the spec described in https://docs.gitlab.com/ee/architecture/blueprints/gitlab_steps/runner-integration.html. It is intended to be used (and works) with gitlab-runner!4555.

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 gitlab-runner!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 gitlab-runner!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