diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3674cf933..e01e5bcbd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -102,6 +102,7 @@ jobs: LOG_RETENTION_DAYS: 30 CREATE_INT_RELEASE_NOTES: true CREATE_PROD_RELEASE_NOTES: true + DEPLOY_APIGEE: true secrets: CLOUD_FORMATION_DEPLOY_ROLE: ${{ secrets.DEV_CLOUD_FORMATION_DEPLOY_ROLE }} DEV_CLOUD_FORMATION_CHECK_VERSION_ROLE: ${{ secrets.DEV_CLOUD_FORMATION_CHECK_VERSION_ROLE }} @@ -124,6 +125,7 @@ jobs: VERSION_NUMBER: ${{needs.tag_release.outputs.version_tag}} COMMIT_ID: ${{needs.get_commit_id.outputs.commit_id}} LOG_RETENTION_DAYS: 30 + DEPLOY_APIGEE: true secrets: CLOUD_FORMATION_DEPLOY_ROLE: ${{ secrets.DEV_CLOUD_FORMATION_DEPLOY_ROLE }} @@ -142,5 +144,6 @@ jobs: VERSION_NUMBER: ${{needs.tag_release.outputs.version_tag}} COMMIT_ID: ${{needs.get_commit_id.outputs.commit_id}} LOG_RETENTION_DAYS: 30 + DEPLOY_APIGEE: true secrets: CLOUD_FORMATION_DEPLOY_ROLE: ${{ secrets.QA_CLOUD_FORMATION_DEPLOY_ROLE }} diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index d89f1a088..76c08cf1a 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -73,6 +73,7 @@ jobs: VERSION_NUMBER: PR-${{ needs.get_issue_number.outputs.issue_number }} COMMIT_ID: ${{ needs.get_commit_id.outputs.commit_id }} LOG_RETENTION_DAYS: 30 + DEPLOY_APIGEE: true secrets: CLOUD_FORMATION_DEPLOY_ROLE: ${{ secrets.DEV_CLOUD_FORMATION_DEPLOY_ROLE }} @@ -91,5 +92,6 @@ jobs: VERSION_NUMBER: PR-${{ needs.get_issue_number.outputs.issue_number }} COMMIT_ID: ${{ needs.get_commit_id.outputs.commit_id }} LOG_RETENTION_DAYS: 30 + DEPLOY_APIGEE: true secrets: CLOUD_FORMATION_DEPLOY_ROLE: ${{ secrets.DEV_CLOUD_FORMATION_DEPLOY_ROLE }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 03996f75d..c3773548d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -128,6 +128,7 @@ jobs: LOG_RETENTION_DAYS: 30 CREATE_INT_RELEASE_NOTES: true CREATE_PROD_RELEASE_NOTES: true + DEPLOY_APIGEE: true secrets: CLOUD_FORMATION_DEPLOY_ROLE: ${{ secrets.DEV_CLOUD_FORMATION_DEPLOY_ROLE }} DEV_CLOUD_FORMATION_CHECK_VERSION_ROLE: ${{ secrets.DEV_CLOUD_FORMATION_CHECK_VERSION_ROLE }} @@ -150,6 +151,7 @@ jobs: VERSION_NUMBER: ${{needs.tag_release.outputs.version_tag}} COMMIT_ID: ${{needs.get_commit_id.outputs.commit_id}} LOG_RETENTION_DAYS: 30 + DEPLOY_APIGEE: true secrets: CLOUD_FORMATION_DEPLOY_ROLE: ${{ secrets.DEV_CLOUD_FORMATION_DEPLOY_ROLE }} @@ -169,6 +171,7 @@ jobs: COMMIT_ID: ${{needs.get_commit_id.outputs.commit_id}} LOG_LEVEL: DEBUG LOG_RETENTION_DAYS: 30 + DEPLOY_APIGEE: true secrets: CLOUD_FORMATION_DEPLOY_ROLE: ${{ secrets.REF_CLOUD_FORMATION_DEPLOY_ROLE }} @@ -188,6 +191,7 @@ jobs: COMMIT_ID: ${{needs.get_commit_id.outputs.commit_id}} LOG_LEVEL: DEBUG LOG_RETENTION_DAYS: 30 + DEPLOY_APIGEE: true secrets: CLOUD_FORMATION_DEPLOY_ROLE: ${{ secrets.QA_CLOUD_FORMATION_DEPLOY_ROLE }} @@ -209,6 +213,7 @@ jobs: LOG_RETENTION_DAYS: 30 CREATE_INT_RELEASE_NOTES: true CREATE_INT_RC_RELEASE_NOTES: true + DEPLOY_APIGEE: true secrets: CLOUD_FORMATION_DEPLOY_ROLE: ${{ secrets.INT_CLOUD_FORMATION_DEPLOY_ROLE }} DEV_CLOUD_FORMATION_CHECK_VERSION_ROLE: ${{ secrets.DEV_CLOUD_FORMATION_CHECK_VERSION_ROLE }} @@ -231,29 +236,32 @@ jobs: VERSION_NUMBER: ${{needs.tag_release.outputs.version_tag}} COMMIT_ID: ${{needs.get_commit_id.outputs.commit_id}} LOG_RETENTION_DAYS: 30 + DEPLOY_APIGEE: true secrets: CLOUD_FORMATION_DEPLOY_ROLE: ${{ secrets.DEV_CLOUD_FORMATION_DEPLOY_ROLE }} -# release_prod: -# needs: [tag_release, release_int, release_int_sandbox, package_code, get_commit_id] -# uses: ./.github/workflows/sam_release_code.yml -# with: -# ARTIFACT_BUCKET_PREFIX: ${{needs.tag_release.outputs.version_tag}} -# STACK_NAME: psu -# AWS_ENVIRONMENT: prod -# APIGEE_ENVIRONMENT: prod -# ENABLE_MUTUAL_TLS: true -# BUILD_ARTIFACT: packaged_code -# TRUSTSTORE_FILE: psu-truststore.pem -# VERSION_NUMBER: ${{needs.tag_release.outputs.version_tag}} -# COMMIT_ID: ${{needs.get_commit_id.outputs.commit_id}} -# LOG_LEVEL: INFO -# LOG_RETENTION_DAYS: 731 -# MARK_JIRA_RELEASED: true -# CREATE_PROD_RELEASE_NOTES: true -# secrets: -# CLOUD_FORMATION_DEPLOY_ROLE: ${{ secrets.PROD_CLOUD_FORMATION_DEPLOY_ROLE }} -# DEV_CLOUD_FORMATION_CHECK_VERSION_ROLE: ${{ secrets.DEV_CLOUD_FORMATION_CHECK_VERSION_ROLE }} -# INT_CLOUD_FORMATION_CHECK_VERSION_ROLE: ${{ secrets.INT_CLOUD_FORMATION_CHECK_VERSION_ROLE }} -# PROD_CLOUD_FORMATION_CHECK_VERSION_ROLE: ${{ secrets.PROD_CLOUD_FORMATION_CHECK_VERSION_ROLE }} -# DEV_CLOUD_FORMATION_EXECUTE_LAMBDA_ROLE: ${{ secrets.DEV_CLOUD_FORMATION_EXECUTE_LAMBDA_ROLE }} + release_prod: + needs: [tag_release, release_int, release_int_sandbox, package_code, get_commit_id] + uses: ./.github/workflows/sam_release_code.yml + with: + ARTIFACT_BUCKET_PREFIX: ${{needs.tag_release.outputs.version_tag}} + STACK_NAME: psu + AWS_ENVIRONMENT: prod + APIGEE_ENVIRONMENT: prod + ENABLE_MUTUAL_TLS: true + BUILD_ARTIFACT: packaged_code + SPEC_ARTIFACT: specification_code + TRUSTSTORE_FILE: psu-truststore.pem + VERSION_NUMBER: ${{needs.tag_release.outputs.version_tag}} + COMMIT_ID: ${{needs.get_commit_id.outputs.commit_id}} + LOG_LEVEL: INFO + LOG_RETENTION_DAYS: 731 + MARK_JIRA_RELEASED: true + CREATE_PROD_RELEASE_NOTES: true + DEPLOY_APIGEE: false + secrets: + CLOUD_FORMATION_DEPLOY_ROLE: ${{ secrets.PROD_CLOUD_FORMATION_DEPLOY_ROLE }} + DEV_CLOUD_FORMATION_CHECK_VERSION_ROLE: ${{ secrets.DEV_CLOUD_FORMATION_CHECK_VERSION_ROLE }} + INT_CLOUD_FORMATION_CHECK_VERSION_ROLE: ${{ secrets.INT_CLOUD_FORMATION_CHECK_VERSION_ROLE }} + PROD_CLOUD_FORMATION_CHECK_VERSION_ROLE: ${{ secrets.PROD_CLOUD_FORMATION_CHECK_VERSION_ROLE }} + DEV_CLOUD_FORMATION_EXECUTE_LAMBDA_ROLE: ${{ secrets.DEV_CLOUD_FORMATION_EXECUTE_LAMBDA_ROLE }} diff --git a/.github/workflows/sam_release_code.yml b/.github/workflows/sam_release_code.yml index d6a1c81d1..70b48623f 100644 --- a/.github/workflows/sam_release_code.yml +++ b/.github/workflows/sam_release_code.yml @@ -52,6 +52,9 @@ on: MARK_JIRA_RELEASED: type: boolean default: false + DEPLOY_APIGEE: + type: boolean + default: true secrets: CLOUD_FORMATION_DEPLOY_ROLE: required: true @@ -175,6 +178,7 @@ jobs: - name: Deploy API shell: bash working-directory: .github/scripts + if: ${{ inputs.DEPLOY_APIGEE == true && always() && !failure() && !cancelled() }} env: VERSION_NUMBER: ${{ inputs.VERSION_NUMBER }} PROXYGEN_PATH: ${{ env.PROXYGEN_PATH }}