From 5607bf7522c584c9f1a828af2ab8715147d8810f Mon Sep 17 00:00:00 2001 From: "octo-sts[bot]" <157150467+octo-sts@users.noreply.github.com> Date: Fri, 20 Jun 2025 07:33:02 +0000 Subject: [PATCH 1/4] gitlab-runner-18.1: updated --- gitlab-runner-18.1.yaml | 174 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 174 insertions(+) create mode 100644 gitlab-runner-18.1.yaml diff --git a/gitlab-runner-18.1.yaml b/gitlab-runner-18.1.yaml new file mode 100644 index 00000000000..8409a42a85d --- /dev/null +++ b/gitlab-runner-18.1.yaml @@ -0,0 +1,174 @@ +vars: + # GitLab Base Images tags: https://gitlab.com/gitlab-org/ci-cd/runner-tools/base-images/-/tags + base-images-tag: 0.0.15 + base-images-commit: 2387d5988168d327b3ae2fc176d01648e815437e + # Docker Machine tags: https://gitlab.com/gitlab-org/ci-cd/docker-machine/-/tags + docker-machine-tag: v0.16.2-gitlab.35 + docker-machine-commit: cf3838a1fea6e12f8a167f7f76df1f939ef69662 + +var-transforms: + - from: ${{package.version}} + match: ^(\d+\.\d+)\.\d+$ + replace: "$1" + to: major-minor-version + +package: + name: gitlab-runner-18.1 + # ---Additional updates required--- Review 'vars' section (above), when reviewing version bumps. + version: "18.1.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: 4e717029caf97ec9d98fb87cfa7cee462ac0f81c + + - 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/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/bump + with: + deps: |- + golang.org/x/net@v0.38.0 + - 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/bump + with: + deps: |- + golang.org/x/net@v0.38.0 + golang.org/x/oauth2@v0.27.0 + 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_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: v18.1 + +test: + environment: + contents: + packages: + - gitlab-runner-helper=${{package.full-version}} + pipeline: + - runs: | + gitlab-runner --help + gitlab-runner-helper --help From d91d9542c3a225072d6d39f1fe7feb8147d18534 Mon Sep 17 00:00:00 2001 From: Debasish Biswas Date: Fri, 20 Jun 2025 21:05:02 +0530 Subject: [PATCH 2/4] Update the expected commit Signed-off-by: Debasish Biswas --- gitlab-runner-18.1.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitlab-runner-18.1.yaml b/gitlab-runner-18.1.yaml index 8409a42a85d..0f79ee072c6 100644 --- a/gitlab-runner-18.1.yaml +++ b/gitlab-runner-18.1.yaml @@ -29,7 +29,7 @@ pipeline: with: repository: https://gitlab.com/gitlab-org/gitlab-runner tag: v${{package.version}} - expected-commit: 4e717029caf97ec9d98fb87cfa7cee462ac0f81c + expected-commit: 0731d300775d6114bb4b5ffffc9f0f0af0005d37 - name: Verify base-images-tag matches the expected upstream value runs: | From 379681b0014e9d4a5137457ded7cf506a3ec641d Mon Sep 17 00:00:00 2001 From: Debasish Biswas Date: Fri, 20 Jun 2025 21:42:00 +0530 Subject: [PATCH 3/4] Update base-images, docker-machine tag and commit Signed-off-by: Debasish Biswas --- gitlab-runner-18.1.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gitlab-runner-18.1.yaml b/gitlab-runner-18.1.yaml index 0f79ee072c6..d387c8ea89d 100644 --- a/gitlab-runner-18.1.yaml +++ b/gitlab-runner-18.1.yaml @@ -1,10 +1,11 @@ vars: # GitLab Base Images tags: https://gitlab.com/gitlab-org/ci-cd/runner-tools/base-images/-/tags - base-images-tag: 0.0.15 - base-images-commit: 2387d5988168d327b3ae2fc176d01648e815437e + base-images-tag: 0.0.18 + base-images-commit: ebc214086a29dbdfefef35274037922f8707ad26 # Docker Machine tags: https://gitlab.com/gitlab-org/ci-cd/docker-machine/-/tags - docker-machine-tag: v0.16.2-gitlab.35 - docker-machine-commit: cf3838a1fea6e12f8a167f7f76df1f939ef69662 + docker-machine-tag: v0.16.2-gitlab.37 + docker-machine-commit: 04d824cdca5633239ec0df4a7b8bdc975ca7e6cf + var-transforms: - from: ${{package.version}} From e2bbfe0549fea65c8a16fd12943b578b5c8f53d7 Mon Sep 17 00:00:00 2001 From: Debasish Biswas Date: Fri, 20 Jun 2025 21:59:56 +0530 Subject: [PATCH 4/4] Get back the required go/bump and yam lint Signed-off-by: Debasish Biswas --- gitlab-runner-18.1.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/gitlab-runner-18.1.yaml b/gitlab-runner-18.1.yaml index d387c8ea89d..cd894e850d4 100644 --- a/gitlab-runner-18.1.yaml +++ b/gitlab-runner-18.1.yaml @@ -6,7 +6,6 @@ vars: docker-machine-tag: v0.16.2-gitlab.37 docker-machine-commit: 04d824cdca5633239ec0df4a7b8bdc975ca7e6cf - var-transforms: - from: ${{package.version}} match: ^(\d+\.\d+)\.\d+$ @@ -89,10 +88,6 @@ subpackages: provides: - gitlab-runner-helper=${{package.full-version}} pipeline: - - uses: go/bump - with: - deps: |- - golang.org/x/net@v0.38.0 - uses: go/build with: packages: ./apps/gitlab-runner-helper @@ -142,7 +137,6 @@ subpackages: - uses: go/bump with: deps: |- - golang.org/x/net@v0.38.0 golang.org/x/oauth2@v0.27.0 modroot: ./machine - uses: go/build