在构建阶段我的 Jenkins 管道出现问题,我无法运行帮助诊断



这是尝试运行管道时出现的错误

process apparently never started in /var/jenkins_home/workspace/AsadJ@2@tmp/durable-2744819c
(running Jenkins temporarily with -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.LAUNCH_DIAGNOSTICS=true might make the problem clearer)

这是我的詹金斯管道

pipeline {
agent {
docker { image 'ubuntu:latest' }
}
environment {
dockerImage =''
registry = 'XYZ'
registryCredential ='docker-push'
}
stages {
stage("Set Up") {
steps {
echo 'Set up GIT'
git branch: 'main', url: 'https://github.com/XYZ'
}
}
stage("Build docker image") {
steps {
echo 'BUILDING'
script {
dockerImage = docker.build registry + ":$BUILD_NUMBER"
}
}
}
stage('Push image') {
steps {
script {
docker.withRegistry('', registryCredential) {
dockerImage.push()
}
}
}
}

}}

第一次使用jenkins将非常感谢一个解决方案和解释。

如果使用'-Dorg.jenkinsci.plugins.durabletask.BurneShellScript.LUNHC_DIAGNOSTICS=true'配置运行,您在日志中会看到什么?

另请参阅:卡在';sh';stage,然后Process显然从未在/home/jenkins/jenkns/workspace/删除所有空变量中启动:Manage jenkins->配置系统

相关内容