Skip to content

Commit

Permalink
[JENKINS-18281] Introduced trimmed change set option
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfgarnet committed Aug 22, 2013
1 parent 5c8ab2a commit 4c35251
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 2 deletions.
15 changes: 15 additions & 0 deletions src/main/java/net/praqma/hudson/CCUCMBuildAction.java
Expand Up @@ -43,6 +43,13 @@ public class CCUCMBuildAction implements Action {
*/
private boolean removeViewPrivateFiles = true;

/**
* Determine whether to trim the change set or not.
*
* @since 1.4.0
*/
private boolean trimmedChangeSet = false;

/**
* The found {@link Baseline} for the build
*/
Expand Down Expand Up @@ -301,6 +308,14 @@ public void setRemoveViewPrivateFiles( boolean removeViewPrivateFiles ) {
this.removeViewPrivateFiles = removeViewPrivateFiles;
}

public boolean isTrimmedChangeSet() {
return trimmedChangeSet;
}

public void setTrimmedChangeSet( boolean trimmedChangeSet ) {
this.trimmedChangeSet = trimmedChangeSet;
}

public Exception getResolveBaselineException() {
return resolveBaselineException;
}
Expand Down
11 changes: 9 additions & 2 deletions src/main/java/net/praqma/hudson/scm/CCUCMScm.java
Expand Up @@ -79,6 +79,7 @@ public class CCUCMScm extends SCM {
* Determines whether to remove the view private files or not
*/
private boolean removeViewPrivateFiles;
private boolean trimmedChangeSet;

/* Old notifier fields */
private boolean recommend;
Expand Down Expand Up @@ -111,12 +112,12 @@ public CCUCMScm() {
public CCUCMScm( String component, String levelToPoll, String loadModule, boolean newest, String polling, String stream, String treatUnstable,
boolean createBaseline, String nameTemplate, boolean forceDeliver, boolean recommend, boolean makeTag, boolean setDescription, String buildProject ) {

this( component, levelToPoll, loadModule, newest, polling, stream, treatUnstable, createBaseline, nameTemplate, forceDeliver, recommend, makeTag, setDescription, buildProject, true );
this( component, levelToPoll, loadModule, newest, polling, stream, treatUnstable, createBaseline, nameTemplate, forceDeliver, recommend, makeTag, setDescription, buildProject, true, false );
}

@DataBoundConstructor
public CCUCMScm( String component, String levelToPoll, String loadModule, boolean newest, String polling, String stream, String treatUnstable,
boolean createBaseline, String nameTemplate, boolean forceDeliver, boolean recommend, boolean makeTag, boolean setDescription, String buildProject, boolean removeViewPrivateFiles ) {
boolean createBaseline, String nameTemplate, boolean forceDeliver, boolean recommend, boolean makeTag, boolean setDescription, String buildProject, boolean removeViewPrivateFiles, boolean trimmedChangeSet ) {

this.component = component;
this.loadModule = loadModule;
Expand All @@ -131,6 +132,7 @@ public CCUCMScm( String component, String levelToPoll, String loadModule, boolea

this.forceDeliver = forceDeliver;
this.removeViewPrivateFiles = removeViewPrivateFiles;
this.trimmedChangeSet = trimmedChangeSet;

this.recommend = recommend;
this.makeTag = makeTag;
Expand Down Expand Up @@ -764,6 +766,7 @@ private CCUCMBuildAction getBuildAction() throws UnableToInitializeEntityExcepti
action.setUnstable( treatUnstable );
action.setLoadModule( loadModule );
action.setRemoveViewPrivateFiles( removeViewPrivateFiles );
action.setTrimmedChangeSet( trimmedChangeSet );

/* Deliver and template */
action.setCreateBaseline( createBaseline );
Expand Down Expand Up @@ -903,6 +906,10 @@ public boolean getForceDeliver() {
return forceDeliver;
}

private boolean isTrimmedChangeSet() {
return trimmedChangeSet;
}

public boolean isRemoveViewPrivateFiles() {
return removeViewPrivateFiles;
}
Expand Down
Expand Up @@ -77,6 +77,10 @@
<f:entry title="Remove view private files" help="/plugin/clearcase-ucm-plugin/scm/help-removeViewPrivateFiles.html">
<f:checkbox name="CCUCM.removeViewPrivateFiles" checked="${scm.removeViewPrivateFiles}" default="true"/>
</f:entry>

<f:entry title="Trimmed change set" help="/plugin/clearcase-ucm-plugin/scm/help-trimmedChangeSet.html">
<f:checkbox name="CCUCM.trimmedChangeSet" checked="${scm.trimmedChangeSet}" default="false"/>
</f:entry>

<f:entry title="Build project" help="/plugin/clearcase-ucm-plugin/scm/help-buildProject.html">
<f:textbox name="buildProject" value="${scm.buildProject}"/>
Expand Down
3 changes: 3 additions & 0 deletions src/main/webapp/scm/help-trimmedChangeSet.html
@@ -0,0 +1,3 @@
<div>
When checked the change set is trimmed, only listing the latest versions from the given stream.
</div>

0 comments on commit 4c35251

Please sign in to comment.