小编Ant*_*sov的帖子

如何正确使用Jenkins管道`options`

摘要生成器properties为我创建了一个区块。首次运行报告

WorkflowScript: 1: The properties section has been renamed as of version 0.8. Use options instead. @ line 1, column 1.
   pipeline {
Run Code Online (Sandbox Code Playgroud)

替换propertiesoptions结果并显示以下错误:

Errors encountered validating Jenkinsfile:
WorkflowScript: 4: options can not be empty @ line 4, column 5.
   options([$class: 'ThrottleJobProperty',
Run Code Online (Sandbox Code Playgroud)

这是完整jenkinsfile的参考

pipeline {
    agent any

    options([[$class: 'ThrottleJobProperty',
            categories: ['xcodebuild'],
            limitOneJobWithMatchingParams: false,
            maxConcurrentPerNode: 0,
            maxConcurrentTotal: 0,
            paramsToUseForLimit: '',
            throttleEnabled: true,
            throttleOption: 'category']])

    stages {
        stage("Empty" {
            steps {
                echo "Do nothing" …
Run Code Online (Sandbox Code Playgroud)

groovy jenkins jenkins-pipeline

7
推荐指数
2
解决办法
1万
查看次数

标签 统计

groovy ×1

jenkins ×1

jenkins-pipeline ×1