詹金斯管道民意调查perforce [英] Jenkins pipeline poll perforce

查看:374
本文介绍了詹金斯管道民意调查perforce的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

继续 jenkins-pipeline-syntax-for-p4sync -我是无法为我的管道作业获得投票SCM"选项. 这是我的配置:

In continuation to jenkins-pipeline-syntax-for-p4sync - I am not able to get the "Poll SCM" option work for my pipeline job. Here is my configuration:

  1. 选中轮询SCM"并将其设置为每10分钟轮询一次
  2. 管道脚本包含以下内容:


node ('some-node') // not actual value
{
    stage ('checkout')
    {
        checkout([
            $class: 'PerforceScm', 
            credential: '11111111-1111-1111-1111-11111111111', // not actual value
            populate: [
                $class: 'AutoCleanImpl', 
                delete: true, 
                modtime: false, 
                parallel: [
                    enable: false, 
                    minbytes: '1024', 
                    minfiles: '1', 
                    path: '/usr/local/bin/p4', 
                    threads: '4'
                    ], 
                pin: '', 
                quiet: true, 
                replace: true
                ], 
            workspace: [
                $class: 'ManualWorkspaceImpl', 
                charset: 'none', 
                name: 'jenkins-${NODE_NAME}-${JOB_NAME}', 
                pinHost: false, 
                spec: [
                    allwrite: false, 
                    clobber: false, 
                    compress: false, 
                    line: 'LOCAL', 
                    locked: false, 
                    modtime: false, 
                    rmdir: false, 
                    streamName: '', 
                    view: '//Depot/subfolder... //jenkins-${NODE_NAME}-${JOB_NAME}/...' // not actual value
                    ]
                ]
            ]
        )
    }

  1. 手动完成一次工作

仍然,轮询不起作用,并且在GUI中配置perforce源和Poll SCM时,作业没有像非流水线作业那样的"Perforce软件轮询日志"链接. 就像PerforceSCM缺少民意测验:正确的设置-或我做错了事.

Still, polling does not work and job does not have a "Perforce Software Polling Log" link like a non-pipelined job has when configuring the perforce source and Poll SCM in the GUI. It's like the PerforceSCM is missing a poll: true setting - or i'm doing something wrong.

当前,我有一种变通方法,其中我在非流水作业中轮询perforce,这会触发流水作业,但是随后我必须手动传递变更列表,而我希望流水作业能够完成所有工作.

Currently I have a workaround in which I poll perforce in a non-pipelined job which triggers a pipelined job, but then I have to pass the changelists manually and I would rather the pipeline job to do everything.

版本

詹金斯-2.7.4
P4插件-1.4.8
管道插件-2.4
管道SCM步骤插件-2.2

jenkins - 2.7.4
P4 plugin - 1.4.8
Pipeline plugin - 2.4
Pipeline SCM Step plugin - 2.2

推荐答案

如果转到Groovy代码段生成器并选中包含在轮询中"复选框,您将看到生成的代码包含一个行项目:

If you go to the Groovy snippet generator and check the "include in polling" checkbox, you'll see that the generated code includes a line item for it:

checkout([
            poll: true,

顺便说一句,您现在在工作区名称中使用$ {NODE_NAME}可能会遇到问题.轮询在主服务器上运行,因此它可能无法正确找到先前版本的更改号.如果是这样,我知道应该尽快解决.

As an aside, you may run into problems at the moment using ${NODE_NAME} in your workspace name. The polling runs on the master, so it might not properly find the change number of your previous build. If that's the case, I know a fix for it should be coming shortly.

这篇关于詹金斯管道民意调查perforce的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆