Create clusters for 4.11.0 #173
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "RELEASE: Create Clusters" | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: Version of the images | |
| required: true | |
| default: "4.1.1" | |
| type: string | |
| create-k8s-cluster: | |
| description: Create a GKE demo cluster | |
| default: false | |
| type: boolean | |
| create-os4-cluster: | |
| description: Create an Openshift 4 demo cluster | |
| default: false | |
| type: boolean | |
| create-long-cluster: | |
| description: Create a long-running cluster | |
| default: false | |
| type: boolean | |
| dry-run: | |
| description: Dry-run | |
| default: false | |
| type: boolean | |
| env: | |
| main_branch: ${{github.event.repository.default_branch}} | |
| script_url: /repos/${{github.repository}}/contents/.github/workflows/scripts/common.sh?ref=${{ github.ref_name }} | |
| ACCEPT_RAW: "Accept: application/vnd.github.v3.raw" | |
| GH_TOKEN: ${{ github.token }} | |
| GH_NO_UPDATE_NOTIFIER: 1 | |
| TIMEOUT_WAIT_FOR_IMAGES_SECONDS: 3600 | |
| run-name: >- | |
| ${{ | |
| format('Create clusters for {0}', inputs.version) | |
| }} | |
| # Ensure that only a single automation workflow can run at a time for each release. | |
| concurrency: Release automation ${{ inputs.version }} | |
| jobs: | |
| trim-cluster-names: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| cluster-with-fake-load-name-cleaned: ${{ steps.cluster-names.outputs.cluster-with-fake-load-name-cleaned }} | |
| cluster-with-real-load-name-cleaned: ${{ steps.cluster-names.outputs.cluster-with-real-load-name-cleaned }} | |
| env: | |
| CLUSTER_WITH_FAKE_LOAD_NAME: rd-fl-${{ github.event.inputs.version }} | |
| CLUSTER_WITH_REAL_LOAD_NAME: rd-rl-${{ github.event.inputs.version }} | |
| steps: | |
| - name: Trim and clean cluster names | |
| id: cluster-names | |
| run: | | |
| # Cluster names are cropped to infra's max length and dots replaced with dashes. | |
| # Latter is to avoid informing release engineers of incorrect cluster names. | |
| CLEANED_CLUSTER_WITH_FAKE_LOAD_NAME="$(echo "${CLUSTER_WITH_FAKE_LOAD_NAME:0:28}" | tr '.' '-')" | |
| echo "cluster-with-fake-load-name-cleaned=${CLEANED_CLUSTER_WITH_FAKE_LOAD_NAME}" >> "${GITHUB_OUTPUT}" | |
| CLEANED_CLUSTER_WITH_REAL_LOAD_NAME="$(echo "${CLUSTER_WITH_REAL_LOAD_NAME:0:28}" | tr '.' '-')" | |
| echo "cluster-with-real-load-name-cleaned=${CLEANED_CLUSTER_WITH_REAL_LOAD_NAME}" >> "${GITHUB_OUTPUT}" | |
| clusters: | |
| name: Setup demo clusters | |
| needs: trim-cluster-names | |
| uses: stackrox/actions/.github/workflows/create-demo-clusters.yml@d525279c3f76ffbd1eeb761f0562ce8e9584fdbf | |
| secrets: inherit | |
| with: | |
| version: ${{github.event.inputs.version}} | |
| create-k8s-cluster: ${{github.event.inputs.create-k8s-cluster == 'true'}} | |
| create-os4-cluster: ${{github.event.inputs.create-os4-cluster == 'true'}} | |
| create-long-cluster: ${{github.event.inputs.create-long-cluster == 'true'}} | |
| dry-run: ${{github.event.inputs.dry-run == 'true'}} | |
| workflow-ref: use-roxie-in-start-acs | |
| kube-burner-config-ref: ${{ github.event.inputs.version }} | |
| kube-burner-config-repo: stackrox | |
| cluster-with-fake-load-name: ${{ needs.trim-cluster-names.outputs.cluster-with-fake-load-name-cleaned }} | |
| cluster-with-real-load-name: ${{ needs.trim-cluster-names.outputs.cluster-with-real-load-name-cleaned }} |