-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71 from cloud-gov/update-django-4
Update to support Django 4
- Loading branch information
Showing
23 changed files
with
274 additions
and
116 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
|
@@ -4,16 +4,16 @@ Here's how to issue a new release: | |
|
||
1. Bump the version number in `uaa_client/__init__.py`. | ||
|
||
2. Move the "unreleased" section to a new version entry in | ||
1. Move the "unreleased" section to a new version entry in | ||
`CHANGELOG.md`. | ||
|
||
3. From the project root, install dependencies and run automated tests: | ||
1. From the project root, install dependencies and run automated tests: | ||
|
||
```shell | ||
tox | ||
``` | ||
|
||
4. Run the following to ensure that everything builds and | ||
1. Run the following to ensure that everything builds and | ||
installs OK in an isolated environment: | ||
|
||
```shell | ||
|
@@ -25,10 +25,10 @@ Here's how to issue a new release: | |
You should be able to visit <http://localhost:8000> and log in | ||
as `[email protected]` without any problems. | ||
|
||
5. Commit and push your changes with a commit message like | ||
1. Commit and push your changes with a commit message like | ||
"Bump version to v1.0.4." | ||
|
||
6. Tag your version and push it to GitHub. For instance, if you're | ||
1. Tag your version and push it to GitHub. For instance, if you're | ||
releasing v1.0.4, do: | ||
|
||
```shell | ||
|
@@ -41,7 +41,7 @@ Here's how to issue a new release: | |
`CHANGELOG.md` for this, as whatever you enter will | ||
show up on the [GitHub releases page][]. | ||
|
||
7. If you haven't already done so, create a `~/.pypirc` file | ||
1. If you haven't already done so, create a `~/.pypirc` file | ||
with the following content: | ||
|
||
```conf | ||
|
@@ -55,7 +55,7 @@ Here's how to issue a new release: | |
password: <your password> | ||
``` | ||
|
||
8. Run `python -m twine upload dist/*`. The new release should now | ||
1. Run `python -m twine upload dist/*`. The new release should now | ||
be visible on [pypi][]. | ||
|
||
[GitHub releases page]: https://github.com/18F/cg-django-uaa/releases | ||
|
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 |
---|---|---|
@@ -0,0 +1,149 @@ | ||
--- | ||
jobs: | ||
|
||
- name: run-tests | ||
plan: | ||
- in_parallel: | ||
- get: cg-django-uaa-pr | ||
trigger: true | ||
- get: general-task | ||
- put: cg-django-uaa-pr | ||
params: | ||
path: cg-django-uaa-pr | ||
status: pending | ||
- task: run-tests | ||
image: general-task | ||
file: cg-django-uaa-pr/ci/run-tests.yml | ||
on_failure: | ||
put: cg-django-uaa-pr | ||
params: | ||
path: cg-django-uaa-pr | ||
status: failure | ||
on_success: | ||
put: cg-django-uaa-pr | ||
params: | ||
path: cg-django-uaa-pr | ||
status: success | ||
|
||
- name: set-self | ||
plan: | ||
- get: cg-django-uaa-repo-tag | ||
trigger: true | ||
- set_pipeline: self | ||
file: cg-django-uaa-repo-tag/ci/pipeline.yml | ||
|
||
- name: create-release | ||
plan: | ||
- get: cg-django-uaa-repo-tag | ||
passed: [set-self] | ||
trigger: true | ||
- task: prepare-release | ||
file: cg-django-uaa-repo-tag/ci/prepare-release.yml | ||
# - put: cg-django-uaa-release | ||
# params: | ||
# name: cg-django-uaa-repo-tag/tag | ||
# tag: cg-django-uaa-repo-tag/tag | ||
# generate_release_notes: true | ||
on_failure: | ||
put: slack | ||
params: | ||
text: | | ||
:x: FAILED to release cg-django-uaa | ||
<$ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME|View build details> | ||
channel: ((slack-failure-channel)) | ||
username: ((slack-username)) | ||
icon_url: ((slack-icon-url)) | ||
on_success: | ||
put: slack | ||
params: | ||
text: | | ||
:white_check_mark: Successfully released cg-django-uaa | ||
<$ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME|View build details> | ||
channel: ((slack-success-channel)) | ||
username: ((slack-username)) | ||
icon_url: ((slack-icon-url)) | ||
|
||
resources: | ||
- name: cg-django-uaa-pr | ||
type: pull-request | ||
check_every: 1m | ||
source: | ||
repository: cloud-gov/cg-django-uaa | ||
access_token: ((status-access-token)) | ||
disable_forks: true | ||
|
||
# this resource is this repo | ||
# NOTE: we only execute on tag changes not commits, see tag_regex | ||
- name: cg-django-uaa-repo-tag | ||
type: git | ||
source: | ||
uri: https://github.com/cloud-gov/cg-django-uaa.git | ||
branch: update-django-4 | ||
# only run on new tags matching pattern like: v0.1.5 | ||
# tag_regex: '^v([0-9]+\.){0,2}(\*|[0-9]+)$' | ||
commit_verification_keys: ((cloud-gov-pgp-keys)) | ||
|
||
# This resource for posting to slack | ||
- name: slack | ||
type: slack-notification | ||
source: | ||
url: ((slack-webhook-url)) | ||
|
||
# Resource for creating a new release | ||
# - name: cg-django-uaa-release | ||
# type: github-release | ||
# source: | ||
# owner: cloud-gov | ||
# repository: cg-django-uaa | ||
# access_token: ((cg-ci-bot-ghtoken)) | ||
|
||
- name: general-task | ||
type: registry-image | ||
source: | ||
aws_access_key_id: ((ecr_aws_key)) | ||
aws_secret_access_key: ((ecr_aws_secret)) | ||
repository: general-task | ||
aws_region: us-gov-west-1 | ||
tag: latest | ||
|
||
resource_types: | ||
- name: registry-image | ||
type: registry-image | ||
source: | ||
aws_access_key_id: ((ecr_aws_key)) | ||
aws_secret_access_key: ((ecr_aws_secret)) | ||
repository: registry-image-resource | ||
aws_region: us-gov-west-1 | ||
tag: latest | ||
|
||
- name: slack-notification | ||
type: registry-image | ||
source: | ||
aws_access_key_id: ((ecr_aws_key)) | ||
aws_secret_access_key: ((ecr_aws_secret)) | ||
repository: slack-notification-resource | ||
aws_region: us-gov-west-1 | ||
tag: latest | ||
|
||
- name: git | ||
type: registry-image | ||
source: | ||
aws_access_key_id: ((ecr_aws_key)) | ||
aws_secret_access_key: ((ecr_aws_secret)) | ||
repository: git-resource | ||
aws_region: us-gov-west-1 | ||
tag: latest | ||
|
||
- name: pull-request | ||
type: registry-image | ||
source: | ||
aws_access_key_id: ((ecr_aws_key)) | ||
aws_secret_access_key: ((ecr_aws_secret)) | ||
repository: github-pr-resource | ||
aws_region: us-gov-west-1 | ||
tag: latest | ||
|
||
- name: github-release | ||
type: registry-image | ||
source: | ||
repository: concourse/github-release-resource |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
|
||
TAG=$(git describe --tags) | ||
echo "$TAG" > tag |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
platform: linux | ||
|
||
inputs: | ||
- name: cg-django-uaa-repo-tag | ||
|
||
outputs: | ||
- name: cg-django-uaa-repo-tag | ||
|
||
run: | ||
dir: cg-django-uaa-repo-tag | ||
path: ci/prepare-release.sh |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
python -m venv venv | ||
source ./venv/bin/activate | ||
|
||
python -m pip install -r requirements-tests.txt | ||
python -m pip install -e . | ||
|
||
# run tests | ||
tox |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
platform: linux | ||
|
||
inputs: | ||
- name: cg-django-uaa-pr | ||
|
||
run: | ||
dir: cg-django-uaa-pr | ||
path: ci/run-tests.sh |
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
Oops, something went wrong.