-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Adding [release please](https://github.com/googleapis/release-please) to ensure that we generate changelogs and versions - When merging a pull request to `main`, the following happens: - Code is deployed to the `Test` environment - A `Release-PR`, if not already created, will be created and sum up all the changes that have happened since last this PR was merged. - When merging the `Release-PR`, the following happens: - A release is created along with entries in `CHANGELOG.md` that summarize the changes since last release. - The code is deployed to the `Staging` environment - (later) A dry-run of deployment to the `Prod` environment All commits merged into `main` must now follow [Conventional commit guidelines](https://www.conventionalcommits.org/). Related to [492](#492)
- Loading branch information
Showing
13 changed files
with
268 additions
and
111 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"LABEL": { | ||
"name": "title needs formatting", | ||
"color": "EEEEEE" | ||
}, | ||
"CHECKS": { | ||
"regexp": "^(feat|fix|docs|test|ci|chore)!?(\\(.*\\))?!?:.*" | ||
}, | ||
"MESSAGES": { | ||
"success": "PR title is valid", | ||
"failure": "PR title is invalid", | ||
"notice": "PR Title needs to pass regex '^(feat|fix|docs|test|ci|chore)!?(\\(.*\\))?!?:.*" | ||
} | ||
} |
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
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,21 @@ | ||
name: "Get current version" | ||
# might use previous tag as a version instead of the current version in file | ||
# https://github.com/WyriHaximus/github-action-get-previous-tag | ||
on: | ||
workflow_call: | ||
outputs: | ||
version: | ||
description: "Version" | ||
value: ${{ jobs.get-current-version.outputs.version }} | ||
jobs: | ||
get-current-version: | ||
name: Filter | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.set-current-version.outputs.version }} | ||
steps: | ||
- name: "Checkout GitHub Action" | ||
uses: actions/checkout@v4 | ||
- name: Set current version | ||
id: set-current-version | ||
run: echo "version=$(cat version.txt)" >> $GITHUB_OUTPUT |
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 |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: CI/CD Pull Request Release Please | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
paths-ignore: | ||
- "tests/k6/**" | ||
|
||
jobs: | ||
verify-release-please-branch: | ||
if: startsWith(github.head_ref, 'release-please-') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: echo "Confirmed to be a release please branch" | ||
|
||
get-current-version: | ||
name: Get current version | ||
uses: ./.github/workflows/action-get-current-version.yml | ||
|
||
check-for-changes: | ||
name: Check for changes | ||
uses: ./.github/workflows/action-check-for-changes.yml | ||
|
||
generate-git-short-sha: | ||
name: Generate git short sha | ||
needs: [verify-release-please-branch] | ||
uses: ./.github/workflows/action-generate-git-short-sha.yml | ||
|
||
dry-run-deploy-infra-staging: | ||
name: Deploy infra to staging (dry run) | ||
needs: [generate-git-short-sha, get-current-version, check-for-changes] | ||
if: ${{ needs.check-for-changes.outputs.hasAzureChanges == 'true' }} | ||
uses: ./.github/workflows/action-deploy-infra.yml | ||
secrets: | ||
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} | ||
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} | ||
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | ||
AZURE_SOURCE_KEY_VAULT_NAME: ${{ secrets.AZURE_SOURCE_KEY_VAULT_NAME }} | ||
AZURE_SOURCE_KEY_VAULT_SUBSCRIPTION_ID: ${{ secrets.AZURE_SOURCE_KEY_VAULT_SUBSCRIPTION_ID }} | ||
AZURE_SOURCE_KEY_VAULT_RESOURCE_GROUP: ${{ secrets.AZURE_SOURCE_KEY_VAULT_RESOURCE_GROUP }} | ||
with: | ||
environment: staging | ||
region: norwayeast | ||
dryRun: true | ||
version: ${{ needs.get-current-version.outputs.version }}-${{ needs.generate-git-short-sha.outputs.gitShortSha }} | ||
|
||
dry-run-deploy-apps-staging: | ||
name: Deploy apps to staging (dry run) | ||
needs: [generate-git-short-sha, get-current-version, check-for-changes] | ||
if: ${{ needs.check-for-changes.outputs.hasBackendChanges == 'true' }} | ||
uses: ./.github/workflows/action-deploy-apps.yml | ||
secrets: | ||
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} | ||
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} | ||
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | ||
# todo: consider resolving these in another way since they are created in the infra-step | ||
AZURE_RESOURCE_GROUP_NAME: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }} | ||
AZURE_ADO_CONNECTION_STRING_SECRET_URI: ${{ secrets.AZURE_ADO_CONNECTION_STRING_SECRET_URI }} | ||
AZURE_ENVIRONMENT_KEY_VAULT_NAME: ${{ secrets.AZURE_ENVIRONMENT_KEY_VAULT_NAME }} | ||
AZURE_CONTAINER_APP_ENVIRONMENT_NAME: ${{ secrets.AZURE_CONTAINER_APP_ENVIRONMENT_NAME }} | ||
AZURE_APP_INSIGHTS_CONNECTION_STRING: ${{ secrets.AZURE_APP_INSIGHTS_CONNECTION_STRING }} | ||
AZURE_APP_CONFIGURATION_NAME: ${{ secrets.AZURE_APP_CONFIGURATION_NAME }} | ||
with: | ||
environment: staging | ||
region: norwayeast | ||
dryRun: true | ||
version: ${{ needs.get-current-version.outputs.version }}-${{ needs.generate-git-short-sha.outputs.gitShortSha }} |
Oops, something went wrong.