Bump github.com/redis/go-redis/v9 from 9.6.1 to 9.6.3 in the go_modules group #2105
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request_target: | |
types: | |
- labeled | |
- opened | |
- synchronize | |
- reopened | |
branches: | |
- main | |
- release-* | |
paths-ignore: | |
- 'config/**' | |
- '**.md' | |
push: | |
tags: | |
- '*' | |
env: | |
GO_VERSION: '1.23' | |
jobs: | |
authorize: | |
if: ${{ contains( github.event.pull_request.labels.*.name, 'test e2e') }} | |
environment: | |
${{ (github.event_name == 'pull_request_target' && | |
github.event.pull_request.head.repo.full_name != github.repository) && | |
'external' || 'internal' }} | |
runs-on: ubuntu-latest | |
env: | |
GH_TOKEN: ${{ github.token }} | |
outputs: | |
config: ${{ steps.get_config.outputs.config }} | |
public_repo: ${{ steps.get_config.outputs.public_repo }} | |
steps: | |
- name: Get Testing Configuration | |
id: get_config | |
run: | | |
config=$(gh api "/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/approvals" --jq '.[0] | .comment') | |
if [ -z "$config" ]; then | |
exit 0 | |
fi | |
echo "Provided testing configuration:" | |
echo "$config" | |
if ! echo "$config" | yq e > /dev/null; then | |
echo "Invalid testing configuration provided" | |
exit 1 | |
fi | |
echo "config=$(echo -n "$config" | base64)" >> $GITHUB_OUTPUT | |
if echo "$config" | yq e '... comments=""' | grep -q "hosted"; then | |
echo "Hosted cluster deployment was triggered. Using public repository" | |
echo "public_repo=true" >> $GITHUB_OUTPUT | |
fi | |
build: | |
concurrency: | |
group: build-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
name: Build and Unit Test | |
runs-on: ubuntu-latest | |
env: | |
PUBLIC_REPO: ${{ contains(needs.authorize.result, 'success') && needs.authorize.outputs.public_repo == 'true' }} | |
outputs: | |
version: ${{ steps.vars.outputs.version }} | |
clusterprefix: ${{ steps.vars.outputs.clusterprefix }} | |
pr: ${{ steps.pr.outputs.result }} | |
permissions: | |
packages: write | |
steps: | |
- name: Set public registry repo env variable | |
if: ${{ env.PUBLIC_REPO == 'true' }} | |
run: | | |
echo "REGISTRY_REPO=oci://ghcr.io/k0rdent/kcm/charts-ci" >> $GITHUB_ENV | |
- name: Get PR ref | |
uses: actions/github-script@v7 | |
id: pr | |
with: | |
script: | | |
const { data: pullRequest } = await github.rest.pulls.get({ | |
...context.repo, | |
pull_number: context.payload.pull_request.number, | |
}); | |
return pullRequest | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{fromJSON(steps.pr.outputs.result).merge_commit_sha}} | |
fetch-depth: 0 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
cache: false | |
- name: Lint | |
run: GOLANGCI_LINT_TIMEOUT=10m make lint | |
- name: Verify all generated pieces are up-to-date | |
run: make generate-all && git add -N . && git diff --exit-code | |
- name: Unit tests | |
run: | | |
make test | |
- name: Set up Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to GHCR | |
uses: docker/login-action@v3.4.0 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Get outputs | |
id: vars | |
run: | | |
GIT_VERSION=$(git describe --tags --always) | |
echo "version=${GIT_VERSION:1}" >> $GITHUB_OUTPUT | |
echo "clusterprefix=ci-$(date +%s | cut -b6-10)" >> $GITHUB_OUTPUT | |
- name: Build and push KCM controller image to the public repository | |
uses: docker/build-push-action@v6 | |
if: ${{ env.PUBLIC_REPO == 'true' }} | |
with: | |
build-args: | | |
LD_FLAGS=-s -w -X github.com/K0rdent/kcm/internal/build.Version=${{ steps.vars.outputs.version }} | |
context: . | |
platforms: linux/amd64 | |
tags: | | |
ghcr.io/k0rdent/kcm/controller-ci:${{ steps.vars.outputs.version }} | |
push: true | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- name: Prepare and push KCM template charts to the public repository | |
if: ${{ env.PUBLIC_REPO == 'true' }} | |
run: | | |
make kcm-chart-release | |
make helm-push | |
controller-e2etest: | |
name: E2E Controller | |
runs-on: ubuntu-latest | |
env: | |
PUBLIC_REPO: ${{ contains(needs.authorize.result, 'success') && needs.authorize.outputs.public_repo == 'true' }} | |
if: ${{ !contains( github.event.pull_request.labels.*.name, 'test e2e') }} | |
needs: build | |
concurrency: | |
group: controller-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
outputs: | |
clusterprefix: ${{ needs.build.outputs.clusterprefix }} | |
version: ${{ needs.build.outputs.version }} | |
pr: ${{ needs.build.outputs.pr }} | |
steps: | |
- name: Set public registry env variables | |
if: ${{ env.PUBLIC_REPO == 'true' }} | |
run: | | |
echo "REGISTRY_REPO=oci://ghcr.io/k0rdent/kcm/charts-ci" >> $GITHUB_ENV | |
echo "IMG=ghcr.io/k0rdent/kcm/controller-ci:${{ needs.build.outputs.version }}" >> $GITHUB_ENV | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: ${{fromJSON(needs.build.outputs.pr).merge_commit_sha}} | |
- name: Setup kubectl | |
uses: azure/setup-kubectl@v4 | |
- name: Run E2E tests | |
env: | |
GINKGO_LABEL_FILTER: 'controller' | |
CLUSTER_DEPLOYMENT_PREFIX: ${{ needs.build.outputs.clusterprefix }} | |
VERSION: ${{ needs.build.outputs.version }} | |
run: | | |
make test-e2e | |
- name: Archive test results | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: support-bundles | |
path: | | |
*.tar.gz | |
provider-cloud-e2etest: | |
name: E2E Cloud Providers | |
runs-on: ubuntu-latest | |
if: ${{ contains( github.event.pull_request.labels.*.name, 'test e2e') }} | |
needs: | |
- authorize | |
- build | |
concurrency: | |
group: cloud-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
outputs: | |
clusterprefix: ${{ needs.build.outputs.clusterprefix }} | |
version: ${{ needs.build.outputs.version }} | |
pr: ${{ needs.build.outputs.pr }} | |
env: | |
AWS_REGION: us-west-2 | |
AWS_ACCESS_KEY_ID: ${{ secrets.CI_AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.CI_AWS_SECRET_ACCESS_KEY }} | |
AZURE_REGION: westus2 | |
AZURE_SUBSCRIPTION_ID: ${{ secrets.CI_AZURE_SUBSCRIPTION_ID }} | |
AZURE_TENANT_ID: ${{ secrets.CI_AZURE_TENANT_ID }} | |
AZURE_CLIENT_ID: ${{ secrets.CI_AZURE_CLIENT_ID }} | |
AZURE_CLIENT_SECRET: ${{ secrets.CI_AZURE_CLIENT_SECRET }} | |
PUBLIC_REPO: ${{ needs.authorize.outputs.public_repo == 'true' }} | |
steps: | |
- name: Set public registry env variables | |
if: ${{ env.PUBLIC_REPO == 'true' }} | |
run: | | |
echo "REGISTRY_REPO=oci://ghcr.io/k0rdent/kcm/charts-ci" >> $GITHUB_ENV | |
echo "IMG=ghcr.io/k0rdent/kcm/controller-ci:${{ needs.build.outputs.version }}" >> $GITHUB_ENV | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: ${{fromJSON(needs.build.outputs.pr).merge_commit_sha}} | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Setup kubectl | |
uses: azure/setup-kubectl@v4 | |
- name: Load testing configuration | |
if: ${{ needs.authorize.outputs.config != '' }} | |
run: | | |
echo -n "${{ needs.authorize.outputs.config }}" | base64 -d > test/e2e/config/config.yaml | |
echo "Testing configuration was overwritten:" | |
cat test/e2e/config/config.yaml | |
- name: Run E2E tests | |
env: | |
GINKGO_LABEL_FILTER: 'provider:cloud' | |
CLUSTER_DEPLOYMENT_PREFIX: ${{ needs.build.outputs.clusterprefix }} | |
VERSION: ${{ needs.build.outputs.version }} | |
run: | | |
make test-e2e | |
- name: Archive test results | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: support-bundles | |
path: | | |
*.tar.gz | |
provider-onprem-e2etest: | |
name: E2E On-Prem Providers | |
runs-on: self-hosted | |
if: ${{ contains( github.event.pull_request.labels.*.name, 'test e2e') }} | |
needs: | |
- authorize | |
- build | |
concurrency: | |
group: onprem-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
outputs: | |
clusterprefix: ${{ needs.build.outputs.clusterprefix }} | |
version: ${{ needs.build.outputs.version }} | |
pr: ${{ needs.build.outputs.pr }} | |
env: | |
VSPHERE_USER: ${{ secrets.CI_VSPHERE_USER }} | |
VSPHERE_PASSWORD: ${{ secrets.CI_VSPHERE_PASSWORD }} | |
VSPHERE_SERVER: ${{ secrets.CI_VSPHERE_SERVER }} | |
VSPHERE_THUMBPRINT: ${{ secrets.CI_VSPHERE_THUMBPRINT }} | |
VSPHERE_DATACENTER: ${{ secrets.CI_VSPHERE_DATACENTER }} | |
VSPHERE_DATASTORE: ${{ secrets.CI_VSPHERE_DATASTORE }} | |
VSPHERE_RESOURCEPOOL: ${{ secrets.CI_VSPHERE_RESOURCEPOOL }} | |
VSPHERE_FOLDER: ${{ secrets.CI_VSPHERE_FOLDER }} | |
VSPHERE_CONTROL_PLANE_ENDPOINT: ${{ secrets.CI_VSPHERE_CONTROL_PLANE_ENDPOINT }} | |
VSPHERE_VM_TEMPLATE: ${{ secrets.CI_VSPHERE_VM_TEMPLATE }} | |
VSPHERE_NETWORK: ${{ secrets.CI_VSPHERE_NETWORK }} | |
VSPHERE_SSH_KEY: ${{ secrets.CI_VSPHERE_SSH_KEY }} | |
PUBLIC_REPO: ${{ needs.authorize.outputs.public_repo == 'true' }} | |
steps: | |
- name: Set public registry env variables | |
if: ${{ env.PUBLIC_REPO == 'true' }} | |
run: | | |
echo "REGISTRY_REPO=oci://ghcr.io/k0rdent/kcm/charts-ci" >> $GITHUB_ENV | |
echo "IMG=ghcr.io/k0rdent/kcm/controller-ci:${{ needs.build.outputs.version }}" >> $GITHUB_ENV | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: ${{fromJSON(needs.build.outputs.pr).merge_commit_sha}} | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Setup kubectl | |
uses: azure/setup-kubectl@v4 | |
- name: Load testing configuration | |
if: ${{ needs.authorize.outputs.config != '' }} | |
run: | | |
echo -n "${{ needs.authorize.outputs.config }}" | base64 -d > test/e2e/config/config.yaml | |
echo "Testing configuration was overwritten:" | |
cat test/e2e/config/config.yaml | |
- name: Run E2E tests | |
env: | |
GINKGO_LABEL_FILTER: 'provider:onprem' | |
CLUSTER_DEPLOYMENT_PREFIX: ${{ needs.build.outputs.clusterprefix }} | |
VERSION: ${{ needs.build.outputs.version }} | |
run: | | |
make test-e2e | |
- name: Archive test results | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: support-bundles | |
path: | | |
*.tar.gz | |
cleanup: | |
name: Cleanup | |
needs: | |
- build | |
- provider-cloud-e2etest | |
- authorize | |
runs-on: ubuntu-latest | |
if: ${{ always() && !contains(needs.provider-cloud-e2etest.result, 'skipped') && contains(needs.build.result, 'success') }} | |
timeout-minutes: 15 | |
outputs: | |
clusterprefix: ${{ needs.build.outputs.clusterprefix }} | |
version: ${{ needs.build.outputs.version }} | |
pr: ${{ needs.build.outputs.pr }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: ${{fromJSON(needs.build.outputs.pr).merge_commit_sha}} | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: AWS Test Resources | |
env: | |
AWS_REGION: us-west-2 | |
AWS_ACCESS_KEY_ID: ${{ secrets.CI_AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.CI_AWS_SECRET_ACCESS_KEY }} | |
AZURE_REGION: westus2 | |
AZURE_SUBSCRIPTION_ID: ${{ secrets.CI_AZURE_SUBSCRIPTION_ID }} | |
AZURE_TENANT_ID: ${{ secrets.CI_AZURE_TENANT_ID }} | |
AZURE_CLIENT_ID: ${{ secrets.CI_AZURE_CLIENT_ID }} | |
AZURE_CLIENT_SECRET: ${{ secrets.CI_AZURE_CLIENT_SECRET }} | |
CLUSTER_NAME: '${{ needs.build.outputs.clusterprefix }}' | |
run: | | |
make dev-aws-nuke | |
make dev-azure-nuke |