If task file (file: task.yml
) in pipeline (pipeline.yml
) config needs to contain some {{properties}}
, what is a proper way to add them?
In my case, I want to use a custom docker image from repository that uses authentication, and I don't want to hardcode/commit credentials in task yml itself.
Is the a way to do that currently without moving task config to the main pipeline yml?
Clarification: I want to parameterize task.yml
file itself (for example, input: {{input_name}}
).
In your task.yml
you can specify required params, e.g:
params:
USERNAME:
PASSWORD:
And then provide them in pipeline.yml
:
jobs:
- name: my-job
plan:
- get: ci-files
- task: my-task
file: ci-files/task.yml
params:
USERNAME: {{username}}
PASSWORD: {{password}}
Configure pipeline as:
fly set-pipeline -p pipeline-name -c pipeline.yml -v=USERNAME=my-username -v=PASSWORD=my-password
Then these params will be available to you as environment variables inside your task.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With