Skip to content

Commit

Permalink
chore: add release workflow, wait for certain passes
Browse files Browse the repository at this point in the history
  • Loading branch information
drewbo committed Jun 24, 2024
1 parent 0dfbcfe commit a57ea33
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 3 deletions.
47 changes: 47 additions & 0 deletions .cz.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"commitizen": {
"name": "cz_customize",
"version_scheme": "semver",
"version_provider": "scm",
"update_changelog_on_bump": true,
"major_version_zero": false,
"bump_message": "chore: release $new_version",
"gpg_sign": true,
"changelog_incremental": true,
"customize": {
"message_template": "{{change_type}}:{% if show_message %} {{message}}{% endif %}",
"example": "feat: this feature enable customize through config file",
"schema": "<type>: <body>",
"schema_pattern": "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(\\([\\w\\-\\.]+\\))?(!)?: ([\\w \\-'])+([\\s\\S]*)",
"bump_pattern": "^(.+!|BREAKING CHANGE|chore|docs|feat|fix|perf|refactor|revert|style|test)(\\([\\w\\-\\.]+\\))?:",
"bump_map": {
".+!": "MAJOR",
"BREAKING CHANGE": "MAJOR",
"feat": "MINOR",
"fix": "PATCH",
"chore": "PATCH",
"docs": "PATCH",
"perf": "PATCH",
"refactor": "PATCH",
"revert": "MINOR",
"style": "PATCH",
"test": "PATCH"
},
"change_type_order": ["Breaking Changes", "Added", "Fixed", "Performance", "Reverted", "Maintenance", "Documentation"],
"commit_parser": "^((?P<change_type>chore|docs|feat|fix|perf|refactor|revert|style|test|BREAKING CHANGE)(?:\\((?P<scope>[^()\r\n]*)\\)|\\()?(?P<breaking>!)?|\\w+!):\\s(?P<message>.*)?",
"changelog_pattern": "^(.+!|BREAKING CHANGE|chore|docs|feat|fix|perf|refactor|revert|style|test)(\\([\\w\\-\\.]+\\))?:",
"change_type_map": {
"BREAKING CHANGE": "Breaking Changes",
"chore": "Maintenance",
"docs": "Documentation",
"feat": "Added",
"fix": "Fixed",
"perf": "Performance",
"refactor": "Maintenance",
"revert": "Reverted",
"style": "Maintenance",
"test": "Maintenance"
}
}
}
}
12 changes: 11 additions & 1 deletion ci/pipeline-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
resource: src-((deploy-env))-tagged
trigger: true
params: { depth: 1 }
passed: [set-pipeline]
- get: python
- task: test
image: python
Expand All @@ -43,7 +44,7 @@ jobs:
resource: src-((deploy-env))-tagged
trigger: true
params: { depth: 1 }
passed: [test-((deploy-env))]
passed: [test-((deploy-env)), audit-dependencies]
- get: general-task
- get: oci-build-task
- task: build
Expand Down Expand Up @@ -84,6 +85,15 @@ jobs:
on_failure: #@ slack_hook("failure", "dependency audit")
on_success: #@ slack_hook("success", "dependency audit")

- name: release
plan:
- get: src
resource: src-((deploy-env))-tagged
params: { depth: 1 }
trigger: true
passed: [deploy-((deploy-env))]
- #@ template.replace(data.values.release_steps)

#! RESOURCES

resources:
Expand Down
17 changes: 15 additions & 2 deletions ci/pipeline-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,24 @@ jobs:
instance_vars:
deploy-env: ((deploy-env))

- name: update-release-branch
plan:
- get: src
resource: src-((deploy-env))
trigger: true
- get: general-task
- get: pipeline-tasks
- task: update-release-branch
image: general-task
file: pipeline-tasks/tasks/update-release-branch.yml

- name: test-((deploy-env))
plan:
- get: src
resource: src-((deploy-env))
trigger: true
params: { depth: 1 }
passed: [set-pipeline]
- get: python
- task: test
image: python
Expand All @@ -43,7 +55,7 @@ jobs:
resource: src-((deploy-env))
trigger: true
params: { depth: 1 }
passed: [test-((deploy-env))]
passed: [test-((deploy-env)), audit-dependencies]
- get: general-task
- get: oci-build-task
- task: build
Expand Down Expand Up @@ -91,9 +103,10 @@ resources:
type: git
icon: github
source:
uri: ((git-base-url))/((build-container-repository-path))
uri: git@github.com:/((build-container-repository-path))
branch: main
commit_verification_keys: ((cloud-gov-pages-gpg-keys))
private_key: ((pages-gpg-operations-github-sshkey.private_key))

- name: image-repository
type: registry-image
Expand Down

0 comments on commit a57ea33

Please sign in to comment.