Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/jenkins/5.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/three.js/2.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
是否可以有多个jenkinsfile和jenkinsfile的自定义名称_Jenkins_Jenkins Plugins - Fatal编程技术网

是否可以有多个jenkinsfile和jenkinsfile的自定义名称

是否可以有多个jenkinsfile和jenkinsfile的自定义名称,jenkins,jenkins-plugins,Jenkins,Jenkins Plugins,我的整个脚本都在repo的一个分支中,我有多个jenkins管道工作 1. smoke 2. Regression 3. Epic wise Execution 每个都有不同的管道脚本。那么,有可能有多个具有自定义名称的jenkins文件吗 pipeline { node('Slave-Machine-1') { env.NODE_HOME="${tool '8.9.4'}" env.PATH="${env.NODE_HOME}/bin:${env.PA

我的整个脚本都在repo的一个分支中,我有多个jenkins管道工作

1. smoke
2. Regression
3. Epic wise Execution
每个都有不同的管道脚本。那么,有可能有多个具有自定义名称的jenkins文件吗

pipeline {
    node('Slave-Machine-1') {
        env.NODE_HOME="${tool '8.9.4'}"
        env.PATH="${env.NODE_HOME}/bin:${env.PATH}"
        def AUTO = ''

        stage("Install Dependency") {
            sshagent(['agent-id']) {
                sh 'npm install'
                sh 'npm run webdriver-install'
            }
        }

        stage("smoke") {
            sh 'npm run smoke-test'
        }
    }
}

这是我的示例管道脚本。类似地,我有多个管道脚本

您可以将管道脚本命名为random\u joe或任何您喜欢的名称,只要:

  • 您不使用专门查找文件名
    Jenkinsfile
    的多分支或组织管道项目来自动创建新作业
  • 在添加扩展名
    .groovy
    之前,您不介意文本编辑器不突出显示管道脚本的语法
建议在并非不切实际的地方遵循惯例