From 21715d41da502c4a12213c7457e7bc69086b5bbe Mon Sep 17 00:00:00 2001 From: Oleksandr Mazur <85229023+mazursasha1990@users.noreply.github.com> Date: Mon, 16 Sep 2024 17:37:52 +0300 Subject: [PATCH] Prevent automated deployment to AWS after creating tags for `sandbox` and `production` (#351) Prevent automated deployment to AWS after creating tags for `sandbox` and `production`. - The code responsible for triggering workflows on pushes to tags starting with `sandbox` or `production` was commented out to prevent automated deployment to AWS. - The 'Release Instructions' section of the `RELEASE-NOTES.md` has been updated with a description of how to manually run the deployment to AWS. --- .github/workflows/deploy_to_aws.yml | 9 ++++++--- doc/release/RELEASE-NOTES.md | 12 ++++++++---- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy_to_aws.yml b/.github/workflows/deploy_to_aws.yml index 44feb4f18..1df9b2930 100644 --- a/.github/workflows/deploy_to_aws.yml +++ b/.github/workflows/deploy_to_aws.yml @@ -5,9 +5,12 @@ on: branches: - main - 'releases/**' - tags: - - 'sandbox-*' - - 'production-*' + # TODO: Uncomment the following lines to enable deployment to production and sandbox environments + # after the implementation of the OSDEV-1325 CI/CD. Trigger the 'Deploy to AWS' pipeline using the API. + # https://opensupplyhub.atlassian.net/browse/OSDEV-1325 + # tags: + # - 'sandbox-*' + # - 'production-*' workflow_dispatch: inputs: deploy-env: diff --git a/doc/release/RELEASE-NOTES.md b/doc/release/RELEASE-NOTES.md index ca3517c5c..9e2b12592 100644 --- a/doc/release/RELEASE-NOTES.md +++ b/doc/release/RELEASE-NOTES.md @@ -23,9 +23,10 @@ Additionally, a `historical_os_id` filter was added to the `sync_production_loca ### Architecture/Environment changes * [OSDEV-1177](https://opensupplyhub.atlassian.net/browse/OSDEV-1177) - - Improved OpenSearch indexes cleanup step in the _Deploy to AWS_ and _DB - Apply Anonymized DB_ pipelines to use script templates so that changes can be made in one place rather than in each pipeline separately - - Stop/start Logstash and clearing OpenSearch indexes moved to separate jobs of _Deploy to AWS_ and _DB - Apply Anonymized DB_ pipelines. - - Stop/start Logstash and clearing OpenSearch indexes now runs on ubuntu-latest runner. + * Improved OpenSearch indexes cleanup step in the `Deploy to AWS` and `DB - Apply Anonymized DB` pipelines to use script templates so that changes can be made in one place rather than in each pipeline separately + * Stop/start Logstash and clearing OpenSearch indexes moved to separate jobs of `Deploy to AWS` and `DB - Apply Anonymized DB` pipelines. + * Stop/start Logstash and clearing OpenSearch indexes now runs on ubuntu-latest runner. + * The automated deployment to AWS after creating tags for `sandbox` and `production` was temporarily prevented (until the implementation of [OSDEV-1325](https://opensupplyhub.atlassian.net/browse/OSDEV-1325)). ### Bugfix * [OSDEV-1177](https://opensupplyhub.atlassian.net/browse/OSDEV-1177) - The following changes have been made: @@ -36,7 +37,10 @@ Additionally, a `historical_os_id` filter was added to the `sync_production_loca * [OSDEV-1225](https://opensupplyhub.atlassian.net/browse/OSDEV-1225) - The auto email responses for `Approved` and `Rejected` statuses have been updated to improve user experience. A user receives an email updating them on the status of their list and the next steps they need to take. ### Release instructions: -* Before deploying to an existing environment, manually delete the related EFS storage, OpenSearch domain, and stop all tasks of the Logstash service in the appropriate ECS cluster. This is necessary to apply the new mapping for the production-locations OpenSearch index. +* Ensure that the following commands are included in the `post_deployment` command: + * `migrate` +* After running the `Release [Deploy]` workflow for both the `sandbox` and `production` environments, the responsible person must manually run the `Deploy to AWS` workflow, ensuring that the `Clear OpenSearch indexes` option is checked for each environment. +Note: This instruction updates item 3 of the ['Release to Production and Sandbox'](https://github.com/opensupplyhub/open-supply-hub/blob/main/doc/release/RELEASE-PROTOCOL.md#release-to-production-and-sandbox) section of the RELEASE-PROTOCOL. ## Release 1.20.0