From ed2400049ea259208555c8dd6dd0a02de19752af Mon Sep 17 00:00:00 2001 From: Anthony Brown Date: Wed, 18 Mar 2026 15:52:36 +0000 Subject: [PATCH 1/2] use latest tag release --- .github/workflows/ci.yml | 2 +- .github/workflows/pull_request.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9a8b3f19..b5e01822 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: tag_release: needs: [quality_checks, get_commit_id, get_config_values] - uses: NHSDigital/eps-common-workflows/.github/workflows/tag-release-devcontainer.yml@update_jira + uses: NHSDigital/eps-common-workflows/.github/workflows/tag-release-devcontainer.yml@7a89b111ae752548e8e3f3fbaeb89bd6ecca0698 permissions: id-token: 'write' contents: 'write' diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 60d74070..f7569a0f 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -82,7 +82,7 @@ jobs: tag_release: if: github.event_name != 'merge_group' needs: [get_config_values] - uses: NHSDigital/eps-common-workflows/.github/workflows/tag-release-devcontainer.yml@update_jira + uses: NHSDigital/eps-common-workflows/.github/workflows/tag-release-devcontainer.yml@7a89b111ae752548e8e3f3fbaeb89bd6ecca0698 permissions: id-token: 'write' contents: 'write' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ad2bfe11..461de5d5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,7 +31,7 @@ jobs: tag_release: needs: [quality_checks, get_commit_id, get_config_values] - uses: NHSDigital/eps-common-workflows/.github/workflows/tag-release-devcontainer.yml@update_jira + uses: NHSDigital/eps-common-workflows/.github/workflows/tag-release-devcontainer.yml@7a89b111ae752548e8e3f3fbaeb89bd6ecca0698 permissions: id-token: 'write' contents: 'write' From 740738f073d0f2f5a25d59441d073d6d69d794ef Mon Sep 17 00:00:00 2001 From: Anthony Brown Date: Wed, 18 Mar 2026 15:55:09 +0000 Subject: [PATCH 2/2] remove unused things --- .github/actions/mark_jira_released/action.yml | 26 ------ .../actions/update_confluence_jira/action.yml | 89 ------------------- .github/scripts/call_mark_jira_released.sh | 14 --- .github/scripts/create_env_release_notes.sh | 18 ---- .../scripts/create_int_rc_release_notes.sh | 20 ----- .github/scripts/get_current_dev_tag.sh | 5 -- .github/scripts/get_target_deployed_tag.sh | 10 --- README.md | 11 --- 8 files changed, 193 deletions(-) delete mode 100644 .github/actions/mark_jira_released/action.yml delete mode 100644 .github/actions/update_confluence_jira/action.yml delete mode 100755 .github/scripts/call_mark_jira_released.sh delete mode 100755 .github/scripts/create_env_release_notes.sh delete mode 100755 .github/scripts/create_int_rc_release_notes.sh delete mode 100755 .github/scripts/get_current_dev_tag.sh delete mode 100755 .github/scripts/get_target_deployed_tag.sh diff --git a/.github/actions/mark_jira_released/action.yml b/.github/actions/mark_jira_released/action.yml deleted file mode 100644 index b53c70a8..00000000 --- a/.github/actions/mark_jira_released/action.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: "Create confluence release notes" -description: "Do release note actions in confluence and jira" -inputs: - RELEASE_TAG: - required: false - description: "The tag we are marking as released in jira" - DEV_CLOUD_FORMATION_EXECUTE_LAMBDA_ROLE: - required: true - description: "The role to assume to execute the release notes lambda" - -runs: - using: "composite" - steps: - - name: connect to dev account - uses: aws-actions/configure-aws-credentials@v4 - with: - aws-region: eu-west-2 - role-to-assume: ${{ inputs.DEV_CLOUD_FORMATION_EXECUTE_LAMBDA_ROLE }} - role-session-name: aws-dashboards-release-notes-run-lambda - - - name: call markJiraReleased lambda - shell: bash - working-directory: .github/scripts - env: - RELEASE_TAG: ${{ inputs.RELEASE_TAG }} - run: ./call_mark_jira_released.sh diff --git a/.github/actions/update_confluence_jira/action.yml b/.github/actions/update_confluence_jira/action.yml deleted file mode 100644 index 1b3ff897..00000000 --- a/.github/actions/update_confluence_jira/action.yml +++ /dev/null @@ -1,89 +0,0 @@ -name: "Create confluence release notes" -description: "Do release note actions in confluence and jira" -inputs: - TARGET_ENVIRONMENT: - required: true - description: "Target Environment" - RELEASE_TAG: - required: false - description: "The tag we are releasing - only used for create_rc_release_notes" - CONFLUENCE_PAGE_ID: - required: true - description: "The id of confluence page to update or create under" - CREATE_RC_RELEASE_NOTES: - required: true - description: "whether to create rc release notes page instead of normal release notes" - default: "false" - DEV_CLOUD_FORMATION_EXECUTE_LAMBDA_ROLE: - required: true - description: "The role to assume to execute the release notes lambda" - DEV_CLOUD_FORMATION_CHECK_VERSION_ROLE: - required: true - description: "The dev cloud formation deploy role" - TARGET_CLOUD_FORMATION_CHECK_VERSION_ROLE: - required: true - description: "The target cloud formation deploy role" - -runs: - using: "composite" - steps: - - name: connect to target account - uses: aws-actions/configure-aws-credentials@v4 - with: - aws-region: eu-west-2 - role-to-assume: ${{ inputs.TARGET_CLOUD_FORMATION_CHECK_VERSION_ROLE }} - role-session-name: aws-dashboards-release-notes-target - - - name: Get deployed tag on target - shell: bash - working-directory: .github/scripts - env: - TARGET_ENVIRONMENT: ${{ inputs.TARGET_ENVIRONMENT }} - run: ./get_target_deployed_tag.sh - - - name: connect to dev account - uses: aws-actions/configure-aws-credentials@v4 - with: - aws-region: eu-west-2 - role-to-assume: ${{ inputs.DEV_CLOUD_FORMATION_CHECK_VERSION_ROLE }} - role-session-name: aws-dashboards-release-notes-dev - - - name: get current dev tag - shell: bash - working-directory: .github/scripts - run: ./get_current_dev_tag.sh - - - name: connect to dev account to run release notes lambda - uses: aws-actions/configure-aws-credentials@v4 - with: - aws-region: eu-west-2 - role-to-assume: ${{ inputs.DEV_CLOUD_FORMATION_EXECUTE_LAMBDA_ROLE }} - role-session-name: aws-dashboards-release-notes-run-lambda - unset-current-credentials: true - - - name: create int release notes - shell: bash - working-directory: .github/scripts - if: inputs.TARGET_ENVIRONMENT == 'int' && inputs.CREATE_RC_RELEASE_NOTES == 'false' - env: - ENV: INT - PAGE_ID: ${{ inputs.CONFLUENCE_PAGE_ID }} - run: ./create_env_release_notes.sh - - - name: create int rc release notes - shell: bash - working-directory: .github/scripts - if: inputs.TARGET_ENVIRONMENT == 'int' && inputs.CREATE_RC_RELEASE_NOTES == 'true' - env: - RELEASE_TAG: ${{ inputs.RELEASE_TAG }} - PAGE_ID: ${{ inputs.CONFLUENCE_PAGE_ID }} - run: ./create_int_rc_release_notes.sh - - - name: create prod release notes - shell: bash - working-directory: .github/scripts - if: inputs.TARGET_ENVIRONMENT == 'prod' - env: - ENV: PROD - PAGE_ID: ${{ inputs.CONFLUENCE_PAGE_ID }} - run: ./create_env_release_notes.sh diff --git a/.github/scripts/call_mark_jira_released.sh b/.github/scripts/call_mark_jira_released.sh deleted file mode 100755 index fe76f6c1..00000000 --- a/.github/scripts/call_mark_jira_released.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -echo "calling mark jira released" - -cat < payload.json -{ - "releaseVersion": "Dashboards-$RELEASE_TAG" -} -EOF -cat payload.json - -function_arn=$(aws cloudformation list-exports --query "Exports[?Name=='release-notes:MarkJiraReleasedLambdaArn'].Value" --output text) -aws lambda invoke --function-name "${function_arn}" --cli-binary-format raw-in-base64-out --payload file://payload.json out.txt -cat out.txt diff --git a/.github/scripts/create_env_release_notes.sh b/.github/scripts/create_env_release_notes.sh deleted file mode 100755 index 9cb8277f..00000000 --- a/.github/scripts/create_env_release_notes.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash - -cat < payload.json -{ - "currentTag": "$CURRENT_DEPLOYED_TAG", - "targetTag": "$DEV_TAG", - "repoName": "eps-aws-dashboards", - "targetEnvironment": "$ENV", - "productName": "EPS AWS Dashboards", - "releaseNotesPageId": "$PAGE_ID", - "releaseNotesPageTitle": "Current EPS AWS Dashboards release notes - $ENV" -} -EOF -cat payload.json - -function_arn=$(aws cloudformation list-exports --query "Exports[?Name=='release-notes:CreateReleaseNotesLambdaArn'].Value" --output text) -aws lambda invoke --function-name "${function_arn}" --cli-binary-format raw-in-base64-out --payload file://payload.json out.txt -cat out.txt diff --git a/.github/scripts/create_int_rc_release_notes.sh b/.github/scripts/create_int_rc_release_notes.sh deleted file mode 100755 index 90781886..00000000 --- a/.github/scripts/create_int_rc_release_notes.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash - -cat < payload.json -{ - "currentTag": "$CURRENT_DEPLOYED_TAG", - "targetTag": "$RELEASE_TAG", - "repoName": "eps-aws-dashboards", - "targetEnvironment": "INT", - "productName": "EPS AWS Dashboards", - "releaseNotesPageId": "$PAGE_ID", - "releaseNotesPageTitle": "Dashboards-$RELEASE_TAG - Deployed to [INT] on $(date +'%d-%m-%y')", - "createReleaseCandidate": "true", - "releasePrefix": "Dashboards-" -} -EOF -cat payload.json - -function_arn=$(aws cloudformation list-exports --query "Exports[?Name=='release-notes:CreateReleaseNotesLambdaArn'].Value" --output text) -aws lambda invoke --function-name "${function_arn}" --cli-binary-format raw-in-base64-out --payload file://payload.json out.txt -cat out.txt diff --git a/.github/scripts/get_current_dev_tag.sh b/.github/scripts/get_current_dev_tag.sh deleted file mode 100755 index 7702b613..00000000 --- a/.github/scripts/get_current_dev_tag.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -dev_tag=$(aws cloudformation describe-stacks --stack-name dashboards --query "Stacks[0].Tags[?Key=='version'].Value" --output text) - -echo "DEV_TAG=${dev_tag}" >> "$GITHUB_ENV" diff --git a/.github/scripts/get_target_deployed_tag.sh b/.github/scripts/get_target_deployed_tag.sh deleted file mode 100755 index bcf57262..00000000 --- a/.github/scripts/get_target_deployed_tag.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -current_deployed_tag=$(aws cloudformation describe-stacks --stack-name dashboards --query "Stacks[0].Tags[?Key=='version'].Value" --output text) - -if [ -z "$current_deployed_tag" ] -then - current_deployed_tag=v1.0.0-beta -fi - -echo "CURRENT_DEPLOYED_TAG=${current_deployed_tag}" >> "$GITHUB_ENV" diff --git a/README.md b/README.md index 145aa2df..e9c07275 100644 --- a/README.md +++ b/README.md @@ -173,19 +173,8 @@ This .github folder contains workflows and templates related to GitHub, along wi - `pull_request_template.md` Template for pull requests. - `dependabot.yml` Dependabot definition file. -Actions are in the `.github/actions` folder: - -- `mark_jira_released` Action to mark Jira issues as released. -- `update_confluence_jira` Action to update Confluence with Jira issues. - Scripts are in the `.github/scripts` folder: - -- `call_mark_jira_released.sh` Calls a Lambda function to mark Jira issues as released. -- `create_env_release_notes.sh` Generates release notes for a specific environment using a Lambda function. -- `create_int_rc_release_notes.sh` Creates release notes for integration environment using a Lambda function. - `delete_stacks.sh` Checks and deletes active CloudFormation stacks associated with closed pull requests. -- `get_current_dev_tag.sh` Retrieves the current development tag and sets it as an environment variable. -- `get_target_deployed_tag.sh` Retrieves the currently deployed tag and sets it as an environment variable. Workflows are in the `.github/workflows` folder: