Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jenkins Bitbucket repo中的管道始终在主主机而不是从主机上检出源_Jenkins_Jenkins Pipeline_Jenkins Job Dsl - Fatal编程技术网

Jenkins Bitbucket repo中的管道始终在主主机而不是从主机上检出源

Jenkins Bitbucket repo中的管道始终在主主机而不是从主机上检出源,jenkins,jenkins-pipeline,jenkins-job-dsl,Jenkins,Jenkins Pipeline,Jenkins Job Dsl,我有一个管道脚本,当嵌入管道项目类型时运行良好,但是当我将脚本移动到Bitbucket git repo并将管道更改为使用签入脚本时,它总是从主脚本而不是从脚本进行签出,并在下面的路径中创建自己的工作区Windows主机上的C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins.Jenkins\workspace,由于路径太长,签出失败。为什么当我只想让它在从机上结账时,它还要在主机上结账 pipeline { age

我有一个管道脚本,当嵌入管道项目类型时运行良好,但是当我将脚本移动到Bitbucket git repo并将管道更改为使用签入脚本时,它总是从主脚本而不是从脚本进行签出,并在下面的路径中创建自己的工作区Windows主机上的C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins.Jenkins\workspace,由于路径太长,签出失败。为什么当我只想让它在从机上结账时,它还要在主机上结账

pipeline {
    agent { node { label 'hwybldtip01.lab.c'
            customWorkspace 'ws'}
    }
    stages {
        stage('Source') {
            steps {
                deleteDir()
        checkout scm
            }
        }
        stage('Build') {
            steps {
                 dir('_Build') {
                    bat encoding: 'UTF-8', label: 'Building', 
                        returnStdout: true, script: 'build.bat %BUILD_NUMBER%'
                }
            }
        }
        stage('Artifacts') {
            steps {
                archiveArtifacts artifacts: '_Installation/*.zip', followSymlinks: true   
            }
        }
    }
}