1

Having this task configuration:

config:
  platform: linux
  inputs:
    - name: resource_to_run_in
    - name: resource_with_scripts
  run:
    path: resource_with_scripts/script.sh
    dir: resource_to_run_in

I get the following error:

Backend error: Exit status: 500, message: {"Type":"ExecutableNotFoundError","Message":"exec failed: container_linux.go:344: starting container process caused \"exec: \\\"resource_with_scripts/script.sh\\\": stat resource_with_scripts/script.sh: no such file or directory\"\n","Handle":"","ProcessID":"","Binary":""}

I was expecting Concourse to run the absolute path of script.sh in the directory of the resource resource_to_run_in.

How can I achieve this?

Gabriel Petrovay
  • 20,476
  • 22
  • 97
  • 168

1 Answers1

1

The only way I found is to use dot-navigation:

config:
  platform: linux
  inputs:
    - name: resource_to_run_in
    - name: resource_with_scripts
  run:
    path: ../resource_with_scripts/script.sh
    dir: resource_to_run_in

This way it works, still I wish Concourse would resolve these resource names to absolute paths at runtime (without displaying them to the user)

Gabriel Petrovay
  • 20,476
  • 22
  • 97
  • 168