如何不显示 2 个工作区和詹金斯的变化?
how to not show 2 workspace and changes in jenkins?
我有一个 jenkins 管道,它从 github 检出项目存储库以在构建阶段构建项目,在下一个部署阶段我们检出 github 中的另一个存储库以读取相关配置部署。
由于我们结账两次,jenkins 显示了两个工作区以及两个更改
- 针对实际项目的构建变化
- 对于部署配置 repo 的部署更改
如何将工作区和更改限制为 1。对于实际项目的构建更改 ?
我的管道如下所示:
pipeline {
agent any
options {
skipDefaultCheckout(true)
}
stages {
stage('Build') {
steps {
checkout scm
// build related tasks
}
}
stage('Deploy') {
when { branch "master" }
steps {
script {
node("docker-ee") {
script:
checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'some.client.id', url: 'https://somegithuburl.git']]])
}
}
}
}
}
}
使用changelog: false
禁用更新日志生成,more detail
pipeline {
agent any
options {
skipDefaultCheckout(true)
}
stages {
stage('Build') {
steps {
checkout scm
// build related tasks
}
}
stage('Deploy') {
when { branch "master" }
steps {
script {
node("docker-ee") {
script:
checkout scm: [$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'some.client.id', url: 'https://somegithuburl.git']]], changelog: false, poll: false
}
}
}
}
}
}
我有一个 jenkins 管道,它从 github 检出项目存储库以在构建阶段构建项目,在下一个部署阶段我们检出 github 中的另一个存储库以读取相关配置部署。
由于我们结账两次,jenkins 显示了两个工作区以及两个更改
- 针对实际项目的构建变化
- 对于部署配置 repo 的部署更改
如何将工作区和更改限制为 1。对于实际项目的构建更改 ?
我的管道如下所示:
pipeline { agent any options { skipDefaultCheckout(true) } stages { stage('Build') { steps { checkout scm // build related tasks } } stage('Deploy') { when { branch "master" } steps { script { node("docker-ee") { script: checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'some.client.id', url: 'https://somegithuburl.git']]]) } } } } } }
使用changelog: false
禁用更新日志生成,more detail
pipeline {
agent any
options {
skipDefaultCheckout(true)
}
stages {
stage('Build') {
steps {
checkout scm
// build related tasks
}
}
stage('Deploy') {
when { branch "master" }
steps {
script {
node("docker-ee") {
script:
checkout scm: [$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'some.client.id', url: 'https://somegithuburl.git']]], changelog: false, poll: false
}
}
}
}
}
}