Unable to pass "git-triggered job example" given in concourse docs

#1

Getting “error: extra keys in the task configuration: resources, jobs” error when trying to execute the config given from below concourse-ci URL

https://concourse-ci.org/git-trigger-example.html

Error:

image

Contents of git_example.yml:


resources:

jobs:

  • name: job
    public: true
    plan:
    • get: concourse-docs-git
      trigger: true
    • task: list-files
      config:
      inputs:
      - name: concourse-docs-git
      platform: linux
      image_resource:
      type: registry-image
      source: { repository: busybox }
      run:
      path: ls
      args: ["-la", “./concourse-docs-git”]
#2

Hello Vels, welcome!

Could you please edit your post? it is not very readable at the moment.

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). Check the preview if it looks better. This will make sure your text is readable and if it recognizes the programming language it also automatically adds code syntax highlighting.

The error might be the icon line, it needs Concourse 5.1.

#3

Hi Marco,

Thanks for your time in checking this!

Post is in decent format now :slight_smile:

I have removed/commented the icon in my code even then I’m facing the same problem

Note: I’m using the latest(5.1) version of docker image from docker hub uploaded by concourse with the name concourse/concourse

image

Thanks,
Vels…

#4

Your problem is that you are trying to fly execute an entire pipeline rather than a task. To use the example code from the docs you will need to use fly set-pipeline instead.

fly execute is used for running a local task config on a Concourse worker while set-pipeline submits the configuration of a pipeline to Concourse so it appears in the UI and jobs within the pipeline can then be run as part of the pipeline.

https://concourse-ci.org/setting-pipelines.html#fly-set-pipeline
https://concourse-ci.org/running-tasks.html#fly-execute