Skip to content

Commit 168fd62

Browse files
committed
Allow set repo url for generatelockfile pipeline
Signed-off-by: Yuanjing Xue <[email protected]>
1 parent 0ee71d9 commit 168fd62

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

jenkins/GenerateLock.groovy

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ def generate()
4343
sh "pwd && ls -alh"
4444

4545
container("alpine") {
46-
LLM_REPO = "https://github.com/NVIDIA/TensorRT-LLM.git"
46+
LLM_REPO = params.repoUrl
47+
if (LLM_REPO == "Custom Repo") {
48+
LLM_REPO = params.customRepoUrl
49+
}
4750
sh "apt update"
4851
sh "apt install -y python3-dev git curl git-lfs"
4952
sh "git config --global --add safe.directory ${env.WORKSPACE}"
@@ -66,10 +69,10 @@ def generate()
6669
withCredentials([usernamePassword(credentialsId: 'github-cred-trtllm-ci', usernameVariable: 'GIT_USER', passwordVariable: 'GIT_PASS')]) {
6770
def authedUrl = LLM_REPO.replaceFirst('https://', "https://${GIT_USER}:${GIT_PASS}@")
6871
sh "git remote set-url origin ${authedUrl}"
69-
sh "git fetch origin ${params.llmBranch}"
72+
sh "git fetch origin ${params.branchName}"
7073
sh "git status"
71-
sh "git rebase origin/${params.llmBranch}"
72-
sh "git push origin HEAD:${params.llmBranch}"
74+
sh "git rebase origin/${params.branchName}"
75+
sh "git push origin HEAD:${params.branchName}"
7376
}
7477
}
7578
}
@@ -81,7 +84,9 @@ pipeline {
8184
kubernetes createKubernetesPodConfig()
8285
}
8386
parameters {
84-
string(name: 'llmBranch', defaultValue: 'main', description: 'the branch to generate the lock files')
87+
string(name: 'branchName', defaultValue: 'main', description: 'the branch to generate the lock files')
88+
choice(name: 'repoUrl', choices: ['https://github.com/NVIDIA/TensorRT-LLM.git','https://gitlab-master.nvidia.com/ftp/tekit.git', 'Custom Repo'], description: "The repo url to process, choose \"Custom repo\" if you want to set your own repo")
89+
string(name: 'customRepoUrl', defaultValue: '', description: 'Your custom repo to get processed, need to select \"Custom repo\" for repoUrl, otherwise it will be ignored')
8590
}
8691
options {
8792
skipDefaultCheckout()

0 commit comments

Comments
 (0)