Skip to content

Commit

Permalink
Merge pull request #44 from dsingh07/feature/pluggable
Browse files Browse the repository at this point in the history
Adding defaulted parameter in example workspace generation
  • Loading branch information
RobertNorthard authored Mar 9, 2017
2 parents b90f071 + c92c94d commit d2bd6c4
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
def platformManagementFolderName= "/Platform_Management"
def platformManagementFolder = folder(platformManagementFolderName) { displayName('Platform Management') }

def rootUrl = "${ROOT_URL}"
gerritRootUrl = rootUrl.replaceAll("jenkins","gerrit")


// Jobs
def generateExampleWorkspaceJob = workflowJob(platformManagementFolderName + "/Generate_Example_Workspace")

Expand All @@ -16,6 +20,7 @@ generateExampleWorkspaceJob.with{
stringParam("workspaceDeveloper","Developer","")
stringParam("workspaceViewer","Viewer","")
stringParam("cartridgeURL","ssh://jenkins@gerrit:29418/cartridges/adop-cartridge-java.git","")
stringParam("scmProvider",gerritRootUrl + " - ssh (adop-gerrit-ssh)","")
}
properties {
rebuild {
Expand All @@ -31,7 +36,7 @@ build job: 'Workspace_Management/Generate_Workspace', parameters: [[$class: 'Str
// Setup Faculty
build job: "${workspaceName}/Project_Management/Generate_Project", parameters: [[$class: 'StringParameterValue', name: 'PROJECT_NAME', value: "${projectName}"], [$class: 'StringParameterValue', name: 'ADMIN_USERS', value: "${projectName}${projectAdmin}"], [$class: 'StringParameterValue', name: 'DEVELOPER_USERS', value: "${projectName}${projectDeveloper}"], [$class: 'StringParameterValue', name: 'VIEWER_USERS', value: "${projectName}${projectViewer}"]]
retry(5) {
build job: "${workspaceName}/${projectName}/Cartridge_Management/Load_Cartridge", parameters: [[$class: 'StringParameterValue', name: 'CARTRIDGE_CLONE_URL', value: "${cartridgeURL}"]]
build job: "${workspaceName}/${projectName}/Cartridge_Management/Load_Cartridge", parameters: [[$class: 'StringParameterValue', name: 'CARTRIDGE_CLONE_URL', value: "${cartridgeURL}"], [$class: 'StringParameterValue', name: 'SCM_PROVIDER', value: "${scmProvider}"]]
}''')
sandbox()
}
Expand Down

0 comments on commit d2bd6c4

Please sign in to comment.