forked from deluan/rtc-plugin
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restore support for per-job repository URL, username + password.
Modify repo, username + password defaulting so it falls back at runtime, not at job-creation time. Changed workspaceName templating to DRY up code and make it work with any Jenkins variables, not just NODE_NAME and JOB_NAME. Ensured there's help for all these config values. Unit tests for code changes.
- Loading branch information
Showing
15 changed files
with
315 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ work | |
*.iml | ||
*.iws | ||
*.ipr | ||
bin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 27 additions & 10 deletions
37
src/main/resources/com/deluan/jenkins/plugins/rtc/JazzSCM/config.jelly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,40 @@ | ||
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" | ||
xmlns:t="/lib/hudson" xmlns:f="/lib/form"> | ||
<f:entry title="${%Repository URL}" field="repositoryLocation"> | ||
<f:textbox default="${descriptor.RTCServerURL}"/> | ||
</f:entry> | ||
<f:entry title="${%Build workspace}" field="workspaceName"> | ||
<f:textbox default="${descriptor.defaultWS}"/> | ||
</f:entry> | ||
|
||
<f:entry title="${%Source stream}" field="streamName"> | ||
<f:textbox/> | ||
</f:entry> | ||
|
||
<f:entry title="${%Load rules}" field="loadRules"> | ||
<f:textarea/> | ||
</f:entry> | ||
<f:entry title="Use update"> | ||
<f:checkbox name="useUpdate" checked="${h.defaultToTrue(scm.useUpdate)}" default="${descriptor.defaultUseUpdate}" /> | ||
If checked, Jenkins will use previously downloaded files whenever possible, | ||
making the build faster. | ||
But this causes the artifacts from the | ||
previous build to remain when a new build starts. | ||
|
||
<f:entry title="Use update" field="useUpdate"> | ||
<f:checkbox checked="${h.defaultToTrue(scm.useUpdate)}" default="${descriptor.defaultUseUpdate}" /> | ||
</f:entry> | ||
|
||
<t:listScmBrowsers name="rtc.browser"/> | ||
</j:jelly> | ||
|
||
<f:block> | ||
RTC Job-Specific Overrides: | ||
</f:block> | ||
|
||
<f:entry title="${%Repository URL}" field="repositoryLocation" | ||
description="If left blank, uses global value (currently ${descriptor.RTCServerURL})"> | ||
<f:textbox/> | ||
|
||
</f:entry> | ||
|
||
<f:entry title="${%RTC User Name}" field="username" | ||
description="If left blank, uses global value (currently ${descriptor.RTCUserName})"> | ||
<f:textbox/> | ||
</f:entry> | ||
|
||
<f:entry title="${%RTC Password}" field="password" | ||
description="If left blank, uses global value"> | ||
<f:password/> | ||
</f:entry> | ||
</j:jelly> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
src/main/resources/com/deluan/jenkins/plugins/rtc/JazzSCM/help-password.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<div> | ||
<p> | ||
This is the password for the user you have set up in Jazz to perform your builds. | ||
Jazz best practice suggests that this is a dedicated user. | ||
</p> | ||
This is the password for the user you have set up in Jazz to perform your builds. | ||
Jazz best practice suggests that this is a dedicated user. | ||
<p> | ||
If left blank, this will default to the value specified in the global configuration. | ||
</div> |
8 changes: 4 additions & 4 deletions
8
src/main/resources/com/deluan/jenkins/plugins/rtc/JazzSCM/help-repositoryLocation.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<div> | ||
<p> | ||
This is the URL for your project's Repository. Typically it is something | ||
like http://[hostname]:9443/[projectname] | ||
</p> | ||
This is the URL for your project's Repository. Typically it is something | ||
like http://[hostname]:9443/[projectname] | ||
<p> | ||
If left blank, this will default to the value specified in the global configuration. | ||
</div> |
5 changes: 5 additions & 0 deletions
5
src/main/resources/com/deluan/jenkins/plugins/rtc/JazzSCM/help-useUpdate.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<div> | ||
If checked, Jenkins will use previously downloaded files whenever possible, | ||
making the build faster. But this causes the artifacts from the previous build | ||
to remain when a new build starts. | ||
</div> |
8 changes: 4 additions & 4 deletions
8
src/main/resources/com/deluan/jenkins/plugins/rtc/JazzSCM/help-username.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<div> | ||
<p> | ||
This is the username for the user you have set up in Jazz to perform your builds. | ||
Jazz best practice suggests that this is a dedicated user. | ||
</p> | ||
This is the username for the user you have set up in Jazz to perform your builds. | ||
Jazz best practice suggests that this is a dedicated user. | ||
<p> | ||
If left blank, this will default to the value specified in the global configuration. | ||
</div> |
11 changes: 6 additions & 5 deletions
11
src/main/resources/com/deluan/jenkins/plugins/rtc/JazzSCM/help-workspaceName.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
<div> | ||
<p> | ||
This is the workspace you have created for the builds to run from. Jazz | ||
best practice suggests this is a dedicated workspace. | ||
</p> | ||
</div> | ||
This is the workspace for the builds to run from. Jazz | ||
best practice suggests this is a dedicated workspace. | ||
<p> | ||
Variables such as <code>${NODE_NAME}</code> and <code>${JOB_NAME}</code> | ||
will be replaced when the job runs. | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<div> | ||
This is the password for the user you have set up in Jazz to perform your builds. | ||
Jazz best practice suggests that this is a dedicated user. | ||
<p> | ||
This value will be used as the default password for jobs using RTC. Individual jobs can override the value. | ||
</div> |
Oops, something went wrong.