DanLocks
2 years agoQrew Trainee
Undocumented Pipeline yaml functionality
Pipeline yaml files can apparently use at least some of yaml's advanced features. I was able to use "yaml references" in my pipeline spec to avoid repeating long strings that might be prone to typos. specifically:
- IF:
- AND:
- a<>body_params.partner starts c1
- THEN:
- ACTION quickbase[abcdefg] bulk_record_set csv_import -> c:
inputs-meta:
csv_url: '{{b.file_transfer_handle}}'
header_row: &headers A,REALLY,LONG,LIST,OF,HEADERS
- IF:
- AND:
- a<>body_params.partner starts shi
- THEN:
- ACTION quickbase[bcdefgh] bulk_record_set csv_import -> e:
inputs-meta:
csv_url: '{{b.file_transfer_handle}}'
header_row: *headers
The &headers
creates a yaml reference to whatever follows. *headers
uses that reference.
Yaml references are kind of obscure and a bit tricky to use in my past experience, but they do work. Unfortunately, the references are not preserved: When you export the pipeline after using them, the export will have A,REALLY,LONG,LIST,OF,HEADERS
hard coded wherever the *headers
reference was used.
It would be nice if QB would publish a spec for these yaml files along the lines of Gitlab/Github/AWS CodeBuild/ etc.
------------------------------
Dan Locks
------------------------------