Skip to content
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

Deploy to prod #912

Merged
merged 80 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
1252270
Bump django from 4.2.16 to 4.2.17
dependabot[bot] Dec 5, 2024
cf9556e
Use release-drafter action draft releases and notes
amstilp Dec 6, 2024
84fb3ce
Merge pull request #863 from UW-GAC/maint/release-drafter
amstilp Dec 6, 2024
ef3817d
Bump django from 4.2.16 to 4.2.17 in /requirements
dependabot[bot] Dec 6, 2024
363fe24
Compile requirements files
dependabot[bot] Dec 6, 2024
0761032
Bump ruff from 0.8.1 to 0.8.3
dependabot[bot] Dec 13, 2024
0e45372
Add a custome message after a user links their account which indicate…
wkirdp Dec 16, 2024
99074c6
Merge pull request #869 from UW-GAC/feature/better-message-after-acco…
amstilp Dec 17, 2024
f34cc1c
Bump codecov/codecov-action from 5.0.7 to 5.1.2
dependabot[bot] Dec 19, 2024
52a1258
Merge pull request #865 from UW-GAC/pip-tools/update-requirements-fil…
amstilp Dec 19, 2024
1bc6dc2
Merge dependabot/github_actions/codecov/codecov-action-5.1.2 into com…
github-actions[bot] Dec 19, 2024
9debe46
Merge dependabot/pip/ruff-0.8.3 into combined-prs-branch
github-actions[bot] Dec 19, 2024
58fa0af
Merge dependabot/pip/requirements/django-4.2.17 into combined-prs-branch
github-actions[bot] Dec 19, 2024
3144cfe
Merge dependabot/pip/django-4.2.17 into combined-prs-branch
github-actions[bot] Dec 19, 2024
daf4258
Merge pull request #872 from UW-GAC/combined-prs-branch
amstilp Dec 19, 2024
8fce1a7
Bump actions/upload-artifact from 4.4.3 to 4.5.0
dependabot[bot] Dec 19, 2024
4c23cd5
Bump django-allauth from 65.3.0 to 65.3.1
dependabot[bot] Dec 26, 2024
8618c36
Bump mypy from 1.13.0 to 1.14.1
dependabot[bot] Dec 31, 2024
7ac1719
Bump ruff from 0.8.3 to 0.8.6
dependabot[bot] Jan 6, 2025
85394dd
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jan 6, 2025
b49bf72
Merge dependabot/pip/ruff-0.8.6 into combined-prs-branch
github-actions[bot] Jan 6, 2025
070c134
Merge dependabot/pip/mypy-1.14.1 into combined-prs-branch
github-actions[bot] Jan 6, 2025
68bc489
Merge dependabot/pip/django-allauth-65.3.1 into combined-prs-branch
github-actions[bot] Jan 6, 2025
4c0322d
Merge dependabot/github_actions/actions/upload-artifact-4.5.0 into co…
github-actions[bot] Jan 6, 2025
0882a2c
Merge pull request #879 from UW-GAC/combined-prs-branch
amstilp Jan 6, 2025
d127146
Bump jinja2 from 3.1.4 to 3.1.5 in /requirements
dependabot[bot] Jan 6, 2025
dc39237
Compile requirements files
dependabot[bot] Jan 6, 2025
d3230c4
Merge pull request #866 from UW-GAC/pre-commit-ci-update-config
amstilp Jan 6, 2025
6819b13
Merge pull request #881 from UW-GAC/pip-tools/update-requirements-fil…
amstilp Jan 6, 2025
f958e6d
Merge pull request #880 from UW-GAC/dependabot/pip/requirements/jinja…
amstilp Jan 6, 2025
5b29219
Bump mysqlclient from 2.2.6 to 2.2.7
dependabot[bot] Jan 13, 2025
d57661e
Bump virtualenv from 20.25.1 to 20.26.6 in /requirements
dependabot[bot] Jan 13, 2025
738a6b5
Compile requirements files
dependabot[bot] Jan 13, 2025
652bbd8
Bump django-environ from 0.10.0 to 0.12.0
dependabot[bot] Jan 14, 2025
614c166
Bump responses from 0.25.3 to 0.25.6
dependabot[bot] Jan 14, 2025
3b40b4d
Bump django-debug-toolbar from 4.4.6 to 5.0.1
dependabot[bot] Jan 14, 2025
d51d178
Bump django-constance from 4.1.3 to 4.2.0
dependabot[bot] Jan 15, 2025
a7bd030
Bump django from 4.2.17 to 4.2.18
dependabot[bot] Jan 15, 2025
51fdca7
Bump ruff from 0.8.6 to 0.9.2
dependabot[bot] Jan 17, 2025
408ded2
Bump pre-commit from 4.0.1 to 4.1.0
dependabot[bot] Jan 21, 2025
f09f40f
Bump codecov/codecov-action from 5.1.2 to 5.2.0
dependabot[bot] Jan 23, 2025
27bfc55
Bump tablib from 3.7.0 to 3.8.0
dependabot[bot] Jan 23, 2025
19e57f1
Merge pull request #889 from UW-GAC/pip-tools/update-requirements-fil…
amstilp Jan 24, 2025
85dc7bb
Merge dependabot/pip/tablib-3.8.0 into combined-prs-branch
github-actions[bot] Jan 24, 2025
1420339
Merge dependabot/github_actions/codecov/codecov-action-5.2.0 into com…
github-actions[bot] Jan 24, 2025
fb657e9
Merge dependabot/pip/pre-commit-4.1.0 into combined-prs-branch
github-actions[bot] Jan 24, 2025
ea4a50a
Merge dependabot/pip/ruff-0.9.2 into combined-prs-branch
github-actions[bot] Jan 24, 2025
76bd3f0
Merge dependabot/pip/django-4.2.18 into combined-prs-branch
github-actions[bot] Jan 24, 2025
79394dc
Merge dependabot/pip/django-constance-4.2.0 into combined-prs-branch
github-actions[bot] Jan 24, 2025
952f32e
Merge dependabot/pip/django-debug-toolbar-5.0.1 into combined-prs-branch
github-actions[bot] Jan 24, 2025
f982020
Merge dependabot/pip/responses-0.25.6 into combined-prs-branch
github-actions[bot] Jan 24, 2025
ca9c86c
Merge dependabot/pip/django-environ-0.12.0 into combined-prs-branch
github-actions[bot] Jan 24, 2025
ba83fa8
Merge dependabot/pip/requirements/virtualenv-20.26.6 into combined-pr…
github-actions[bot] Jan 24, 2025
1d0d27f
Merge dependabot/pip/mysqlclient-2.2.7 into combined-prs-branch
github-actions[bot] Jan 24, 2025
24b1392
Merge pull request #899 from UW-GAC/combined-prs-branch
amstilp Jan 24, 2025
7e74778
Bump actions/upload-artifact from 4.5.0 to 4.6.0
dependabot[bot] Jan 24, 2025
552dea6
Merge pull request #883 from UW-GAC/dependabot/github_actions/actions…
amstilp Jan 24, 2025
8db8fd5
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Feb 3, 2025
6a3be86
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 3, 2025
801fee7
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 4, 2025
390edd7
Merge pull request #887 from UW-GAC/pre-commit-ci-update-config
amstilp Feb 5, 2025
c683f07
Bump actions/setup-python from 5.3.0 to 5.4.0
dependabot[bot] Feb 5, 2025
070ef6e
Bump factory-boy from 3.3.1 to 3.3.3
dependabot[bot] Feb 5, 2025
7ed2424
Bump ruff from 0.9.2 to 0.9.4
dependabot[bot] Feb 5, 2025
469487e
Bump django-constance from 4.2.0 to 4.3.1
dependabot[bot] Feb 5, 2025
68c58c2
Bump django-simple-history from 3.7.0 to 3.8.0
dependabot[bot] Feb 5, 2025
7772761
Merge dependabot/pip/factory-boy-3.3.3 into combined-prs-branch
github-actions[bot] Feb 5, 2025
9a77fb7
Merge dependabot/pip/ruff-0.9.4 into combined-prs-branch
github-actions[bot] Feb 5, 2025
b9882a6
Merge dependabot/github_actions/actions/setup-python-5.4.0 into combi…
github-actions[bot] Feb 5, 2025
f47bda1
Merge dependabot/pip/django-constance-4.3.1 into combined-prs-branch
github-actions[bot] Feb 5, 2025
3212f39
Merge dependabot/pip/django-simple-history-3.8.0 into combined-prs-br…
github-actions[bot] Feb 5, 2025
0e05299
Merge pull request #908 from UW-GAC/combined-prs-branch
amstilp Feb 5, 2025
42c08a7
Bump codecov/codecov-action from 5.2.0 to 5.3.1
dependabot[bot] Feb 5, 2025
7287151
Merge pull request #903 from UW-GAC/dependabot/github_actions/codecov…
amstilp Feb 5, 2025
4ba7891
Update ACM version in requirements.in file
amstilp Feb 5, 2025
b5e5fd3
Add new ACM auditor app to installed apps
amstilp Feb 5, 2025
c217176
Compile requirements files
amstilp Feb 5, 2025
77a52f3
Merge pull request #910 from UW-GAC/pip-tools/update-requirements-fil…
amstilp Feb 5, 2025
e889c66
Merge pull request #909 from UW-GAC/maint/acm-v0.28
amstilp Feb 5, 2025
69a18b3
Merge pull request #911 from UW-GAC/main
amstilp Feb 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
sort-direction: ascending

categories:
- title: "⬆️ Dependencies"
labels:
- "dependencies"
- "update-requirements-files"
- "combined-pr"

template: |
## What’s Changed

$CHANGES
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
uses: actions/[email protected]

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5.3.0
uses: actions/setup-python@v5.4.0
with:
python-version: ${{ matrix.python-version }}
cache: pip
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
run: ls -lhta

- name: Upload coverage data
uses: actions/upload-artifact@v4.4.3
uses: actions/upload-artifact@v4.6.0
with:
name: coverage-data-${{ strategy.job-index }}
path: coverage-${{ strategy.job-index }}
Expand All @@ -114,7 +114,7 @@ jobs:
uses: actions/[email protected]

- name: Set up Python
uses: actions/setup-python@v5.3.0
uses: actions/setup-python@v5.4.0
with:
python-version: '3.10'

Expand All @@ -140,6 +140,6 @@ jobs:
python -m coverage report

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5.0.7
uses: codecov/codecov-action@v5.3.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/pip-compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
ref: ${{ github.head_ref }}

- name: Set up Python
uses: actions/setup-python@v5.3.0
uses: actions/setup-python@v5.4.0
with:
python-version: "3.10"

Expand Down
114 changes: 114 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
name: Release Drafter

on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- deploy/production

permissions:
contents: read

jobs:
update_release_draft:
permissions:
# write permission is required to create a github release
contents: write
# write permission is required for autolabeler
# otherwise, read permission is required at least
pull-requests: read
runs-on: ubuntu-latest
steps:

- name: Get current date
id: get-date
run: |
export CURRENT_DATE=$(TZ=":America/Los_Angeles" date "+%Y-%m-%d")
echo "current_date=${CURRENT_DATE}" >> $GITHUB_OUTPUT
echo "Current date set to ${CURRENT_DATE}"

- name: Get number of releases for the current date
id: get-release-count
run: |
export RELEASE_COUNT=$(gh release list \
--repo ${{ github.repository }} \
--json tagName \
--exclude-drafts \
--jq "map(select(.tagName | startswith(\"${CURRENT_DATE}\")))|length" \
)
echo "release_count=${RELEASE_COUNT}" >> $GITHUB_OUTPUT
echo "Found ${RELEASE_COUNT} releases"
env:
CURRENT_DATE: ${{ steps.get-date.outputs.current_date }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Prepare release version
id: get-version
run: |
export VERSION="${CURRENT_DATE}"

if [ $RELEASE_COUNT -gt 0 ]; then
echo "Release already exists for version ${VERSION}"
echo "Appending release count to version"
export VERSION="${CURRENT_DATE}-${RELEASE_COUNT}"
fi

echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "Version set to ${VERSION}"
env:
CURRENT_DATE: ${{ steps.get-date.outputs.current_date }}
RELEASE_COUNT: ${{ steps.get-release-count.outputs.release_count }}


- name: Check that version doesn't exist
id: check-release
run: |
echo "Checking version ${VERSION}"

export CHECK=$(gh release list \
--repo ${{ github.repository }} \
--json tagName \
--exclude-drafts \
--jq "map(select(.tagName == \"${VERSION}\"))|length" \
)
echo "Found ${CHECK} releases"

if [ $CHECK -gt 0 ]; then
echo "Release already exists for version ${VERSION}"
exit 1
fi
env:
VERSION: ${{ steps.get-version.outputs.version }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Check that tag doesn't exist
id: check-tag
run: |
echo "Checking tag for version ${VERSION}"

# Query the API for this tag.
export CHECK=$(gh api \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/${{ github.repository }}/tags \
--jq "map(select(.name == \"${VERSION}\"))|length" \
)
echo "Found ${CHECK} tags"

if [ $CHECK -gt 0 ]; then
echo "Tag already exists for version ${VERSION}"
exit 1
fi
env:
VERSION: ${{ steps.get-version.outputs.version }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}


- uses: release-drafter/release-drafter@v6
with:
commitish: deploy/production
tag: ${{ steps.get-version.outputs.version }}
name: ${{ steps.get-version.outputs.version }}
version: ${{ steps.get-version.outputs.version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repos:

- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.8.1
rev: v0.9.4
hooks:
# Run the linter.
- id: ruff
Expand All @@ -21,7 +21,7 @@ repos:
- id: ruff-format

- repo: https://github.com/gitleaks/gitleaks
rev: v8.21.2
rev: v8.23.3
hooks:
- id: gitleaks

Expand Down
3 changes: 2 additions & 1 deletion config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@

LOCAL_APPS = [
"anvil_consortium_manager",
"anvil_consortium_manager.auditor",
"primed.users.apps.UsersConfig",
# Your stuff: custom apps go here
"primed.drupal_oauth_provider",
Expand Down Expand Up @@ -264,7 +265,7 @@
LOGGING = {
"version": 1,
"disable_existing_loggers": False,
"formatters": {"verbose": {"format": "%(levelname)s %(asctime)s %(module)s " "%(process)d %(thread)d %(message)s"}},
"formatters": {"verbose": {"format": "%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s"}},
"handlers": {
"console": {
"level": "DEBUG",
Expand Down
2 changes: 1 addition & 1 deletion config/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
"()": "maintenance_mode.logging.RequireNotMaintenanceMode503",
},
},
"formatters": {"verbose": {"format": "%(levelname)s %(asctime)s %(module)s " "%(process)d %(thread)d %(message)s"}},
"formatters": {"verbose": {"format": "%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s"}},
"handlers": {
"mail_admins": {
"level": "ERROR",
Expand Down
Loading