fix jenkins
This commit is contained in:
27
Jenkinsfile
vendored
27
Jenkinsfile
vendored
@@ -6,11 +6,30 @@ pipeline {
|
|||||||
}
|
}
|
||||||
stages {
|
stages {
|
||||||
stage('Checkout') {
|
stage('Checkout') {
|
||||||
steps {
|
steps {
|
||||||
checkout scm
|
script {
|
||||||
sh 'git submodule update --init --recursive'
|
// Detect if this is a tag build via Jenkins-supplied vars
|
||||||
}
|
if (env.GIT_TAG) {
|
||||||
|
echo "Checking out tag: ${env.GIT_TAG}"
|
||||||
|
checkout([
|
||||||
|
$class: 'GitSCM',
|
||||||
|
branches: [[name: "refs/tags/${env.GIT_TAG}"]],
|
||||||
|
userRemoteConfigs: [[url: scm.userRemoteConfigs[0].url]],
|
||||||
|
doGenerateSubmoduleConfigurations: false,
|
||||||
|
extensions: [
|
||||||
|
[$class: 'SubmoduleUpdate', recursiveSubmodules: true]
|
||||||
|
]
|
||||||
|
])
|
||||||
|
} else {
|
||||||
|
echo "Checking out normal branch"
|
||||||
|
checkout scm
|
||||||
|
}
|
||||||
|
|
||||||
|
// update submodules
|
||||||
|
sh 'git submodule update --init --recursive'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
stage('Detect Tag') {
|
stage('Detect Tag') {
|
||||||
steps {
|
steps {
|
||||||
|
|||||||
Reference in New Issue
Block a user