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 committed May 7, 2024
1 parent 9639787 commit 0f2c7bf
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions buildenv/jenkins/getDependency
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,21 @@ 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(':');
echo "tokens.size(): ${tokens.size()}"
echo "tokens: ${tokens}"
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 0f2c7bf

Please sign in to comment.