88 - " design/**"
99 - " **/*.md"
1010jobs :
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
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 :
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*
0 commit comments