0

I am attempting to trigger a concourse job from the command line. My pipeline has one resource (a git repo) and one job, which uses that repo. I am seeing:

$ fly -t tutorial trigger-job -j my-pipeline/my-job -w
error: resource not found

However, when I go the web UI and manually trigger the job by pressing the "+" button in the top right, it works fine.

Here is the full pipeline:

resources:
- name: cruise-source
  type: git
  source:
    uri: git@github.com:my-org/cruise.git
    branch: develop

jobs:
- name: build-image
  public: true
  plan:
  - get: cruise-source
  - task: list-files
    config:
      platform: linux
      image_resource:
        type: docker-image
        source: {repository: alpine}
      inputs:
      - name: cruise-source
      run:
        path: ls
        args: [cruise-source]

How can I trigger this job from the CLI?

Alex Flint
  • 6,040
  • 8
  • 41
  • 80

1 Answers1

1

The "resource not found" you get has nothing to do with the git resource :-) it actually means that the pipeline or job name is wrong. Looking at your pipeline configuration, you should issue

fly -t tutorial trigger-job -j my-pipeline/build-image -w

or if your configuration is different from what you have posted, maybe you have a typo in the name of the pipeline or job.

marco.m
  • 4,573
  • 2
  • 26
  • 41