-
- Downloads
[CI] Remove CI-build images - less storage, more performance
Until now, a unique image was built and pushed for each commit, tagged with the commit number. If this has the avantage to identify which commit corresponds to which image, it causes other problems. For example, if the pipeline fails because of an approved CVE, you may just want to whitelist the CVE. Problem : you will need to rebuild the entire image even if nothing has changed, because the "clair" stage tries to pull the image with the current commit id in tag. So the following was done : - As soon as an image in successfully built, push it to the registry. OVERWRITE THE OLD IMAGE. This is ok. - Now, you rebuild the image ONLY if the Dockerfile has changed. - You run Clair if the clair-whitelist.yml (or Dockerfile, docker-compose) has changed. "clair" stage will be able to find the last previously built image. This is good, no need to build again ! Faster. - Remove the push-test stage : already done earlier.
Please register or sign in to comment