Skip to content
Permalink
Browse files

Fixes [JENKINS-18899] : - Added option to chose whether to run "copyi…

…ng files back to master" in the end or along with the other post build tasks.
  • Loading branch information...
svvivek committed Sep 16, 2013
1 parent decc971 commit 9156293cbdc48c241075e1297a2998214fdf75c6
@@ -53,18 +53,20 @@
private final String excludes;
private final boolean overrideDestinationFolder;
private final String destinationFolder;
private final boolean runInBackground;

@DataBoundConstructor
public CopyToMasterNotifier(String includes, String excludes, boolean overrideDestinationFolder, String destinationFolder) {
public CopyToMasterNotifier(String includes, String excludes, boolean overrideDestinationFolder, String destinationFolder, boolean runInBackground) {
this.includes = includes;
this.excludes = excludes;
this.overrideDestinationFolder = overrideDestinationFolder;
this.destinationFolder = destinationFolder;
this.runInBackground = runInBackground;
}

@Override
public boolean needsToRunAfterFinalized() {
return true;
return getRunInBackground();
}

@Override
@@ -116,6 +118,10 @@ public boolean isOverrideDestinationFolder() {
return overrideDestinationFolder;
}

public boolean getRunInBackground() {
return runInBackground;
}

public BuildStepMonitor getRequiredMonitorService() {
return BuildStepMonitor.BUILD;
}
@@ -26,6 +26,9 @@
<f:entry title="${%Includes}" field="includes">
<f:textbox/>
</f:entry>
<f:entry title="${%RunInBackground}" field="runInBackground">
<f:checkbox/>
</f:entry>
<f:advanced>
<f:entry title="${%Excludes}" field="excludes">
<f:textbox/>
@@ -24,3 +24,4 @@ DestinationFolder=Destination folder
Includes=Files to copy
Excludes=Files to exclude from the copy
OverrideDestinationFolder=Override destination folder
RunInBackground=Run In Background ?
@@ -0,0 +1,28 @@
<!--
- The MIT License
-
- Copyright (c) 2013, Vivekanand S V (svvivekanand@gmail.com)
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
-->

<div>
If this is checked then copying files back to master will not run until the build result is finalized.
If you want this to run like other post build tasks (i.e., following the task order) then un-check this.
</div>

0 comments on commit 9156293

Please sign in to comment.
You can’t perform that action at this time.