Skip to content

Commit

Permalink
ci: add force-flag support
Browse files Browse the repository at this point in the history
  • Loading branch information
msanft committed Dec 7, 2023
1 parent efbd62b commit a4a4c88
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/actions/constellation_create/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ inputs:
marketplaceImageVersion:
description: "Marketplace OS image version. Used instead of osImage."
required: false
force:
description: "Set the force-flag on apply to ignore version mismatches."
required: false

outputs:
kubeconfig:
Expand Down Expand Up @@ -173,11 +176,18 @@ runs:
kubernetesVersion: ${{ inputs.kubernetesVersion }}
selfManagedInfra: ${{ inputs.selfManagedInfra }}

- name: Set force flag
id: set-force-flag
if: inputs.force == 'true'
shell: bash
run: |
echo "flag=--force" | tee -a $GITHUB_OUTPUT
- name: Constellation init
id: constellation-init
shell: bash
run: |
constellation apply --skip-phases=infrastructure --debug
constellation apply --skip-phases=infrastructure --debug ${{ steps.set-force-flag.outputs.flag }}
echo "KUBECONFIG=$(pwd)/constellation-admin.conf" | tee -a $GITHUB_OUTPUT
- name: Wait for nodes to join and become ready
Expand Down
4 changes: 4 additions & 0 deletions .github/actions/e2e_test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ inputs:
marketplaceImageVersion:
description: "Marketplace OS image version. Used instead of osImage."
required: false
force:
description: "Set the force-flag on apply to ignore version mismatches."
required: false

outputs:
kubeconfig:
Expand Down Expand Up @@ -270,6 +273,7 @@ runs:
test: ${{ inputs.test }}
selfManagedInfra: ${{ inputs.selfManagedInfra }}
marketplaceImageVersion: ${{ inputs.marketplaceImageVersion }}
force: ${{ inputs.force }}

- name: Deploy log- and metrics-collection (Kubernetes)
id: deploy-logcollection
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/e2e-test-marketplace-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,4 @@ jobs:
regionZone: ${{ inputs.regionZone }}
git-ref: ${{ inputs.git-ref }}
marketplaceImageVersion: ${{ inputs.marketplaceImageVersion }}
force: true
4 changes: 4 additions & 0 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ on:
marketplaceImageVersion:
description: "Marketplace image version to use."
type: string
force:
description: "Use the force-flag when applying to ignore version mismatches."
type: boolean

jobs:
split-nodeCount:
Expand Down Expand Up @@ -242,6 +245,7 @@ jobs:
s3AccessKey: ${{ secrets.AWS_ACCESS_KEY_ID_S3PROXY }}
s3SecretKey: ${{ secrets.AWS_SECRET_ACCESS_KEY_S3PROXY }}
marketplaceImageVersion: ${{ inputs.marketplaceImageVersion }}
force: ${{ inputs.force }}

- name: Always terminate cluster
if: always()
Expand Down

0 comments on commit a4a4c88

Please sign in to comment.