Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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