bare with me as this is my 2nd week really diving into pipelines on Azure but.. I saw an example where I can create a template that has a jobs:
section..
so I can properly segment things in the template.. however when I goto do this it's complaining
yaml snippet
# File: template_process_folder.yaml
parameters:
- name: folder_name
default: YOURFOLDER
jobs:
- job: ProcessFolder
pool:
vmImage: ubuntu-latest
displayName: "Processing Folder"
steps:
- bash: |
blah blah blah
Error
error line X, Col 1... Unexpected value 'jobs'
Anyone have a idea where what I am doing wrong? I've tried stages with it.. just 1 job.. etc.. only thing that works for me is simple steps only in templates
Edit: Could it be how I am calling my template? Is there a way to still loop through these array values but at the job level? I have not seen that in any doc as of now
how I call the template
- stage: Build
displayName: "Build"
jobs:
- job: "Execute_Tests"
displayName: "Run Tests"
steps:
- ${{each p in parameters.mylistoffolders}}:
- template: template_process_folder.yaml
parameters:
folder_name: ${{p}}
I think this is the problem.. and now am removing the template call from the steps
area and bumping it up to the jobs
area successfully.. but now my error is complaining that job names must be unique.. I figured just pass the folder name but it contains -
which are not allowed.. now trying to execute a replace call but unsuccessfully
new template job entry
jobs:
- job: ProcessFolder_${{ replace(${{parameters.folder_name}}, '-', '_') }}
error I get
unclosed function: 'replace'. Located at position 1 within expression replace(${{paramet....