-
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
[GH-171] - Update deploy.yml to Send Notifications to Microsoft Teams and Align with Other Repos #173
Conversation
Download and run the latest build with:
|
The semver you want to deploy. If you do not provide this, the workflow | ||
will promote from the "previous" cluster (dev -> eval, eval -> prod). | ||
associated-record: | ||
required: false |
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.
Reference #identity-uw
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.
just a couple of questions.
|
||
jobs: | ||
# The `configure` job reconciles the target version (if it wasn't explicitly provided), | ||
# creates a slack notification for the deployment (except for developer instances), |
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.
"creates a slack notification for the deployment (except for developer instances)"
did we keep the part about "except for developer instances"?
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.
Yes, great call @goulter - Thanks!
It's handled here: https://github.com/UWIT-IAM/uw-husky-directory/pull/173/files#diff-28802fbf11c83a2eee09623fb192785e7ca92a3f40602a517c011b947a1822d3L167
+ - name: Notify Teams of Deployment Start
+ # creates MS Teams notification for the deployment (except for developer instances),
+ if: env.target_stage == 'dev' || env.target_stage == 'eval' || env.target_stage == 'prod'
Just to confirm, do we have developer instances like identity.UW? Either way, this won't send notifications if we create them in the future. :)
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.
Oh, thats a great point. There are no developer instances of the directory.
else | ||
target_version=$(./scripts/get-deployed-version.sh -s ${source_stage}) | ||
target_version="${{ env.target_version }}" |
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.
can you clarify the change? (lines 84/93)
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.
@goulter : It is used to directly set the target_version
when it is explicitly provided as input (via the target-version environment variable).
For more details please check https://github.com/UWIT-IAM/identity-uw/blob/develop/.github/workflows/deploy-from-ui.yml#L98
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 should have been more specific. Why not keep target_version=$(./scripts/get-deployed-version.sh -s ${source_stage})
?
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.
The change from target_version=$(./scripts/get-deployed-version.sh -s ${source_stage})
to target_version="${{ env.target_version }}"
in the else clause is intentional.
In this case, we've already confirmed that env.target_version
exists (since we're in the else
block of if [[ -z "${{ env.target_version }}" ]]
), so we should use the provided version directly rather than pulling from the source stage. This is done to make sure that when a user explicitly provides a version, we respect that choice instead of overwriting it with a version from another environment.
The original code would ignore the user-provided version and always pull from the source stage, which defeats the purpose of allowing version specification through the input variable.
This change allows for two clear paths:
- No version provided -> derive from source stage.
- Version provided -> use that version directly.
I've also made this diagram to help visually understand the logic:
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.
Oh, so, the existing code was broke, lovely. Thanks for fixing it.
Change Description: This PR updates the
deploy.yml
workflow to send deployment notifications to Microsoft Teams instead of Slack. It also aligns with the notification setup used in theIdentity.UW
repository, to keep deployment update notifications consistent and standardized across the board.Closes Github(s): GH-171
UW-Directory Pull Request checklist
poetry run tox
semver-guidance:
label for this pull request (under labels,to the right of the screen)