Skip to content

Commit

Permalink
add smoke test to workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
johnake committed Sep 11, 2023
1 parent c9bdb91 commit da94aa7
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 22 deletions.
37 changes: 19 additions & 18 deletions .github/workflows/actions/smoke-test-v2/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,27 @@ runs:
run: |
tf_vars_file=terraform/aks/workspace_variables/${{ inputs.environment }}.tfvars.json
echo "APP_KEY_VAULT=$(jq -r '.app_key_vault' ${tf_vars_file})" >> $GITHUB_ENV
echo "AKS_SPACE=$(jq -r '.aks_space' ${tf_vars_file})" >> $GITHUB_ENV
- uses: azure/CLI@v1
- name: Retrieve Secrets from KV
uses: azure/CLI@v1
id: retrieve-secrets
run: |
HOSTING_DOMAIN=$(az keyvault secret show --name HOSTING_DOMAIN --vault-name "${{ env.APP_KEY_VAULT}}" --query 'value' -o tsv)
echo "::add-mask::$HOSTING_DOMAIN"
echo "::set-output name=HOSTING_DOMAIN::$HOSTING_DOMAIN"
GOVUK_NOTIFY_API_KEY=$(az keyvault secret show --name GOVUK_NOTIFY_API_KEY --vault-name "${{ env.APP_KEY_VAULT}}" --query 'value' -o tsv)
echo "::add-mask::$GOVUK_NOTIFY_API_KEY"
echo "::set-output name=GOVUK_NOTIFY_API_KEY::$GOVUK_NOTIFY_API_KEY"
HOSTING_ENVIRONMENT_NAME=$(az keyvault secret show --name HOSTING_ENVIRONMENT_NAME --vault-name "${{ env.APP_KEY_VAULT}}" --query 'value' -o tsv)
echo "::add-mask::$HOSTING_ENVIRONMENT_NAME"
echo "::set-output name=HOSTING_ENVIRONMENT_NAME::$HOSTING_ENVIRONMENT_NAME"
SUPPORT_USERNAME=$(az keyvault secret show --name SUPPORT_USERNAME --vault-name "${{ env.APP_KEY_VAULT}}" --query 'value' -o tsv)
echo "::add-mask::$SUPPORT_USERNAME"
echo "::set-output name=SUPPORT_USERNAME::$SUPPORT_USERNAME"
SUPPORT_PASSWORD=$(az keyvault secret show --name SUPPORT_PASSWORD --vault-name "${{ env.APP_KEY_VAULT}}" --query 'value' -o tsv)
echo "::add-mask::$SUPPORT_PASSWORD"
echo "::set-output name=SUPPORT_PASSWORD::$SUPPORT_PASSWORD"
with:
inlineScript: |
HOSTING_DOMAIN=$(az keyvault secret show --name HOSTING_DOMAIN --vault-name "${{ env.APP_KEY_VAULT}}" --query 'value' -o tsv)
echo "::add-mask::$HOSTING_DOMAIN"
echo "HOSTING_DOMAIN=$HOSTING_DOMAIN" >> $GITHUB_OUTPUT
GOVUK_NOTIFY_API_KEY=$(az keyvault secret show --name GOVUK_NOTIFY_API_KEY --vault-name "${{ env.APP_KEY_VAULT}}" --query 'value' -o tsv)
echo "::add-mask::$GOVUK_NOTIFY_API_KEY"
echo "GOVUK_NOTIFY_API_KEY=$GOVUK_NOTIFY_API_KEY" >> $GITHUB_OUTPUT
HOSTING_ENVIRONMENT_NAME=$(az keyvault secret show --name HOSTING_ENVIRONMENT_NAME --vault-name "${{ env.APP_KEY_VAULT}}" --query 'value' -o tsv)
echo "::add-mask::$HOSTING_ENVIRONMENT_NAME"
echo "HOSTING_ENVIRONMENT_NAME=$HOSTING_ENVIRONMENT_NAME" >> $GITHUB_OUTPUT
SUPPORT_USERNAME=$(az keyvault secret show --name SUPPORT_USERNAME --vault-name "${{ env.APP_KEY_VAULT}}" --query 'value' -o tsv)
echo "::add-mask::$SUPPORT_USERNAME"
echo "SUPPORT_USERNAME=$SUPPORT_USERNAME" >> $GITHUB_OUTPUT
SUPPORT_PASSWORD=$(az keyvault secret show --name SUPPORT_PASSWORD --vault-name "${{ env.APP_KEY_VAULT}}" --query 'value' -o tsv)
echo "::add-mask::$SUPPORT_PASSWORD"
echo "SUPPORT_PASSWORD=$SUPPORT_PASSWORD" >> $GITHUB_OUTPUT
- name: Run deployment smoke test
shell: bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
"namespace": "tra-development",
"azure_resource_prefix": "s189t01",
"config_short": "dv",
"service_short": "faltrn"
"service_short": "faltrn",
"app_key_vault": "s189t01-faltrn-dv-app-kv"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"namespace": "tra-test",
"azure_resource_prefix": "s189t01",
"config_short": "pp",
"service_short": "faltrn"
"service_short": "faltrn",
"app_key_vault": "s189t01-faltrn-pp-app-kv"
}
3 changes: 2 additions & 1 deletion terraform/aks/workspace_variables/production_aks.tfvars.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"namespace": "tra-production",
"azure_resource_prefix": "s189p01",
"config_short": "pd",
"service_short": "faltrn"
"service_short": "faltrn",
"app_key_vault": "s189p01-faltrn-pp-app-kv"
}
3 changes: 2 additions & 1 deletion terraform/aks/workspace_variables/test_aks.tfvars.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"namespace": "tra-test",
"azure_resource_prefix": "s189t01",
"config_short": "ts",
"service_short": "faltrn"
"service_short": "faltrn",
"app_key_vault": "s189t01-faltrn-ts-app-kv"
}

0 comments on commit da94aa7

Please sign in to comment.