Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/ccm-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,33 @@ jobs:
image.tar.sha256
retention-days: 30d

check-ccm-integration:
# Preflight: verify the CLOUDSCALE_API_TOKEN at step-level and set an output
# so the integration job can be skipped.
#
# GitHub Actions limitations motivating this:
# - `secrets` are NOT available in `jobs.<id>.if` (job-level `if`), so you cannot
# directly gate/skip a job by testing a secret there.
name: Check CCM Integration Configuration
runs-on: ubuntu-latest

outputs:
integration-enabled: ${{ steps.check.outputs.enabled }}

steps:
- id: check
name: Verify CLOUDSCALE_API_TOKEN is present
env:
CLOUDSCALE_API_TOKEN: ${{ secrets.CLOUDSCALE_API_TOKEN }}
run: |
if [ -n "$CLOUDSCALE_API_TOKEN" ]; then
echo "enabled=true" >> $GITHUB_OUTPUT
echo "CLOUDSCALE_API_TOKEN found — integration will run."
else
echo "enabled=false" >> $GITHUB_OUTPUT
echo "CLOUDSCALE_API_TOKEN not configured — skipping integration."
fi

integration:
name: "Kubernetes ${{ matrix.kubernetes }}"
runs-on: ubuntu-latest
Expand All @@ -128,6 +155,8 @@ jobs:
- unit
- test-matrix
- build-image
- check-ccm-integration
if: needs.check-ccm-integration.outputs.integration-enabled == 'true'

strategy:
fail-fast: false
Expand Down