Skip to content

Commit

Permalink
Allow custom TKG repo and branch/sha/tag to be set
Browse files Browse the repository at this point in the history
Signed-off-by: Lan Xia <[email protected]>
  • Loading branch information
llxia authored and pshipton committed May 9, 2024
1 parent b35cfc4 commit cd7d11f
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions buildenv/jenkins/getDependency
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,19 @@ def testBuild() {
archiveArtifacts '**/systemtest_prereqs/asm/asm.jar'
archiveArtifacts '**/systemtest_prereqs/tools/tools.jar'
} else {
sh 'curl -Os https://raw.githubusercontent.com/adoptium/TKG/master/scripts/getDependencies.pl'
sh 'perl ./getDependencies.pl -path . -task default'
archiveArtifacts '*.jar, *.zip, *.txt, *.gz'
def TKG_OWNER_BRANCH = params.TKG_OWNER_BRANCH ?: "adoptium:master"
def tokens = TKG_OWNER_BRANCH.split(':');
if (tokens.size() == 2) {
def owner = tokens[0];
def branch = tokens[1];
sh "curl -Os https://raw.githubusercontent.com/${owner}/TKG/${branch}/scripts/getDependencies.pl"
sh 'perl ./getDependencies.pl -path . -task default'
archiveArtifacts '*.jar, *.zip, *.txt, *.gz'
} else {
assert false : "TKG_OWNER_BRANCH ${TKG_OWNER_BRANCH} is not expected format. (i.e., TKG_OWNER_BRANCH=adoptium:master)"
}


}
} finally {
cleanWs()
Expand Down

0 comments on commit cd7d11f

Please sign in to comment.