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

JENKINS-28600: Support Dockerfiles with non-standard names. #23

Merged
merged 6 commits into from Oct 19, 2015
Merged

JENKINS-28600: Support Dockerfiles with non-standard names. #23

merged 6 commits into from Oct 19, 2015

Conversation

johndistasio
Copy link
Contributor

Hello,

This pull request addresses JENKINS-28600 by changing the build process to work a little more like it does with the Docker client.

@jenkinsadmin
Copy link
Member

Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests

private boolean buildAndTag() throws MacroEvaluationException, IOException, InterruptedException {
String context = defined(getDockerfilePath()) ?
getDockerfilePath() : ".";
File context = new File(defined(getBuildContext()) ? getBuildContext() : ".");
Copy link
Member

Choose a reason for hiding this comment

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

Should use FilePath and default to the workspace IMO

@oleg-nenashev
Copy link
Member

Seems this behavior will be a breaking change for builds using absolute paths. It needs to be updated

@zeevallin
Copy link

@johndistasio any ideas?

@johndistasio
Copy link
Contributor Author

@zeeraw Yeah, I plan on addressing the concerns when I get more than a few minutes to work on this stuff.

* Allow absolute paths for dockerfilePath.
* Use Jenkins' FilePath for file operations.
* Default build context to workspace.
@johndistasio
Copy link
Contributor Author

@oleg-nenashev I made some changes to address the issues you pointed out, please take a look when you get a chance.

@oleg-nenashev
Copy link
Member

@johndistasio
Thanks for your efforts. I like the current implementation, and hopefully we will get it merged soon.

There's only one minor comment left (regarding the input data). It would be also useful to add the new field to roundtrip unit tests.

@johndistasio
Copy link
Contributor Author

Added the requested input cleanup. I'll look into adding the round-trip testing.

String context = defined(getDockerfilePath()) ?
getDockerfilePath() : ".";
FilePath context = defined(getBuildContext()) ?
new FilePath(new File(getBuildContext())) : build.getWorkspace();
Copy link
Member

Choose a reason for hiding this comment

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

minor: spaces instead of tabs

@owenhaynes
Copy link

Is this ever going to be merged in?

@oleg-nenashev
Copy link
Member

👍 from me, but I'm not the plugin owner
Cc @carlossg and @michaelneale

@michaelneale
Copy link
Member

LGTM (Carlos knows code more recently)
On Mon, 19 Oct 2015 at 6:49 PM, Oleg Nenashev notifications@github.com
wrote:

[image: 👍] from me, but I'm not the plugin owner
Cc @carlossg https://github.com/carlossg and @michaelneale
https://github.com/michaelneale


Reply to this email directly or view it on GitHub
#23 (comment)
.

carlossg added a commit that referenced this pull request Oct 19, 2015
JENKINS-28600: Support Dockerfiles with non-standard names.
@carlossg carlossg merged commit 73c8a2b into jenkinsci:master Oct 19, 2015
@carlossg
Copy link
Collaborator

sorry for the delay

This was referenced Oct 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants