From e7dbc1b7438ef15d8cf0815d19ba876d0b328389 Mon Sep 17 00:00:00 2001 From: "octo-sts[bot]" <157150467+octo-sts[bot]@users.noreply.github.com> Date: Tue, 10 Dec 2024 06:54:10 -0700 Subject: [PATCH] Adding VersionStream for gitlab-runner-17.6 (#35289) Co-authored-by: octo-sts[bot] <157150467+octo-sts@users.noreply.github.com> Co-authored-by: hbh7 --- gitlab-runner-17.6.yaml | 137 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 gitlab-runner-17.6.yaml diff --git a/gitlab-runner-17.6.yaml b/gitlab-runner-17.6.yaml new file mode 100644 index 00000000000..136aa9bc0c1 --- /dev/null +++ b/gitlab-runner-17.6.yaml @@ -0,0 +1,137 @@ +# 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.6 + # ---Additional updates required--- Review 'vars' section (above), when reviewing version bumps. + version: 17.6.0 + 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: 374d34fda25904c34e29770b2027cef3c2cebc21 + + - 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/bump + with: + deps: github.com/golang-jwt/jwt/v4@v4.5.1 + modroot: ./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.6 + +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