-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add inputs to k8s apply workflow #18
Merged
micdes-pagopa
merged 35 commits into
main
from
PIN-5811-automating-deployments-jobs-monitoring
Jan 7, 2025
Merged
Changes from 34 commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
e53e4c7
add terraform folder, edit k8s-apply workflow, add tf-apply workflow
micheledellipaoli-pagopa 0e83c8e
remove microservices-list.json
micheledellipaoli-pagopa aeb4f94
add script to get cloudwatch log metric filters; add some fix to the …
micheledellipaoli-pagopa f268cca
edit after review
micheledellipaoli-pagopa 124f31c
comment initChecks job
micheledellipaoli-pagopa 241023b
remove microservices-list.json file from gitignore
micheledellipaoli-pagopa d417136
remove microservices-list.json file from gitignore
micheledellipaoli-pagopa cab1828
edit Create microservices JSON step
micheledellipaoli-pagopa 6005a12
edit Create microservices JSON step
micheledellipaoli-pagopa 42b7ede
edit Create microservices JSON step
micheledellipaoli-pagopa aee9e4c
edit Create microservices JSON step
micheledellipaoli-pagopa 9eef1ce
remove sso_admin data source
micheledellipaoli-pagopa edf097e
add norm_env step in workflow_setup job
micheledellipaoli-pagopa 3160ceb
edit tf-apply workflow
micheledellipaoli-pagopa e7914da
add tags to module and update tag
micheledellipaoli-pagopa 4e55c96
test the add of a new deployment
micheledellipaoli-pagopa b6f22d2
remove the test deployment
micheledellipaoli-pagopa 9da4af0
add the test deployment
micheledellipaoli-pagopa 216f49c
remove the test deployment
micheledellipaoli-pagopa 225224c
test retagging alarms
micheledellipaoli-pagopa 5412ad6
test retagging alarms
micheledellipaoli-pagopa dced4ff
test retagging alarms
micheledellipaoli-pagopa e9be4cd
remove testing tag from alarms
micheledellipaoli-pagopa 04ab948
remove testing tag from alarms
micheledellipaoli-pagopa ead4e32
add cronjobs monitoring alarms, edit data external
micheledellipaoli-pagopa 6596d6e
edit Create microservices JSON step
micheledellipaoli-pagopa dbf374f
edit Create microservices JSON step
micheledellipaoli-pagopa ea48ceb
edit Create cronjobs JSON step
micheledellipaoli-pagopa 2e44778
Remove comments from k8s-apply.yaml
micheledellipaoli-pagopa 58e0c70
add clean-up job
micheledellipaoli-pagopa 66bfc70
Merge branch 'main' into PIN-5811-automating-deployments-jobs-monitoring
micheledellipaoli-pagopa a2176f6
edit set-outputs step, add inputs to k8s-apply workflow
micheledellipaoli-pagopa 618094d
edit description of inputs
micheledellipaoli-pagopa ef5546c
edit delete_runner job condition
micheledellipaoli-pagopa d4cd03e
edit job conditions
micheledellipaoli-pagopa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -12,6 +12,16 @@ on: | |||||
required: true | ||||||
default: false | ||||||
type: boolean | ||||||
run_k8s_workflow: | ||||||
description: 'Run k8s deployment jobs' | ||||||
required: true | ||||||
default: false | ||||||
type: boolean | ||||||
run_tf_workflow: | ||||||
description: 'Run TF apply job' | ||||||
required: true | ||||||
default: false | ||||||
type: boolean | ||||||
|
||||||
permissions: | ||||||
id-token: write | ||||||
|
@@ -28,10 +38,13 @@ jobs: | |||||
echo "- environment: \`${{ inputs.environment }}\`" >> $GITHUB_STEP_SUMMARY | ||||||
echo "- ref: \`${{ github.ref }}\`" >> $GITHUB_STEP_SUMMARY | ||||||
echo "- force_restart: \`${{ inputs.force_restart }}\`" >> $GITHUB_STEP_SUMMARY | ||||||
echo "- run_k8s_workflow: \`${{ inputs.run_k8s_workflow }}\`" >> $GITHUB_STEP_SUMMARY | ||||||
echo "- run_tf_workflow: \`${{ inputs.run_tf_workflow }}\`" >> $GITHUB_STEP_SUMMARY | ||||||
|
||||||
initChecks: | ||||||
runs-on: ubuntu-22.04 | ||||||
environment: ${{ inputs.environment }} | ||||||
if: ${{ inputs.run_k8s_workflow == true }} | ||||||
steps: | ||||||
- name: Check user is a ${{ vars.ALLOWED_DEPLOY_GH_TEAMS }} team member | ||||||
id: checkUserPermissions | ||||||
|
@@ -84,6 +97,7 @@ jobs: | |||||
matrix: | ||||||
index: [1,2,3,4,5,6,7,8,9,10] | ||||||
fail-fast: false | ||||||
if: ${{ inputs.run_k8s_workflow == true }} | ||||||
steps: | ||||||
- name: Start GitHub Runner | ||||||
id: start_runner | ||||||
|
@@ -105,6 +119,7 @@ jobs: | |||||
deploy: | ||||||
needs: [ create_runner ] | ||||||
secrets: inherit | ||||||
if: ${{ inputs.run_k8s_workflow == true }} | ||||||
uses: ./.github/workflows/k8s-apply-sub.yaml | ||||||
with: | ||||||
environment: ${{ inputs.environment }} | ||||||
|
@@ -113,7 +128,7 @@ jobs: | |||||
delete_runner: | ||||||
name: Delete Self-Hosted Runner | ||||||
needs: [create_runner, deploy] | ||||||
if: ${{ always() }} | ||||||
if: ${{ inputs.run_k8s_workflow == true }} | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
I know this looks strange, but it's a workaround to force this job to run in the case when
|
||||||
runs-on: ubuntu-22.04 | ||||||
environment: ${{ inputs.environment }} | ||||||
strategy: | ||||||
|
@@ -133,6 +148,7 @@ jobs: | |||||
|
||||||
tf_apply: | ||||||
secrets: inherit | ||||||
if: ${{ inputs.run_tf_workflow == true }} | ||||||
uses: ./.github/workflows/tf-apply.yaml | ||||||
with: | ||||||
environment: ${{ inputs.environment }} | ||||||
|
This file contains 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this job should always run