2

I am trying to connect local git repository to concourse so that i can perform automated testing on my local environment even before committing the code to GitRepo. In other terms i want to perform some tasks before git commit using concourse pipeline for which i want to mount my local working directory to concourse pipeline jobs.

Anthon
  • 69,918
  • 32
  • 186
  • 246
Devanshu
  • 33
  • 1
  • 7

1 Answers1

3

You can't run a pipeline or a complete job with a local repository, only a task. But that's OK, as a job main goal is to setup inputs and outputs for a task, and you will be providing them locally

The command is fly execute, and the complete doc is here : https://concourse-ci.org/tasks.html#running-tasks

To run a tasks locally you will have to have the task in a separate yaml file, not inline in your pipeline.

The basic command where you run the task run-tests.yml with the input repository set to the current directory:

fly -t my_target execute --config run-tests.yml --input repository=.
Francois Mockers
  • 713
  • 4
  • 14