2017-04-09 129 views
2

我想創建一個詹金斯作業使用詹金斯作業生成器, 至今沒有運氣的文件夾內的文件夾內;(放置一個詹金斯作業使用詹金斯作業生成器

下面創建任務和文件夾,但工作不是裏面的文件夾;(

請幫助休息,framework.yaml

- job: 
name: folder_test 
project-type: folder 
primary-view: project_view 
health-metrics: 
    - worst-child-health-metric 

- view: 
name: project_view 
view-type: list 
folder: true 
columns: 
    - status 
    - weather 
    - job 
    - last-success 
    - last-failure 
    - last-duration 
regex: (?!rest-framework.*).* 

- job-template: 
name: '{name}-hello-world' 
builders: 
    - shell: 'echo "hello world!"' 

- project: 
name: rest-framework 
jobs: 
    - '{name}-hello-world' 

回答

0

內容爲了PLAC e您在文件夾中創建的作業,確保項目級別或作業級別的名稱包含該文件夾。

例子:

- job-template: 
name: '{name}-hello-world' 
builders: 
    - shell: 'echo "hello world!"' 

- project: 
name: folder_test/rest-framework 
jobs: 
- '{name}-hello-world' 

這個片段需要已創建的文件夾(你在上面做了,但在這裏把它割下來爲簡單起見)。

編輯:刪除原來的回覆說這是不可能的,但我做了更多的測試,找到使用Jenkins-Jobs-Builder 2.0.0的解決方案。