2

In my task I have

file: tasks/build-task-config.yml

unknown artifact source: 'tasks' in task config file path 'tasks/build-task-config.yml'

I'm running concourse via docker-compose

  • ci/
    • pipeline.yml
    • tasks/
      • build-task-config.yml

Above is my directory structure.

This is how I run fly

fly -t tutorial set-pipeline -c ./ci/main-pipeline.yml -p test-frontend

  1. How I can resolve this issue?
  2. How do paths works in Concourse ?

Edit: I've tried with path ci/tasks/build-task-config.yml but it's also not working

hejkerooo
  • 709
  • 2
  • 7
  • 20

1 Answers1

1

You need an input to the task called tasks. This may come from a get: step, or as the output of a previous task. Most likely you have a get with your repo that has this code (let's pretend it's called source). If that's the case, then your task should look like this

- task: build-task-config # Or whatever name you want
  file: source/ci/tasks/build-task-config.yml
  ...

Everything has to be relative to an input in a task, if it's not part of the base image.

Josh Ghiloni
  • 1,260
  • 8
  • 19
  • 1
    Does concourse always needs to pull some files from git repository? I've resolved my issues by simply using yaml anchors, but I'm struggling with ansible right now - I really don't want to mess up my repository when I'm testing different tasks etc. – hejkerooo Apr 22 '20 at 16:56
  • No, not always, but it must have access to the file in the filesystem of the container. Usually this comes from the task inputs, though it's possible you've baked them into the image. – Josh Ghiloni Apr 22 '20 at 23:31