/*
 * Copyright (c) 2016-2019 SIL International
 * This software is licensed under the MIT license (http://opensource.org/licenses/MIT)
 */

for (repo in ['icu-dotnet', 'icu4c', 'SIL.BuildTasks']) {
	multibranchPipelineJob(repo) {
		description """<p>Builds of ${repo}</p>
	<p>The job is created by the DSL plugin from <i>LibraryJobs.groovy</i> script.</p>"""

		branchSources {
			github {
				id(repo)
				repoOwner('sillsdev')
				repository(repo)
				scanCredentialsId('github-sillsdevgerrit')
				if (repo != 'icu4c') {
					includes('master PR-*')
				}
				buildOriginBranch(true)
				buildOriginBranchWithPR(false)
				buildOriginPRMerge(true)
				buildForkPRMerge(true)
			}

			orphanedItemStrategy {
				discardOldItems {
					daysToKeep(60)
					numToKeep(10)
				}
			}

			triggers {
				// check once a day if not otherwise run
				periodicFolderTrigger {
					interval('1d')
				}
			}
		}
	}
}

/*
 * Copyright (c) 2016-2019 SIL International
 * This software is licensed under the MIT license (http://opensource.org/licenses/MIT)
 */

for (repo in ['icu-dotnet', 'icu4c', 'SIL.BuildTasks']) {
	multibranchPipelineJob(repo) {
		description """<p>Builds of ${repo}</p>
	<p>The job is created by the DSL plugin from <i>LibraryJobs.groovy</i> script.</p>"""

		branchSources {
			github {
				id(repo)
				repoOwner('sillsdev')
				repository(repo)
				scanCredentialsId('github-sillsdevgerrit')
				if (repo != 'icu4c') {
					includes('master PR-*')
				}
				buildOriginBranch(true)
				buildOriginBranchWithPR(false)
				buildOriginPRMerge(true)
				buildForkPRMerge(true)
			}

			orphanedItemStrategy {
				discardOldItems {
					daysToKeep(60)
					numToKeep(10)
				}
			}

			triggers {
				// check once a day if not otherwise run
				periodicFolderTrigger {
					interval('1d')
				}
			}
		}

		if (repo == 'icu4c') {
			factory {
				workflowBranchProjectFactory {
					scriptPath('icu4c/Jenkinsfile')
				}
			}
		}
	}
}

Update to new location of Jenkinsfile
[icu4c] Update to new location of Jenkinsfile

The ICU project restructured their repo. Since we re-applied our
previous patches the location for Jenkinsfile now also moved. This
change makes the necessary adjustment.

Change-Id: I74749a3331df036609d81936fcffa246cdcd6772
