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

Use sls_build for building docker images #39467

Merged
merged 1 commit into from Feb 24, 2017

Conversation

Projects
None yet
2 participants
@gtmanfred
Contributor

gtmanfred commented Feb 16, 2017

What does this PR do?

Allows the use of docker.sls_build with building images for docker.image_present.

Also fix some bad logic with clearing out the created docker containers after a build was finished. Without the reorganization around the dryrun check, we would leave behind the container that was used to create the image. The logic is fixed here. 5eed60b?diff=split#diff-8f4981346bb8d093255737c1cd281ef6R5986

Tests written?

No

@@ -5966,7 +5966,6 @@ def sls_build(name, base='opensuse/python', mods=None, saltenv='base',
# start a new container
ret = __salt__['dockerng.create'](image=base,
name=name,

This comment has been minimized.

@gtmanfred

gtmanfred Feb 16, 2017

Contributor

This was removed because there is no reason to add a name to the container when we are just going to delete it at the end.

@gtmanfred

This comment has been minimized.

Contributor

gtmanfred commented Feb 16, 2017

Go Go Jenkins!

@gtmanfred

This comment has been minimized.

Contributor

gtmanfred commented Feb 17, 2017

@gtmanfred gtmanfred force-pushed the gtmanfred:sls_build branch from 029b86e to 385c1d7 Feb 17, 2017

@cachedout

This comment has been minimized.

Contributor

cachedout commented Feb 19, 2017

@gtmanfred Merge conflict now I'm afraid.

@gtmanfred gtmanfred force-pushed the gtmanfred:sls_build branch 4 times, most recently from 9adb935 to 14e166d Feb 22, 2017

@gtmanfred

This comment has been minimized.

Contributor

gtmanfred commented Feb 22, 2017

Ok, all the tests should pass on the last one, and I went through and just squashed all the changes down to one commit because i bungled the rebase.

Thanks!
Daniel

@gtmanfred

This comment has been minimized.

Contributor

gtmanfred commented Feb 22, 2017

Go Go Jenkins!

@gtmanfred gtmanfred force-pushed the gtmanfred:sls_build branch 2 times, most recently from f8e8b1b to 5eed60b Feb 22, 2017

@gtmanfred

This comment has been minimized.

Contributor

gtmanfred commented Feb 22, 2017

Go Go Jenkins!

@@ -5971,7 +5971,6 @@ def sls_build(name, base='opensuse/python', mods=None, saltenv='base',
# start a new container
ret = create(image=base,
name=name,

This comment has been minimized.

@cachedout

cachedout Feb 22, 2017

Contributor

Could you clarify the reason that this needs to be removed?

This comment has been minimized.

@gtmanfred

gtmanfred Feb 22, 2017

Contributor

The name is only used for generating a container with a name, we never use that name, we always use the id_ when referencing it

However in the docker.image_present state, we add the tag ':latest' to any image that does not already have a tag in it's name variable, and : is not a valid character in the name of a container, though we still want the tag in the name of the image.

@gtmanfred gtmanfred force-pushed the gtmanfred:sls_build branch from 5eed60b to c56b0f8 Feb 23, 2017

@gtmanfred

This comment has been minimized.

Contributor

gtmanfred commented Feb 23, 2017

rebased again 😃 darn merge forwards!

@gtmanfred gtmanfred force-pushed the gtmanfred:sls_build branch from c56b0f8 to 89101fa Feb 24, 2017

@gtmanfred

This comment has been minimized.

Contributor

gtmanfred commented Feb 24, 2017

Go Go Jenkins!

@cachedout cachedout merged commit 9eb2399 into saltstack:develop Feb 24, 2017

3 of 6 checks passed

default Pull Requests » Salt PR - Main Build #2057
Details
jenkins/PR/salt-pr-rs-cent7-n Pull Requests » Salt PR - RS CentOS 7 #9120 — ABORTED
Details
jenkins/PR/salt-pr-linode-ubuntu14-n Pull Requests » Salt Linode Ubuntu14.04 #8896 — FAILURE
Details
jenkins/PR/salt-pr-clone Pull Requests » Salt PR - Clone #11607 — SUCCESS
Details
jenkins/PR/salt-pr-docs-n Pull Requests » salt-pr-docs-n #4445 — SUCCESS
Details
jenkins/PR/salt-pr-lint-n Pull Requests » Salt PR - Code Lint #8975 — SUCCESS
Details

@gtmanfred gtmanfred deleted the gtmanfred:sls_build branch Feb 24, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment