Skip to content

Get Git resource fails, but without stopping the pipeline #2158

Closed

Description

@razvan-moj-zz

Bug Report

Concourse fails to pull from git but continues the pipeline, which of course fails later on because there are no files in /tmp/build/get

resources:
- name: app-source
  type: git
  source:
    uri: https://github.com/app-demo
    branch: build-app
- name: run-app
  serial: true
  plan:
  - get: app-source
    trigger: true
  - task: publish
    config:
      platform: linux
      image_resource:
        type: docker-image
        source:
          repository: .dkr.ecr.eu-west-1.amazonaws.com/concourse-workers
          tag: worker-demo
      run:
        path: /bin/bash
        args:
          - -exc
          - |
            ls -alh /tmp/build/get
^^^ here it fails as the dir is not there

The web interface displays the step, with branch/commit/etc on the right side but on the left side I don't see the expected "Cloning into '/tmp/build/get'"

  • Concourse version: 3.10
  • Deployment type (BOSH/Docker/binary): Helm chart
  • Infrastructure/IaaS: k8s
  • Browser (if applicable): Chrome
  • Did this used to work? randomly

Activity

  1. jtarchie commented on Apr 18, 2018

    @jtarchie
    Contributor

    You are looking at the wrong directory in the task.

    1. You have to add the resource as an input to the task.
    2. You need to reference that bind mount point.
    resources:
    - name: app-source
      type: git
      source:
        uri: https://github.com/app-demo
        branch: build-app
    - name: run-app
      serial: true
      plan:
      - get: app-source
        trigger: true
      - task: publish
        config:
          input:
          - name: app-source
          platform: linux
          image_resource:
            type: docker-image
            source:
              repository: .dkr.ecr.eu-west-1.amazonaws.com/concourse-workers
              tag: worker-demo
          run:
            path: /bin/bash
            args:
              - -exc
              - |
                ls -alh app-source/
    
  2. razvan-moj-zz commented on Apr 18, 2018

    @razvan-moj-zz
    Author

    Thank you!

      - task: publish
        config:
          inputs:
            - name: app-source
    

    works, I thought 'get' was supposed to do this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions