Skip to content

Commit e51ac80

Browse files
committed
fix: Round 9 - Use direct GCS URL for kubebuilder test tools
The kubebuilder.io URL returns a 302 redirect that curl -sSL is not following correctly, causing "tar: This does not look like a tar archive" errors. Changed to use the direct Google Cloud Storage URL: https://storage.googleapis.com/kubebuilder-tools/kubebuilder-tools-VERSION-linux-amd64.tar.gz This ensures we get the actual tar.gz file instead of a redirect response. Also restored -z flag since we now know it's definitely gzipped. Files modified: - .github/workflows/test.yml (lines 181-184) - .github/workflows/reusable/build-test.yml (lines 92-94) Related: #CI-fixes
1 parent 1e64ebb commit e51ac80

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

.github/workflows/reusable/build-test.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,10 @@ jobs:
8888
echo "Setting up test environment for ${{ inputs.test-type }} tests..."
8989
9090
# Download and extract kubebuilder test binaries
91-
curl -sSLo envtest-bins.tar.gz "https://go.kubebuilder.io/test-tools/1.31.1/linux/amd64"
91+
# Use direct GCS URL to avoid redirect issues
92+
curl -sSLo envtest-bins.tar.gz "https://storage.googleapis.com/kubebuilder-tools/kubebuilder-tools-1.31.1-linux-amd64.tar.gz"
9293
mkdir -p /tmp/kubebuilder/bin
93-
tar -C /tmp/kubebuilder --strip-components=1 -xvf envtest-bins.tar.gz
94+
tar -C /tmp/kubebuilder --strip-components=1 -xzf envtest-bins.tar.gz
9495
9596
echo "KUBEBUILDER_ASSETS=/tmp/kubebuilder/bin" >> $GITHUB_ENV
9697
echo "USE_EXISTING_CLUSTER=false" >> $GITHUB_ENV

.github/workflows/test.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,10 @@ jobs:
178178
echo "Setting up Kubernetes test environment for ${{ matrix.component.name }}"
179179
180180
# Download and extract kubebuilder binaries
181-
curl -sSLo envtest-bins.tar.gz "https://go.kubebuilder.io/test-tools/${{ env.K8S_VERSION }}/linux/amd64"
181+
# Use direct GCS URL to avoid redirect issues
182+
curl -sSLo envtest-bins.tar.gz "https://storage.googleapis.com/kubebuilder-tools/kubebuilder-tools-${{ env.K8S_VERSION }}-linux-amd64.tar.gz"
182183
mkdir -p /tmp/kubebuilder/bin
183-
tar -C /tmp/kubebuilder --strip-components=1 -xvf envtest-bins.tar.gz
184+
tar -C /tmp/kubebuilder --strip-components=1 -xzf envtest-bins.tar.gz
184185
185186
# Set environment variables
186187
echo "KUBEBUILDER_ASSETS=/tmp/kubebuilder/bin" >> $GITHUB_ENV

0 commit comments

Comments
 (0)