Skip to content

Fix push-and-deploy and failure checking.

Zephaniah Loss-Cutler-Hull requested to merge zelch/cloud-deploy:fixes into master

push-and-deploy:

Right now, the push-and-deploy mode fails at the deploy stage, and the Auto Devops CI/CD rules have separate calls for push and deploy.

The problem is that the push phase does a cd, and never changes the directory back, and everything is using relative paths.

As such, the deploy phase runs in the wrong directory, and stuff just doesn't work.

This has been fixed in two different ways.

First, everything now uses absolute paths based on CI_PROJECT_DIR.

And second, push now uses a --source argument with an absolute path, instead of doing a cd.

This should, at least in theory, fully resolve the issue.

Failure checking:

At least at the moment, AWS is marking deployments with both successful and failed deployment targets as successful instead of failed.

This is likely very much not what people are expecting.

With that said, AWS is correctly reporting under deploymentOverview, and so we can check .deploymentOverview.Failed and see if it is 0 or not.

And so we are now tracking that, and any deployment where it is not 0 is being marked as a failure instead of a success.

Hopefully this will both work, and lead to fewer surprises.

Notes:

I'm sadly not really setup to build docker images for the pipeline tests, I'm hopeful that with the MR they can be run by a maintainer in the context of the main project, where those tests can run properly.

Merge request reports