unee-t / frontend

Meteor front end
https://case.dev.unee-t.com/
GNU Affero General Public License v3.0
9 stars 17 forks source link

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

Open franck-boullier opened 4 years ago

franck-boullier commented 4 years ago

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.

kaihendry commented 4 years ago

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.

kaihendry commented 4 years ago

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.

franck-boullier commented 4 years ago

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?

kaihendry commented 4 years ago

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