CentOS / container-pipeline-service

Code, infrastructure and deployment backend for the CentOS Container Pipeline backing up build system for registry.centos.org
https://registry.centos.org
GNU General Public License v3.0
49 stars 27 forks source link

Ensures built/pulled images are removed on pipeline jobs exit #635

Closed navidshaikh closed 6 years ago

navidshaikh commented 6 years ago

Puts the Remove the image stage in finally block and prevents pipeline's execution status based on mentioned stage's status (i.e. even if it fails, the pipeline's over all status should be Complete).

For seed-job/template.yaml : Ensures locally built image is removed from system in seed-job/template.yaml

Adds Remove the image stage in the finally block after Notify user stage.

Defines a flag image_is_built, and uses it to define the Remove the image stage.

Don't fail the pipeline if image removal has failed due to some error.


For weekly-scan/template.yaml : Ensures locally pulled image is removed from system in weekly-scan/template.yaml

Adds Remove the image stage in the finally block after Notify user stage.

Defines a flag image_is_pulled, and uses it to define the Remove the image stage.

Don't fail the pipeline if image removal has failed due to some error.


Fixes #627

navidshaikh commented 6 years ago

This branch had merge conflicts after other PRs were merged (with common files change) - Rebased the PR, lets wait for CI.

@bamachrn @dharmit @mohammedzee1000