I would like to make a pipeline that as first step checks its own configuration and updates itself if needed.
What tool / API should I use for this? Is there a docker image that has this installed for the correct concourse version? What is the advised way to authenticate in concourse from such task?
naively, it'd be a task which gets the repo the pipeline is committed to, and does a
fly set-pipeline
to update the configuration. However there are a few gotchas here:fly
executable to be available to your container which runs this task, and it should be same version offly
as the concourse that's being targeted. Probably that means you should download it directly viacurl
from the host.fly
to use -- probably via parameters.--load-vars-from
rather than just--var
. My group uses Lastpass notes with a bunch of variables saved in them and download via thelpass
tool, but that gets hard if you use 2FA or similar.