Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix how to promote to staging and prod environments
Fix how to get DOCKER_IMAGE_TAG: By using GITHUB_ENV, only the steps on the same job will be able to get the value. When trying to get it from steps from different jobs the value is empty. This was causing issues to promote to staging because it was trying to promote EVERYTHING in dev to staging. Luckly there was a check to not allow to overwrite the same tag, so things that were already promoted couldn't be overwritten By using GITHUB_OUTPUT instead, it is now possible to get the variable on any step from any subsequent job Add deployment version verification for staging and production: The CI/CD pipeline has been updated to include a new step for verifying the deployment version in the staging and production environments. This ensures that the correct version of the Docker image is deployed to each environment before running the tests Add set -ux to deployment verification script: - -u will treat any unitialized variable as an error - -x will print the command that is being executed This will make sure that cases where the EXPECTED_VERSION not being passed won't cause any problem. One example where the variable was not set and the job succeeded: https://github.com/NethermindEth/juno/actions/runs/9800486115/job/27062611554#step:3:15 By using -x, it will be useful to understand exactly what's the expected version, so no confusion will be made Add Manual gate to run tests in production Since the deployment to production is a manual process, creating a artificial environment makes it possible for the tests to run only after a deployment is actually done. This avoids the issue where the tests will start to run without the environment be ready.
- Loading branch information