Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding VersionStream for gitlab-runner-17.6 #35289

Merged
merged 4 commits into from
Dec 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
137 changes: 137 additions & 0 deletions gitlab-runner-17.6.yaml
Original file line number Diff line number Diff line change
@@ -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 VERSION>/.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/[email protected]
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
Loading