diff --git a/gitlab-runner-17.5.yaml b/gitlab-runner-17.5.yaml new file mode 100644 index 00000000000..53c5aaacd1d --- /dev/null +++ b/gitlab-runner-17.5.yaml @@ -0,0 +1,133 @@ +# This tracks and the expected commit and tag used by Docker Machine. +# This varies for each version of GitLab's runner and requires manual +# intervention between updates. +# +# Please ensure the expected commit and tag match the version of Docker +# Machine defined here: +# - https://gitlab.com/gitlab-org/gitlab-runner/-/blob/v/.gitlab/ci/_common.gitlab-ci.yml +# If you need to get the associated Git SHA for the new tag: +# - https://gitlab.com/gitlab-org/ci-cd/docker-machine/-/tags +vars: + machine-commit: 4976538e17385c8e4681641c8ac9c27a1963c860 + machine-tag: 0.16.2-gitlab.29 + +var-transforms: + - from: ${{package.version}} + match: ^(\d+\.\d+)\.\d+$ + replace: "$1" + to: major-minor-version + +package: + name: gitlab-runner-17.5 + # ---Additional updates required--- Review 'vars' section (above), when reviewing version bumps. + version: "17.5.2" + epoch: 0 + description: GitLab Runner is the open source project that is used to run your CI/CD jobs and send the results back to GitLab + copyright: + - license: MIT + dependencies: + provides: + - gitlab-runner=${{package.full-version}} + +pipeline: + - uses: git-checkout + with: + repository: https://gitlab.com/gitlab-org/gitlab-runner + tag: v${{package.version}} + expected-commit: c6eae8d7b606df43f78e5c1508a932d007da4c3b + + - uses: go/build + with: + packages: . + output: gitlab-runner + ldflags: -w -X gitlab.com/gitlab-org/gitlab-runner/common.NAME=${{package.name}} -X gitlab.com/gitlab-org/gitlab-runner/common.VERSION=v${{package.version}} + +subpackages: + - name: gitlab-runner-helper-${{vars.major-minor-version}} + description: GitLab Runner Helper + dependencies: + provides: + - gitlab-runner-helper=${{package.full-version}} + pipeline: + - uses: go/build + with: + packages: ./apps/gitlab-runner-helper + output: gitlab-runner-helper + ldflags: -w -X gitlab.com/gitlab-org/gitlab-runner/common.NAME=${{package.name}} -X gitlab.com/gitlab-org/gitlab-runner/common.VERSION=v${{package.version}} + + - name: "gitlab-runner-oci-entrypoint-${{vars.major-minor-version}}" + description: "Gitlab-runner oci entrypoint" + dependencies: + provides: + - gitlab-runner-oci-entrypoint=${{package.full-version}} + pipeline: + - runs: | + mkdir -p "${{targets.subpkgdir}}" + cp dockerfiles/runner/alpine/entrypoint "${{targets.subpkgdir}}"/entrypoint + chmod 755 "${{targets.subpkgdir}}"/entrypoint + + - name: "gitlab-runner-helper-oci-entrypoint-${{vars.major-minor-version}}" + description: "Gitlab-runner-helper oci entrypoint" + dependencies: + provides: + - gitlab-runner-helper-oci-entrypoint=${{package.full-version}} + pipeline: + - runs: | + mkdir -p "${{targets.subpkgdir}}"/usr/bin + cp dockerfiles/runner-helper/scripts/gitlab-runner-build "${{targets.subpkgdir}}"/usr/bin/gitlab-runner-build + cp dockerfiles/runner-helper/helpers/entrypoint "${{targets.subpkgdir}}"/entrypoint + + - name: "gitlab-runner-helper-compat-${{vars.major-minor-version}}" + description: "Gitlab-runner-helper compat" + dependencies: + provides: + - gitlab-runner-helper-compat=${{package.full-version}} + pipeline: + - runs: | + mkdir -p "${{targets.subpkgdir}}"/usr/bin + ln -sf /usr/bin/gitlab-runner "${{targets.subpkgdir}}"/usr/bin/gitlab-ci-multi-runner + ln -sf /usr/bin/miniperl "${{targets.subpkgdir}}"/usr/bin/perl + + - name: gitlab-docker-machine-${{vars.major-minor-version}} + description: "Creates Docker hosts used by GitLab runner." + dependencies: + provides: + - gitlab-docker-machine=${{package.full-version}} + pipeline: + - uses: git-checkout + with: + repository: https://gitlab.com/gitlab-org/ci-cd/docker-machine + tag: v${{vars.machine-tag}} + expected-commit: ${{vars.machine-commit}} + destination: ./machine + - uses: go/build + with: + packages: ./cmd/docker-machine + output: docker-machine + ldflags: -w -X github.com/docker/machine/version.GitCommit=$(git rev-parse --short HEAD 2>/dev/null) + modroot: ./machine + test: + pipeline: + - runs: | + docker-machine -v | grep ${{vars.machine-tag}} + docker-machine -h + +update: + enabled: true + # Requires manual steps when updating + manual: true + git: + strip-prefix: v + tag-filter-prefix: v17.5 + +test: + environment: + contents: + packages: + - gitlab-runner-helper-compat-${{vars.major-minor-version}} + - gitlab-runner-helper=${{package.full-version}} + pipeline: + - runs: | + gitlab-runner --help + gitlab-runner-helper --help + gitlab-runner --version