Skip to content

build(deps): Bump github.com/argoproj/argo-cd/v3 from 3.4.4 to 3.4.5 #3186

build(deps): Bump github.com/argoproj/argo-cd/v3 from 3.4.4 to 3.4.5

build(deps): Bump github.com/argoproj/argo-cd/v3 from 3.4.4 to 3.4.5 #3186

Workflow file for this run

name: Integration tests
on:
push:
branches:
- 'main'
- 'release-*'
pull_request:
branches:
- 'main'
- 'release-*'
permissions:
contents: read
jobs:
changes:
runs-on: ubuntu-latest
outputs:
code: ${{ steps.filter.outputs.code_any_changed }}
docs: ${{ steps.filter.outputs.docs_any_changed }}
helm: ${{ steps.filter.outputs.helm_any_changed }}
agent-helm-chart: ${{ steps.filter.outputs.agent-helm-chart_any_changed }}
principal-helm-chart: ${{ steps.filter.outputs.principal-helm-chart_any_changed }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: tj-actions/changed-files@c3a1bb2c992d77180ae65be6ae6c166cf40f857c # v45.0.3
id: filter
with:
files_yaml: |
code:
- '!**.md'
- '!**/*.md'
- '!docs/**'
- '!Dockerfile.*'
docs:
- 'docs/**'
helm:
- 'install/helm-repo/**'
agent-helm-chart:
- 'install/helm-repo/argocd-agent-agent/**'
principal-helm-chart:
- 'install/helm-repo/argocd-agent-principal/**'
check-go:
name: Check go modules synchronicity
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Golang
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
- name: Download all Go modules
run: |
go mod download
- name: Check for tidiness of go.mod and go.sum
run: |
go mod tidy
git diff --exit-code -- .
codegen:
name: Check for changes to generated code
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Golang
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
- name: Download all Go modules
run: |
go mod download
- name: Run codegen
run: |
make codegen
- name: Check for changes
run: |
git diff --exit-code -- .
lint:
permissions:
contents: read # for actions/checkout to fetch code
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
checks: write
name: Lint Go code
if: ${{ needs.changes.outputs.code == 'true' }}
runs-on: ubuntu-22.04
needs:
- changes
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Golang
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
- name: Run golangci-lint
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
with:
version: v2.12.2
args: --verbose
build-go:
name: Build & cache Go code
if: ${{ needs.changes.outputs.code == 'true' }}
runs-on: ubuntu-22.04
needs:
- changes
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Golang
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
- name: Download all Go modules
run: |
go mod download
- name: Compile all packages
run: make build
- name: Display version
run: |
./dist/argocd-agent version -o json
build-docs:
name: Build the documentation
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Build the documentation
run: |
make build-docs
test:
name: Run unit tests
if: ${{ needs.changes.outputs.code == 'true' }}
runs-on: ubuntu-22.04
needs:
- changes
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Golang
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
- name: Download all Go modules
run: |
go mod download
- name: Run all unit tests
run: |
GOTOOLCHAIN=go1.26.0+auto make test
- name: Upload coverage results
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: test/out/coverage.out
flags: unit-tests
test-e2e:
name: Run end-to-end tests
if: ${{ needs.changes.outputs.code == 'true' }}
runs-on: ubuntu-22.04
needs:
- changes
env:
GOPATH: /home/runner/go
steps:
- name: Install required packages
run: |
sudo apt-get install libpwquality-tools
- name: Free up some disk space
run: |
df -h
sudo apt clean
sudo docker system prune -a -f
sudo rm -rf /usr/lib/jvm
sudo rm -rf /usr/local/.ghcup
sudo rm -rf /usr/local/lib/android
sudo rm -rf /usr/local/share/powershell
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/share/swift
df -h
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Golang
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
- name: GH actions workaround - Kill XSP4 process
run: |
sudo pkill mono || true
- name: Install microk8s
run: |
set -x
sudo snap install --classic --channel 1.31/stable microk8s
sudo microk8s enable metallb:192.168.56.100-192.168.56.254
sudo microk8s enable hostpath-storage
mkdir -p $HOME/.kube
sudo microk8s config > $HOME/.kube/config
sudo chown runner $HOME/.kube/config
sudo chmod go-r $HOME/.kube/config
kubectl version
- name: Restore go build cache
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-go-build-v1-${{ github.run_id }}
- name: Add ~/go/bin to PATH
run: |
echo "/home/runner/go/bin" >> $GITHUB_PATH
- name: Add /usr/local/bin to PATH
run: |
echo "/usr/local/bin" >> $GITHUB_PATH
- name: Install vcluster
run: |
curl -L -o vcluster "https://github.com/loft-sh/vcluster/releases/latest/download/vcluster-linux-amd64" && sudo install -c -m 0755 vcluster /usr/local/bin && rm -f vcluster
vcluster --version
- name: Download Go dependencies
run: |
go mod download
- name: Set up the test environment
run: |
make setup-e2e
- name: Run the principal and agents
run: |
make all
make start-e2e 2>&1 | sed -r "s/[[:cntrl:]]\[[0-9]{1,3}m//g" | tee /tmp/e2e-argocd-agent.log &
sleep 10
- name: Run the e2e tests
run: |
set -o pipefail
make test-e2e 2>&1 | tee /tmp/test-e2e.log
goreman run stop-all || echo "goreman trouble"
sleep 30
- name: Create Argo CD logs
run: |
kubectl --context vcluster-agent-autonomous logs -n argocd-autonomous argocd-application-controller-0 > /tmp/vcluster-agent-autonomous-controller.log
kubectl --context vcluster-agent-managed logs -n argocd-managed argocd-application-controller-0 > /tmp/vcluster-agent-managed-controller.log
kubectl --context vcluster-control-plane logs -n argocd-principal deployment/argocd-server > /tmp/vcluster-control-plane-server.log
if: ${{ failure() }}
- name: Upload e2e-argocd-agent logs
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: e2e-argocd-agent.log
path: /tmp/e2e-argocd-agent.log
if: ${{ failure() }}
- name: Upload test logs
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: test-e2e.log
path: /tmp/test-e2e.log
if: ${{ failure() }}
- name: Upload vcluster-agent-autonomous-controller logs
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: vcluster-agent-autonomous-controller.log
path: /tmp/vcluster-agent-autonomous-controller.log
if: ${{ failure() }}
- name: Upload vcluster-agent-managed-controller logs
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: vcluster-agent-managed-controller.log
path: /tmp/vcluster-agent-managed-controller.log
if: ${{ failure() }}
- name: Upload vcluster-control-plane-server logs
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: vcluster-control-plane-server.log
path: /tmp/vcluster-control-plane-server.log
if: ${{ failure() }}
validate-helm-charts:
name: Validate Helm charts
if: ${{ needs.changes.outputs.helm == 'true' }}
runs-on: ubuntu-22.04
needs:
- changes
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Install yq
env:
YQ_VERSION: v4.53.2
# SHA-256 of yq_linux_amd64 from
# https://github.com/mikefarah/yq/releases/download/v4.53.2/checksums
YQ_SHA256: d56bf5c6819e8e696340c312bd70f849dc1678a7cda9c2ad63eebd906371d56b
run: |
set -euo pipefail
curl --fail --silent --show-error --location --retry 3 \
--output /tmp/yq \
"https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64"
echo "${YQ_SHA256} /tmp/yq" | sha256sum --check --status
sudo install -m 0755 /tmp/yq /usr/local/bin/yq
rm -f /tmp/yq
yq --version
- name: Install Helm
uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2 # v5.0.0
with:
version: v3.20.2
- name: Validate schema
working-directory: ${{ github.workspace }}
run: |
make validate-values-schema
- name: validate helm-docs generation
uses: losisin/helm-docs-github-action@2ccf3e77eb70dc80d62f8cc26f15d0a96b75fef4 # v1.8.0 https://github.com/losisin/helm-docs-github-action
with:
fail-on-diff: true
version: v1.14.2
check-agent-chart-version:
name: Check agent chart version bump
if: ${{ github.event_name == 'pull_request' && needs.changes.outputs.agent-helm-chart == 'true' }}
runs-on: ubuntu-22.04
needs:
- changes
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false
- name: Install yq
env:
YQ_VERSION: v4.53.2
YQ_SHA256: d56bf5c6819e8e696340c312bd70f849dc1678a7cda9c2ad63eebd906371d56b
run: |
set -euo pipefail
curl --fail --silent --show-error --location --retry 3 \
--output /tmp/yq \
"https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64"
echo "${YQ_SHA256} /tmp/yq" | sha256sum --check --status
sudo install -m 0755 /tmp/yq /usr/local/bin/yq
rm -f /tmp/yq
- name: Check agent chart version was bumped
run: |
set -euo pipefail
CHART_PATH="install/helm-repo/argocd-agent-agent/Chart.yaml"
BASE_VERSION=$(git show origin/${{ github.base_ref }}:${CHART_PATH} | yq '.version')
HEAD_VERSION=$(yq '.version' ${CHART_PATH})
echo "Base version: ${BASE_VERSION}"
echo "Head version: ${HEAD_VERSION}"
if [ "${BASE_VERSION}" = "${HEAD_VERSION}" ]; then
echo "::error::Chart files changed but chart version was not bumped. Please update the 'version' field in ${CHART_PATH} (current: ${HEAD_VERSION})."
exit 1
fi
LOWEST=$(printf '%s\n%s' "${BASE_VERSION}" "${HEAD_VERSION}" | sort -V | head -n1)
if [ "${LOWEST}" != "${BASE_VERSION}" ]; then
echo "::error::Chart version in ${CHART_PATH} must be strictly greater than the base branch (${BASE_VERSION}), but is ${HEAD_VERSION}. Please update the 'version' field in ${CHART_PATH}."
exit 1
fi
echo "Chart version in ${CHART_PATH} was bumped: ${BASE_VERSION} -> ${HEAD_VERSION}"
check-principal-chart-version:
name: Check principal chart version bump
if: ${{ github.event_name == 'pull_request' && needs.changes.outputs.principal-helm-chart == 'true' }}
runs-on: ubuntu-22.04
needs:
- changes
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false
- name: Install yq
env:
YQ_VERSION: v4.53.2
YQ_SHA256: d56bf5c6819e8e696340c312bd70f849dc1678a7cda9c2ad63eebd906371d56b
run: |
set -euo pipefail
curl --fail --silent --show-error --location --retry 3 \
--output /tmp/yq \
"https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64"
echo "${YQ_SHA256} /tmp/yq" | sha256sum --check --status
sudo install -m 0755 /tmp/yq /usr/local/bin/yq
rm -f /tmp/yq
- name: Check principal chart version was bumped
run: |
set -euo pipefail
CHART_PATH="install/helm-repo/argocd-agent-principal/Chart.yaml"
BASE_VERSION=$(git show origin/${{ github.base_ref }}:${CHART_PATH} | yq '.version')
HEAD_VERSION=$(yq '.version' ${CHART_PATH})
echo "Base version: ${BASE_VERSION}"
echo "Head version: ${HEAD_VERSION}"
if [ "${BASE_VERSION}" = "${HEAD_VERSION}" ]; then
echo "::error::Chart files changed but chart version was not bumped. Please update the 'version' field in ${CHART_PATH} (current: ${HEAD_VERSION})."
exit 1
fi
LOWEST=$(printf '%s\n%s' "${BASE_VERSION}" "${HEAD_VERSION}" | sort -V | head -n1)
if [ "${LOWEST}" != "${BASE_VERSION}" ]; then
echo "::error::Chart version in ${CHART_PATH} must be strictly greater than the base branch (${BASE_VERSION}), but is ${HEAD_VERSION}. Please update the 'version' field in ${CHART_PATH}."
exit 1
fi
echo "Chart version in ${CHART_PATH} was bumped: ${BASE_VERSION} -> ${HEAD_VERSION}"