-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Deprecate reliance on "common-build-scripts" (i.e., tomware) in places where its dependency wasn't noticed before. * Pin flask dependency since 2.2.x broke other dependencies. Shame on flask! * Make HUSKY_DIRECTORY_VERSION a globally required build arg so that it doesn't have to be repeated for all stages. * Update deploy workflow to work with shared build process * Give release workflow a better name. * [Bot] Update version to 2.2.3 Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
c5cfea0
commit 6ddeedc
Showing
9 changed files
with
60 additions
and
71 deletions.
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
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
name: Create release tag, and deploy to dev | ||
on: | ||
push: | ||
branches: | ||
|
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 |
---|---|---|
@@ -1,7 +1,6 @@ | ||
name: Deploy the UW Directory | ||
|
||
on: | ||
push: | ||
branches: | ||
- dry-run-deploy | ||
workflow_dispatch: | ||
inputs: | ||
cluster: | ||
|
@@ -10,7 +9,7 @@ on: | |
required: true | ||
rfc: | ||
description: > | ||
rfc. The RFC number (e.g., '0724') associated with this | ||
rfc. The RFC number or link associated with this | ||
deployment. Required when deploying to prod. | ||
version: | ||
description: > | ||
|
@@ -32,45 +31,35 @@ jobs: | |
permissions: | ||
contents: read | ||
id-token: write | ||
env: | ||
input_version: ${{ github.event.inputs.version }} | ||
input_rfc: ${{ github.event.inputs.rfc }} | ||
input_cluster: ${{ github.event.inputs.cluster }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: abatilo/[email protected] | ||
- run: sudo apt-get -y install jq | ||
- run: | | ||
sudo apt-get -y install jq | ||
poetry install | ||
- uses: UWIT-IAM/actions/[email protected] | ||
with: | ||
gcloud-token: ${{ secrets.GCR_TOKEN }} | ||
|
||
# When performing an automated dry run from a push, we will be running using | ||
# the basic default command of: ./deploy-sh --dry-run --target-cluster dev | ||
- if: github.event_name == 'push' && github.ref == 'refs/heads/dry-run-deploy' | ||
- if: github.ref != 'refs/heads/main' | ||
run: | | ||
echo "DRY_RUN=true" >> $GITHUB_ENV | ||
echo "deployment_qualifier='[DRY_RUN]'" >> $GITHUB_ENV | ||
echo "deployment_qualifier=[DRY_RUN]" >> $GITHUB_ENV | ||
name: Configure dry run deployment | ||
|
||
# When pushing from the Github UI, we will fill in the values | ||
# provided by the user. | ||
- if: github.event_name == 'workflow_dispatch' | ||
run: | | ||
echo "DRY_RUN=${{ github.event.inputs.dry-run }}" >> $GITHUB_ENV | ||
echo "target_cluster=${{ github.event.inputs.cluster }}" >> $GITHUB_ENV | ||
echo "target_version=${{ github.event.inputs.version }}" >> $GITHUB_ENV | ||
echo "rfc_number=${{ github.event.inputs.rfc }}" >> $GITHUB_ENV | ||
if [[ -n "${{ github.event.inputs.rfc }}" ]] | ||
then | ||
qualifier="[RFC-${{ github.event.inputs.rfc }}]" | ||
echo "deployment_qualifier=${qualifier}" >> $GITHUB_ENV | ||
fi | ||
id: configure-env | ||
name: Configure manual deployment | ||
|
||
- name: Update env with promotion version | ||
# This runs as a separate step so that the entrypoint (manual vs. auto) | ||
# doesn't matter. | ||
run: | | ||
source ./scripts/globals.sh | ||
target_version=$(get_promotion_version ${{ inputs.cluster }}) | ||
echo "target_version=${target_version}" >> $GITHUB_ENV | ||
if: '! env.target_version' | ||
if: env.target_version == '' | ||
|
||
- name: Configure slack notification canvas | ||
id: configure-canvas | ||
|
@@ -82,25 +71,26 @@ jobs: | |
id: slack | ||
name: Create slack notification canvas | ||
|
||
- run: | | ||
echo "CURRENT_STEP=deploy" >> $GITHUB_ENV | ||
name: Set up slack notification env | ||
- uses: uwit-iam/actions/[email protected] | ||
with: | ||
command: add-artifact | ||
description: ${{ steps.configure-canvas.outputs.context-artifact }} | ||
name: Add context artifact to slack | ||
|
||
- run: | | ||
${STEP_SCRIPTS}/deploy.sh | ||
./scripts/deploy.sh \ | ||
-g \ | ||
-v ${{ env.target_version }} \ | ||
-t ${{ env.target_cluster }} \ | ||
-r "${{ github.event.inputs.rfc }}" \ | ||
${{ env.DRY_RUN == 'true' && '-x' || '' }} | ||
id: deploy | ||
name: Deploy version ${{ env.target_version }} | ||
- uses: uwit-iam/actions/[email protected] | ||
with: | ||
command: update-workflow | ||
step-id: ${{ env.CURRENT_STEP }} | ||
step-id: deploy | ||
step-status: succeeded | ||
|
||
- if: always() && steps.slack.outputs.canvas-id | ||
|
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,13 +1,18 @@ | ||
[tool.poetry] | ||
name = "uw-husky-directory" | ||
version = "2.2.2" | ||
version = "2.2.3" | ||
description = "An updated version of the UW Directory" | ||
authors = ["Thomas Thorogood <[email protected]>"] | ||
license = "MIT" | ||
|
||
[tool.poetry.dependencies] | ||
python = ">=3.8,<3.9" | ||
Flask = "^2.1" | ||
# Flask 2.2.0 broke our builds; there were several dependencies | ||
# that broke, which means Flask broke the semver contract. | ||
# Flask will remain pinned to <2.2 until someone else attempts | ||
# to upgrade at a later Flask revision in hopes they | ||
# straightened out their issues | ||
Flask = ">=2.1,<2.2" | ||
injector = "^0.19.0" | ||
Flask-Injector = "^0.13.0" | ||
pydantic = {extras = ["email", "dotenv"], version = "^1.8.1"} | ||
|
@@ -21,7 +26,7 @@ uw-saml = {version = "^1.1.0"} | |
Flask-Session = "^0.3.2" | ||
redis = "^4.1.0" | ||
pytz = "^2022.1" | ||
prometheus-flask-exporter = "^0.19" | ||
prometheus-flask-exporter = "^0.20" | ||
Flask-HTTPAuth = "^4.4.0" | ||
python-Levenshtein = "^0.12.2" | ||
uw-it-flask-gunicorn-json-logger = "^0.1.6" | ||
|
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