Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove build docker volume if OS_BUILD_ENV_CLEAN_BUILD_VOLUME is set #16073

Conversation

ingvagabund
Copy link
Member

@ingvagabund ingvagabund commented Aug 31, 2017

SSIA

@stevekuznetsov
Copy link
Contributor

Volumes are created by hack/lib/build/environment.sh here and here -- I think the most appropriate place for cleanup would be in os::build::environment::cleanup through a environment variable that would optionally clean these up

@ingvagabund
Copy link
Member Author

@stevekuznetsov saying it should be called optionally (e.g. when OS_BUILD_ENV_CLEAN_VOLUMES=true) when os::build::environment::cleanup is run?

@stevekuznetsov
Copy link
Contributor

stevekuznetsov commented Aug 31, 2017

@ingvagabund yes, that sounds good

@openshift-ci-robot openshift-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 1, 2017
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 1, 2017
@openshift-ci-robot openshift-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 1, 2017
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 1, 2017
@ingvagabund
Copy link
Member Author

@detiber FYI

@ingvagabund
Copy link
Member Author

@stevekuznetsov PTAL

@ingvagabund ingvagabund changed the title Introduce cleanup-after-build.sh to clean all docker volumes generated during rpm building Remove build docker volumes if OS_BUILD_ENV_CLEAN_BUILD_VOLUME is set Sep 1, 2017
@ingvagabund ingvagabund changed the title Remove build docker volumes if OS_BUILD_ENV_CLEAN_BUILD_VOLUME is set Remove build docker volume if OS_BUILD_ENV_CLEAN_BUILD_VOLUME is set Sep 1, 2017
@detiber
Copy link

detiber commented Sep 1, 2017

@ingvagabund lgtm

Copy link
Contributor

@stevekuznetsov stevekuznetsov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm sans nits

os::log::debug "Removing tmp build volume"
os::build::environment::remove_volume "${tmp_volume}"
fi
if [[ -n ${OS_BUILD_ENV_CLEAN_BUILD_VOLUME:-} ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quote this expansion

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

fi
if [[ -n ${OS_BUILD_ENV_CLEAN_BUILD_VOLUME:-} ]]; then
os::log::debug "Removing build volume"
os::build::environment::remove_volume ${volume}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quote this expansion

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@stevekuznetsov
Copy link
Contributor

/unassign @liggitt
/lgtm
/approve

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 1, 2017
@openshift-merge-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ingvagabund, stevekuznetsov

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 1, 2017
@openshift-merge-robot
Copy link
Contributor

Automatic merge from submit-queue

@openshift-merge-robot openshift-merge-robot merged commit 236d003 into openshift:master Sep 2, 2017
@ingvagabund ingvagabund deleted the cleanup-docker-build-volumes branch September 2, 2017 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants