unee-t / frontend

Meteor front end

Home Page:https://case.dev.unee-t.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MAJOR - AWS codebuild Always builds Docker image - No test - No Condition.

franck-boullier opened this issue · comments

In the current version of the master, AWS codebuild will ALWAYS build the image for each PR.

This is a problem since:
1- The image that is built is untested.
2- That image will be used by ALL the environments if we need to redeploy one environment.

Possible solution:

Add some conditions to make sure that only tested and valid images are built and pushed to the Dockerhub server.

Image is only used in {demo,prod} if tagged since CodeBuild's https://github.com/unee-t/frontend/blob/master/buildspec.yml is only run in the dev account.

We can make it so that it only builds on master https://github.com/unee-t/frontend/blob/master/buildspec.yml which is probably sensible.

npm t doesn't work in the Docker container due to some weird xcb myriad of dependencies needed by Chromium I think to run the unit tests.

I'd prefer if the unit tests were run in the CI phase in TravisCI, but that doesn't work either.

We can make it so that it only builds on master https://github.com/unee-t/frontend/blob/master/buildspec.yml .

I think this is the right solution yes.
Any idea on how we could do that?

Some CodeBuild setting. Raise an AWS support ticket if we can't figure it out.