我正在使用jenkins-job-builder来创建我的管道项目。但是当我尝试重用或传播时,我遇到了变量值的问题。jenkins-job-builder不传播变量值
这是我的项目配置:
- project:
name: myproject
git_url: [email protected]:demos-products/myproject.git
jobs:
- '{name}-nfr-smoke-tests':
pipeline-next: '{name}-nfr-smoke-tests'
这里是我的job-template:
- job-template:
name: "{name}-nfr-smoke-tests"
node: 'slave1'
scm:
- git:
skip-tag: false
url: '[email protected]:test-products/{name}-nfr-tests.git'
branches:
- master
wipe-workspace: true
builders:
- shell: |
bundle install
bundle exec cucumber features/smoke.feature
publishers:
- trigger:
project: "{pipeline-next}"
threshold: SUCCESS
好了,现在当我运行詹金斯这个配置和我检查作业的建筑,它说:
No such project ‘{name}-nfr-smoke-tests’. Did you mean ‘myproject-nfr-smoke-tests’?
为什么行:pipeline-next: '{name}-nfr-smoke-tests'
不传播变量的值名称并只是用它作为文字字符串?我错过了一些东西。