Skip to content

Commit 5f1b117

Browse files
committed
Merge branch 'main' into issue-3159-azure-private-cloud-support
2 parents 6bfb6ae + 7442d20 commit 5f1b117

File tree

892 files changed

+70209
-11558
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

892 files changed

+70209
-11558
lines changed

.github/workflows/e2e-test-kind.yaml

Lines changed: 61 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,26 @@ on:
88
- "design/**"
99
- "**/*.md"
1010
jobs:
11+
get-go-version:
12+
uses: ./.github/workflows/get-go-version.yaml
13+
with:
14+
ref: ${{ github.event.pull_request.base.ref }}
15+
1116
# Build the Velero CLI and image once for all Kubernetes versions, and cache it so the fan-out workers can get it.
1217
build:
1318
runs-on: ubuntu-latest
19+
needs: get-go-version
20+
outputs:
21+
minio-dockerfile-sha: ${{ steps.minio-version.outputs.dockerfile_sha }}
1422
steps:
1523
- name: Check out the code
16-
uses: actions/checkout@v4
17-
- name: Set up Go
18-
uses: actions/setup-go@v5
24+
uses: actions/checkout@v6
25+
26+
- name: Set up Go version
27+
uses: actions/setup-go@v6
1928
with:
20-
go-version-file: 'go.mod'
29+
go-version: ${{ needs.get-go-version.outputs.version }}
30+
2131
# Look for a CLI that's made for this PR
2232
- name: Fetch built CLI
2333
id: cli-cache
@@ -44,6 +54,26 @@ jobs:
4454
run: |
4555
IMAGE=velero VERSION=pr-test BUILD_OUTPUT_TYPE=docker make container
4656
docker save velero:pr-test-linux-amd64 -o ./velero.tar
57+
# Check and build MinIO image once for all e2e tests
58+
- name: Check Bitnami MinIO Dockerfile version
59+
id: minio-version
60+
run: |
61+
DOCKERFILE_SHA=$(curl -s https://api.github.com/repos/bitnami/containers/commits?path=bitnami/minio/2025/debian-12/Dockerfile\&per_page=1 | jq -r '.[0].sha')
62+
echo "dockerfile_sha=${DOCKERFILE_SHA}" >> $GITHUB_OUTPUT
63+
- name: Cache MinIO Image
64+
uses: actions/cache@v4
65+
id: minio-cache
66+
with:
67+
path: ./minio-image.tar
68+
key: minio-bitnami-${{ steps.minio-version.outputs.dockerfile_sha }}
69+
- name: Build MinIO Image from Bitnami Dockerfile
70+
if: steps.minio-cache.outputs.cache-hit != 'true'
71+
run: |
72+
echo "Building MinIO image from Bitnami Dockerfile..."
73+
git clone --depth 1 https://github.com/bitnami/containers.git /tmp/bitnami-containers
74+
cd /tmp/bitnami-containers/bitnami/minio/2025/debian-12
75+
docker build -t bitnami/minio:local .
76+
docker save bitnami/minio:local > ${{ github.workspace }}/minio-image.tar
4777
# Create json of k8s versions to test
4878
# from guide: https://stackoverflow.com/a/65094398/4590470
4979
setup-test-matrix:
@@ -60,10 +90,9 @@ jobs:
6090
# grep -E "v[1-9]\.(2[5-9]|[3-9][0-9])" filters for v1.25 to v9.99
6191
# and removes older patches of the same minor version
6292
# awk -F. '{if(!a[$1"."$2]++)print $1"."$2"."$NF}'
63-
# TODO: replace "alpha|beta|1\.3[2-9]\.[1-9]|1\.31\.[6-9]|1\.30\.[1-9][0-9]|1\.29\.[1-9][4-9]" with "alpha|beta" when containerdv2 works https://github.com/vmware-tanzu/velero/issues/8648
6493
run: |
6594
echo "matrix={\
66-
\"k8s\":$(wget -q -O - "https://hub.docker.com/v2/namespaces/kindest/repositories/node/tags?page_size=50" | grep -o '"name": *"[^"]*' | grep -o '[^"]*$' | grep -v -E "alpha|beta|1\.3[2-9]\.[1-9]|1\.31\.[6-9]|1\.30\.[1-9][0-9]|1\.29\.[1-9][4-9]" | grep -E "v[1-9]\.(2[5-9]|[3-9][0-9])" | awk -F. '{if(!a[$1"."$2]++)print $1"."$2"."$NF}' | sort -r | sed s/v//g | jq -R -c -s 'split("\n")[:-1]'),\
95+
\"k8s\":$(wget -q -O - "https://hub.docker.com/v2/namespaces/kindest/repositories/node/tags?page_size=50" | grep -o '"name": *"[^"]*' | grep -o '[^"]*$' | grep -v -E "alpha|beta" | grep -E "v[1-9]\.(2[5-9]|[3-9][0-9])" | awk -F. '{if(!a[$1"."$2]++)print $1"."$2"."$NF}' | sort -r | sed s/v//g | jq -R -c -s 'split("\n")[:-1]'),\
6796
\"labels\":[\
6897
\"Basic && (ClusterResource || NodePort || StorageClass)\", \
6998
\"ResourceFiltering && !Restic\", \
@@ -76,20 +105,34 @@ jobs:
76105
needs:
77106
- build
78107
- setup-test-matrix
108+
- get-go-version
79109
runs-on: ubuntu-latest
80110
strategy:
81111
matrix: ${{fromJson(needs.setup-test-matrix.outputs.matrix)}}
82112
fail-fast: false
83113
steps:
84114
- name: Check out the code
85-
uses: actions/checkout@v4
86-
- name: Set up Go
87-
uses: actions/setup-go@v5
115+
uses: actions/checkout@v6
116+
117+
- name: Set up Go version
118+
uses: actions/setup-go@v6
88119
with:
89-
go-version-file: 'go.mod'
120+
go-version: ${{ needs.get-go-version.outputs.version }}
121+
122+
# Fetch the pre-built MinIO image from the build job
123+
- name: Fetch built MinIO Image
124+
uses: actions/cache@v4
125+
id: minio-cache
126+
with:
127+
path: ./minio-image.tar
128+
key: minio-bitnami-${{ needs.build.outputs.minio-dockerfile-sha }}
129+
- name: Load MinIO Image
130+
run: |
131+
echo "Loading MinIO image..."
132+
docker load < ./minio-image.tar
90133
- name: Install MinIO
91-
run:
92-
docker run -d --rm -p 9000:9000 -e "MINIO_ACCESS_KEY=minio" -e "MINIO_SECRET_KEY=minio123" -e "MINIO_DEFAULT_BUCKETS=bucket,additional-bucket" bitnami/minio:2021.6.17-debian-10-r7
134+
run: |
135+
docker run -d --rm -p 9000:9000 -e "MINIO_ROOT_USER=minio" -e "MINIO_ROOT_PASSWORD=minio123" -e "MINIO_DEFAULT_BUCKETS=bucket,additional-bucket" bitnami/minio:local
93136
- uses: engineerd/setup-kind@v0.6.2
94137
with:
95138
skipClusterLogsExport: true
@@ -122,6 +165,8 @@ jobs:
122165
curl -LO https://dl.k8s.io/release/v${{ matrix.k8s }}/bin/linux/amd64/kubectl
123166
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
124167
168+
git clone https://github.com/vmware-tanzu-experiments/distributed-data-generator.git -b main /tmp/kibishii
169+
125170
GOPATH=~/go \
126171
CLOUD_PROVIDER=kind \
127172
OBJECT_STORE_PROVIDER=aws \
@@ -133,12 +178,14 @@ jobs:
133178
ADDITIONAL_CREDS_FILE=/tmp/credential \
134179
ADDITIONAL_BSL_BUCKET=additional-bucket \
135180
VELERO_IMAGE=velero:pr-test-linux-amd64 \
181+
PLUGINS=velero/velero-plugin-for-aws:latest \
136182
GINKGO_LABELS="${{ matrix.labels }}" \
183+
KIBISHII_DIRECTORY=/tmp/kibishii/kubernetes/yaml/ \
137184
make -C test/ run-e2e
138185
timeout-minutes: 30
139186
- name: Upload debug bundle
140187
if: ${{ failure() }}
141-
uses: actions/upload-artifact@v4
188+
uses: actions/upload-artifact@v5
142189
with:
143-
name: DebugBundle
190+
name: DebugBundle-k8s-${{ matrix.k8s }}-job-${{ strategy.job-index }}
144191
path: /home/runner/work/velero/velero/test/e2e/debug-bundle*
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
on:
2+
workflow_call:
3+
inputs:
4+
ref:
5+
description: "The target branch's ref"
6+
required: true
7+
type: string
8+
outputs:
9+
version:
10+
description: "The expected Go version"
11+
value: ${{ jobs.extract.outputs.version }}
12+
13+
jobs:
14+
extract:
15+
runs-on: ubuntu-latest
16+
outputs:
17+
version: ${{ steps.pick-version.outputs.version }}
18+
steps:
19+
- name: Check out the code
20+
uses: actions/checkout@v6
21+
22+
- id: pick-version
23+
run: |
24+
if [ "${{ inputs.ref }}" == "main" ]; then
25+
version=$(grep '^go ' go.mod | awk '{print $2}' | cut -d. -f1-2)
26+
else
27+
goDirectiveVersion=$(grep '^go ' go.mod | awk '{print $2}')
28+
toolChainVersion=$(grep '^toolchain ' go.mod | awk '{print $2}')
29+
version=$(printf "%s\n%s\n" "$goDirectiveVersion" "$toolChainVersion" | sort -V | tail -n1)
30+
fi
31+
32+
echo "version=$version"
33+
echo "version=$version" >> $GITHUB_OUTPUT

.github/workflows/nightly-trivy-scan.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ jobs:
1313
# maintain the versions of Velero those need security scan
1414
versions: [main]
1515
# list of images that need scan
16-
images: [velero, velero-restore-helper]
16+
images: [velero, velero-plugin-for-aws, velero-plugin-for-gcp, velero-plugin-for-microsoft-azure]
1717
permissions:
1818
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
1919

2020
steps:
2121
- name: Checkout code
22-
uses: actions/checkout@v4
22+
uses: actions/checkout@v6
2323

2424
- name: Run Trivy vulnerability scanner
2525
uses: aquasecurity/trivy-action@master

.github/workflows/pr-changelog-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
steps:
1313

1414
- name: Check out the code
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@v6
1616

1717
- name: Changelog check
1818
if: ${{ !(contains(github.event.pull_request.labels.*.name, 'kind/changelog-not-required') || contains(github.event.pull_request.labels.*.name, 'Design') || contains(github.event.pull_request.labels.*.name, 'Website') || contains(github.event.pull_request.labels.*.name, 'Documentation'))}}

.github/workflows/pr-ci-check.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,26 @@
11
name: Pull Request CI Check
22
on: [pull_request]
33
jobs:
4+
get-go-version:
5+
uses: ./.github/workflows/get-go-version.yaml
6+
with:
7+
ref: ${{ github.event.pull_request.base.ref }}
8+
49
build:
510
name: Run CI
11+
needs: get-go-version
612
runs-on: ubuntu-latest
713
strategy:
814
fail-fast: false
915
steps:
1016
- name: Check out the code
11-
uses: actions/checkout@v4
12-
- name: Set up Go
13-
uses: actions/setup-go@v5
17+
uses: actions/checkout@v6
18+
19+
- name: Set up Go version
20+
uses: actions/setup-go@v6
1421
with:
15-
go-version-file: 'go.mod'
22+
go-version: ${{ needs.get-go-version.outputs.version }}
23+
1624
- name: Make ci
1725
run: make ci
1826
- name: Upload test coverage

.github/workflows/pr-codespell.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ jobs:
88
steps:
99

1010
- name: Check out the code
11-
uses: actions/checkout@v4
11+
uses: actions/checkout@v6
1212

1313
- name: Codespell
1414
uses: codespell-project/actions-codespell@master
1515
with:
1616
# ignore the config/.../crd.go file as it's generated binary data that is edited elsewhere.
1717
skip: .git,*.png,*.jpg,*.woff,*.ttf,*.gif,*.ico,./config/crd/v1beta1/crds/crds.go,./config/crd/v1/crds/crds.go,./config/crd/v2alpha1/crds/crds.go,./go.sum,./LICENSE
18-
ignore_words_list: iam,aks,ist,bridget,ue,shouldnot,atleast,notin,sme,optin
18+
ignore_words_list: iam,aks,ist,bridget,ue,shouldnot,atleast,notin,sme,optin,sie
1919
check_filenames: true
2020
check_hidden: true
2121

.github/workflows/pr-containers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
name: Build
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v6
1717
name: Checkout
1818

1919
- name: Set up QEMU

.github/workflows/pr-goreleaser.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
name: Build
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@v6
1818
name: Checkout
1919

2020
- name: Verify .goreleaser.yml and try a dryrun release.

.github/workflows/pr-linter-check.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,26 @@ on:
77
- "design/**"
88
- "**/*.md"
99
jobs:
10+
get-go-version:
11+
uses: ./.github/workflows/get-go-version.yaml
12+
with:
13+
ref: ${{ github.event.pull_request.base.ref }}
14+
1015
build:
1116
name: Run Linter Check
1217
runs-on: ubuntu-latest
18+
needs: get-go-version
1319
steps:
1420
- name: Check out the code
15-
uses: actions/checkout@v4
16-
- name: Set up Go
17-
uses: actions/setup-go@v5
21+
uses: actions/checkout@v6
22+
23+
- name: Set up Go version
24+
uses: actions/setup-go@v6
1825
with:
19-
go-version-file: 'go.mod'
26+
go-version: ${{ needs.get-go-version.outputs.version }}
27+
2028
- name: Linter check
21-
uses: golangci/golangci-lint-action@v6
29+
uses: golangci/golangci-lint-action@v9
2230
with:
23-
version: v1.64.5
31+
version: v2.5.0
2432
args: --verbose

.github/workflows/push-builder.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414

15-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@v6
1616
with:
1717
# The default value is "1" which fetches only a single commit. If we merge PR without squash or rebase,
1818
# there are at least two commits: the first one is the merge commit and the second one is the real commit

0 commit comments

Comments
 (0)