Task tag based on file

#1

Hi all,

Is it possible to use a file for the tag of the docker image for a particular task?
For example, I have a pipeline with git resource which contains this file with the tag for a task,
and in the image_resource declaration in task I have:

  • name: my-task
    plan:
    • get: git-resource
    • task: test
      config:
      platform: linux
      image_resource:
      type: docker-image
      source:
      password: ((password)
      repository: ((repo))
      tag: {tag-from-git-repo-file}
      username: ((username))

resources:

  • name: git-resource
    type: git
0 Likes

#2

@marco-m any guidelines?

0 Likes

#3

Your post is a little hard to read. Could you please format it as code. Use the </> button above the input field to format your code, command line output or error message (select the text first, then click the button or wrap it in `````` manually).

I don’t think what you’ve suggested is possible because the tag used by the docker resource is set when the pipeline is set rather than when the task is started.

1 Like