diff --git a/gitlab-kas-18.2.yaml b/gitlab-kas-18.2.yaml index 80606b4555a..078a22ee2d4 100644 --- a/gitlab-kas-18.2.yaml +++ b/gitlab-kas-18.2.yaml @@ -1,7 +1,7 @@ package: name: gitlab-kas-18.2 - version: "18.2.3" - epoch: 0 # CVE-2025-47907 + version: "18.2.4" + epoch: 1 # CVE-2025-47907 description: GitLab KAS is a component installed together with GitLab. It is required to manage the GitLab agent for Kubernetes. copyright: - license: MIT @@ -14,22 +14,25 @@ var-transforms: match: ^(\d+\.\d+)\.\d+$ replace: "$1" to: major-minor-version + - from: ${{package.version}} + match: ^(\d+)\.\d+\.\d+$ + replace: "$1" + to: major-version pipeline: - uses: git-checkout with: repository: https://gitlab.com/gitlab-org/cluster-integration/gitlab-agent tag: v${{package.version}} - expected-commit: 1c82a19884b61c6d7158f9d78b14d31286ccc59d + expected-commit: aa1b6f9f80359df0a30cfca92646227ee5acdf2e - uses: go/build with: packages: ./cmd/kas output: kas ldflags: | - -w -X gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v17/cmd.Version=v${{package.version}} - -X gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v17/cmd.Commit=v${{package.version}} - -X gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v17/cmd.BuildTime=$(date -d@${SOURCE_DATE_EPOCH} +%F-%T) + -w -X gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v${{vars.major-version}}/internal/cmd.Version=v${{package.version}} + -X gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v${{vars.major-version}}/internal/cmd.GitRef=$(git rev-parse HEAD) subpackages: - name: gitlab-agent-${{vars.major-minor-version}} @@ -44,27 +47,89 @@ subpackages: output: agentk ldflags: | -w - -X gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v17/cmd.Version=v${{package.version}} - -X gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v17/cmd.Commit=v${{package.version}} - -X gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v17/cmd.BuildTime=$(date -d@${SOURCE_DATE_EPOCH} +%F-%T) + -X gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v${{vars.major-version}}/internal/cmd.Version=v${{package.version}} + -X gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v${{vars.major-version}}/internal/cmd.GitRef=$(git rev-parse HEAD) test: pipeline: - - runs: agentk --version - -update: - enabled: true - git: - strip-prefix: v - tag-filter-prefix: v18.2 + - name: "Test agentk version and help" + runs: | + set -euo pipefail + agentk --help | grep "kas-address" + agentk --version | grep "${{package.version}}" + agentk --help | grep "token-file" + agentk --help | grep "GitLab Agent for Kubernetes" test: environment: contents: packages: - - gitlab-kas-${{vars.major-minor-version}} - - gitlab-agent-${{vars.major-minor-version}} + - wait-for-it + - curl + - valkey + - valkey-cli pipeline: - - runs: | - kas --version - agentk --version - kas --help + - name: "Version and help tests for KAS and Agent" + runs: | + set -euo pipefail + kas --version | grep "${{package.version}}" + kas --help | grep "GitLab Kubernetes Agent Server" + - name: "Test KAS daemon with Valkey (Redis)" + uses: test/daemon-check-output + with: + setup: | + openssl rand -base64 32 > /tmp/auth_secret + openssl rand -base64 48 > /tmp/websocket_secret + + valkey-server --port 6379 --daemonize yes --pidfile /tmp/valkey.pid --logfile /tmp/valkey.log + + sleep 5 + + # Create KAS configuration with Redis + cat > /tmp/kas-config.yaml <