-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LPAL-1324: include PR number (#2163)
* LPAL-1324: include PR number * remove unnecessary contains * fix runs-on typo
- Loading branch information
1 parent
5bd5a60
commit 14248bc
Showing
1 changed file
with
9 additions
and
7 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 |
---|---|---|
|
@@ -32,6 +32,7 @@ jobs: | |
outputs: | ||
short_sha: ${{ steps.short_sha.outputs.short_sha }} | ||
safe_branch_name: ${{ steps.safe_branch_name.outputs.safe }} | ||
workspace_name: ${{ steps.set_workspace_name.outputs.workspace_name }} | ||
environment_terraform_version: ${{ steps.terraform_version_environment.outputs.version }} | ||
account_terraform_version: ${{ steps.terraform_version_account.outputs.version }} | ||
region_terraform_version: ${{ steps.terraform_version_region.outputs.version }} | ||
|
@@ -40,8 +41,11 @@ jobs: | |
- name: Set safe branch name | ||
id: safe_branch_name | ||
uses: ministryofjustice/opg-github-actions/.github/actions/[email protected] | ||
with: | ||
length: "15" | ||
|
||
- name: Set workspace name | ||
id: set_workspace_name | ||
run: | | ||
echo "workspace_name=${{ github.event.number }}${{ steps.safe_branch_name.outputs.safe }}" >> $GITHUB_OUTPUT | ||
- name: Set output to short SHA | ||
id: short_sha | ||
|
@@ -69,8 +73,6 @@ jobs: | |
with: | ||
terraform_directory: "./terraform/email" | ||
|
||
|
||
|
||
terraform_lint: | ||
name: TF - Lint | ||
needs: | ||
|
@@ -169,7 +171,7 @@ jobs: | |
with: | ||
terraform_version: ${{ needs.workflow_variables.outputs.environment_terraform_version }} | ||
use_ssh_private_key: true | ||
terraform_workspace: ${{ needs.workflow_variables.outputs.safe_branch_name }} | ||
terraform_workspace: ${{ needs.workflow_variables.outputs.workspace_name }} | ||
is_ephemeral: true | ||
workspace_manager_aws_account_id: "050256574573" | ||
workspace_manager_aws_iam_role: opg-lpa-ci | ||
|
@@ -525,15 +527,15 @@ jobs: | |
- workflow_variables | ||
- post_tests_slack_msg | ||
environment: | ||
name: "dev_${{ needs.workflow_variables.outputs.safe_branch_name }}" | ||
name: "dev_${{ needs.workflow_variables.outputs.workspace_name }}" | ||
url: "https://${{ env.FRONT_URL }}/home" | ||
env: | ||
FRONT_URL: ${{ needs.terraform_outputs.outputs.front_fqdn }} | ||
steps: | ||
- name: End of Workflow | ||
run: | | ||
if ${{ contains(needs.terraform_outputs.result, 'success') && contains(needs.post_tests_slack_msg.result, 'success') }}; then | ||
echo "${{ needs.workflow_variables.outputs.safe_branch_name }} PR environment tested, built and deployed" | ||
echo "${{ needs.workflow_variables.outputs.workspace_name }} PR environment tested, built and deployed" | ||
echo "Tag Deployed: ${{ needs.workflow_variables.outputs.short_sha }}" | ||
echo "URL: https://${{ env.FRONT_URL }}/home" | ||
exit 0 | ||
|