From b017dd04856adde6735c1bb5a9e7a09dd982c46e Mon Sep 17 00:00:00 2001 From: "octo-sts[bot]" <157150467+octo-sts@users.noreply.github.com> Date: Fri, 21 Mar 2025 07:31:41 +0000 Subject: [PATCH 1/2] gitlab-runner-17.10: updated --- gitlab-runner-17.10.yaml | 185 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 185 insertions(+) create mode 100644 gitlab-runner-17.10.yaml diff --git a/gitlab-runner-17.10.yaml b/gitlab-runner-17.10.yaml new file mode 100644 index 00000000000..5384570e37d --- /dev/null +++ b/gitlab-runner-17.10.yaml @@ -0,0 +1,185 @@ +vars: + # GitLab Base Images tags: https://gitlab.com/gitlab-org/ci-cd/runner-tools/base-images/-/tags + base-images-tag: 0.0.6 + base-images-commit: 2a7893608b84e4088995b45ec067e2e18969bb68 + # Docker Machine tags: https://gitlab.com/gitlab-org/ci-cd/docker-machine/-/tags + docker-machine-tag: v0.16.2-gitlab.32 + docker-machine-commit: 9179b634a380c5d82ed0ebf170609f26df6701f3 + +var-transforms: + - from: ${{package.version}} + match: ^(\d+\.\d+)\.\d+$ + replace: "$1" + to: major-minor-version + +package: + name: gitlab-runner-17.10 + # ---Additional updates required--- Review 'vars' section (above), when reviewing version bumps. + version: "17.10.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: 14c5775c90a9b544dccd0070b35dd47f56bf164d + + - name: Verify base-images-tag matches the expected upstream value + runs: | + # Ensure the expected tag used of the base images align with upstream. + # Each GitLab Runner version depends on a specific base image version. + # We manually verify that `base-images-tag` matches the expected upstream value + # defined in the corresponding GitLab Runner configuration: + # https://gitlab.com/gitlab-org/gitlab-runner/-/blob/v${{package.version}}/.gitlab/ci/_common.gitlab-ci.yml + # (variable: RUNNER_IMAGES_VERSION) + + BASE_IMAGES_TAG=$(cat ./.gitlab/ci/_common.gitlab-ci.yml | sed -n 's/.*RUNNER_IMAGES_VERSION: "\([0-9.]*\)".*/\1/p') + + if [ "${{vars.base-images-tag}}" != "${BASE_IMAGES_TAG}" ]; then + echo "Expected BASE_IMAGES_TAG: ${{vars.base-images-tag}} but got: $BASE_IMAGES_TAG" + exit 1 + fi + + - uses: git-checkout + with: + repository: https://gitlab.com/gitlab-org/ci-cd/runner-tools/base-images + tag: v${{vars.base-images-tag}} + expected-commit: ${{vars.base-images-commit}} + destination: ./base-images + + - name: Verify docker-machine-tag matches the expected value + runs: | + # Ensure the expected tag used of the docker machine align with upstream base images. + # The version used by the upstream can be found in the following file: + # https://gitlab.com/gitlab-org/ci-cd/runner-tools/base-images/-/blob/v${{vars.base-images-tag}}/dockerfiles/runner/docker-bake.hcl + # (as: DOCKER_MACHINE_VERSION) + + DOCKER_MACHINE_VERSION=$(sed -n 's/.*DOCKER_MACHINE_VERSION *= *"\([^"]*\)".*/\1/p' ./base-images/dockerfiles/runner/docker-bake.hcl) + + if [ "${{vars.docker-machine-tag}}" != "${DOCKER_MACHINE_VERSION}" ]; then + echo "Expected DOCKER_MACHINE_VERSION: ${{vars.docker-machine-tag}} but got: $DOCKER_MACHINE_VERSION" + exit 1 + fi + + - uses: git-checkout + with: + repository: https://gitlab.com/gitlab-org/ci-cd/docker-machine + tag: ${{vars.docker-machine-tag}} + expected-commit: ${{vars.docker-machine-commit}} + destination: ./machine + + - uses: go/bump + with: + modroot: ./machine + deps: |- + golang.org/x/crypto@v0.35.0 + golang.org/x/net@v0.36.0 + + - uses: go/bump + with: + modroot: ./machine + deps: |- + golang.org/x/oauth2@v0.27.0 + golang.org/x/crypto@v0.35.0 + golang.org/x/net@v0.36.0 + + - uses: go/bump + with: + modroot: ./machine + deps: |- + golang.org/x/net@v0.36.0 + + - 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 ./base-images/dockerfiles/runner/alpine/entrypoint "${{targets.subpkgdir}}"/entrypoint + chmod 755 "${{targets.subpkgdir}}"/entrypoint + + # As of 17.8, the entrypoint is now sourced from yet another repository + - 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 ./base-images/dockerfiles/runner-helper/scripts/gitlab-runner-build "${{targets.subpkgdir}}"/usr/bin/gitlab-runner-build + cp ./base-images/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: 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_VERSION=$(echo ${{vars.docker-machine-tag}} | sed 's/^v//') + docker-machine -v | grep $DOCKER_MACHINE_VERSION + docker-machine -h + +update: + enabled: true + git: + strip-prefix: v + tag-filter-prefix: v17.10 + +test: + environment: + contents: + packages: + - gitlab-runner-helper=${{package.full-version}} + pipeline: + - runs: | + gitlab-runner --help + gitlab-runner-helper --help From 3160890494f78391fd68f3d8f0e7207d3f8ff5a4 Mon Sep 17 00:00:00 2001 From: Amber Arcadia Date: Fri, 21 Mar 2025 16:52:02 +0000 Subject: [PATCH 2/2] Updated commits and tags --- gitlab-runner-17.10.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gitlab-runner-17.10.yaml b/gitlab-runner-17.10.yaml index 5384570e37d..f485b690720 100644 --- a/gitlab-runner-17.10.yaml +++ b/gitlab-runner-17.10.yaml @@ -1,10 +1,10 @@ vars: # GitLab Base Images tags: https://gitlab.com/gitlab-org/ci-cd/runner-tools/base-images/-/tags - base-images-tag: 0.0.6 - base-images-commit: 2a7893608b84e4088995b45ec067e2e18969bb68 + base-images-tag: 0.0.11 + base-images-commit: 5753ece1553960dec3811db0f0ea71c3c2fcd41c # Docker Machine tags: https://gitlab.com/gitlab-org/ci-cd/docker-machine/-/tags - docker-machine-tag: v0.16.2-gitlab.32 - docker-machine-commit: 9179b634a380c5d82ed0ebf170609f26df6701f3 + docker-machine-tag: v0.16.2-gitlab.33 + docker-machine-commit: 877cb3a61a4e1666249256646b6408046581744a var-transforms: - from: ${{package.version}} @@ -29,7 +29,7 @@ pipeline: with: repository: https://gitlab.com/gitlab-org/gitlab-runner tag: v${{package.version}} - expected-commit: 14c5775c90a9b544dccd0070b35dd47f56bf164d + expected-commit: 67b2b2db6df6b66fedab519d09f5b2706f654f6b - name: Verify base-images-tag matches the expected upstream value runs: |