allow Jenkins to specify Nim version to use (#6162)

This commit is contained in:
tersec 2024-04-03 10:47:32 +00:00 committed by GitHub
parent 6a318d0f1a
commit c2a2b76f93
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 11 additions and 2 deletions

13
ci/Jenkinsfile vendored
View File

@ -21,6 +21,11 @@ pipeline {
description: 'Value for the V make flag to increase log verbosity',
choices: [0, 1, 2]
)
string(
name: 'NIM_COMMIT',
description: 'Value for the NIM_COMMIT make flag to choose Nim commit',
defaultValue: nimCommitForJob(),
)
}
options {
@ -50,7 +55,7 @@ pipeline {
environment {
NPROC = Runtime.getRuntime().availableProcessors()
MAKEFLAGS = "V=${params.VERBOSITY} -j${env.NPROC}"
MAKEFLAGS = "V=${params.VERBOSITY} NIM_COMMIT=${params.NIM_COMMIT} -j${env.NPROC}"
}
stages {
@ -82,7 +87,7 @@ pipeline {
stage('General') {
steps { timeout(60) {
sh 'make DISABLE_TEST_FIXTURES_SCRIPT=1 test'
sh 'git diff --exit-code' /* Check no uncommitted changes. */
sh 'git diff --exit-code --ignore-submodules=all' /* Check no uncommitted changes. */
} }
}
@ -158,3 +163,7 @@ def getAgentLabel() {
}
return labels.join(' && ')
}
def nimCommitForJob() {
return JOB_NAME.contains('-nimv2/') ? 'upstream/version-2-0' : ''
}