-
Notifications
You must be signed in to change notification settings - Fork 1
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 #1211 from DFE-Digital/aks-pipeline2
AKS pipeline for RSM review app
- Loading branch information
Showing
7 changed files
with
170 additions
and
2 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,56 @@ | ||
name: Deploy environment to AKS | ||
description: Deploys an application environment to AKS | ||
|
||
inputs: | ||
environment: | ||
description: The name of the environment | ||
required: true | ||
image-tag: | ||
description: The image tag to deploy | ||
required: true | ||
azure-credentials: | ||
description: JSON object containing a service principal that can read from Azure Key Vault | ||
required: true | ||
pull-request-number: | ||
description: The pull request number which triggered this deploy. | ||
required: false | ||
|
||
outputs: | ||
environment_url: | ||
description: The base URL for the deployed environment | ||
value: ${{ steps.set_outputs.outputs.ENVIRONMENT_URL }} | ||
|
||
runs: | ||
using: composite | ||
|
||
steps: | ||
- uses: hashicorp/setup-terraform@v3 | ||
with: | ||
terraform_version: 1.6.4 | ||
terraform_wrapper: false | ||
|
||
- uses: DFE-Digital/github-actions/set-kubelogin-environment@master | ||
with: | ||
azure-credentials: ${{ inputs.azure-credentials }} | ||
|
||
- name: Terraform Apply | ||
shell: bash | ||
run: | | ||
make ci ${{ inputs.environment }} aks-terraform-apply | ||
env: | ||
DOCKER_IMAGE_TAG: ${{ inputs.image-tag }} | ||
PR_NUMBER: ${{ inputs.pull-request-number }} | ||
|
||
- name: Extract Terraform outputs | ||
shell: bash | ||
id: set_outputs | ||
run: | | ||
environment_url=$(terraform -chdir=terraform/application output -raw url) | ||
echo "ENVIRONMENT_URL=$environment_url" >> $GITHUB_OUTPUT | ||
- name: Run smoke tests | ||
shell: bash | ||
run: | | ||
environment_url=$(terraform -chdir=terraform/application output -raw url) | ||
echo "Check health for $environment_url/health/all.json..." | ||
curl -sS --fail "$environment_url/health/all.json" > /dev/null && echo "Health check passed for $environment_url" || echo "Health check failed for $environment_url" |
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,27 @@ | ||
### Context | ||
|
||
<!-- Why are you making this change? --> | ||
|
||
### Changes proposed in this pull request | ||
|
||
<!-- Include a summary of the change. --> | ||
<!-- Why this particular solution? --> | ||
<!-- What assumptions have you made? --> | ||
<!-- Are there any side effects to note? --> | ||
<!-- If there are UI changes, please include Before and After screenshots. --> | ||
|
||
### Guidance to review | ||
|
||
<!-- How could someone else check this work? --> | ||
<!-- Which parts do you want more feedback on? --> | ||
|
||
### Link to Trello card | ||
|
||
<!-- http://trello.com/123-example-card --> | ||
|
||
### Checklist | ||
|
||
- [ ] Attach to Trello card | ||
- [ ] Rebased main | ||
- [ ] Cleaned commit history | ||
- [ ] Tested by running locally |
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
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