Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(question) Mark PR with "build started" creates a new version of a PR #15

Closed
artamonovkirill opened this issue Nov 8, 2018 · 3 comments

Comments

@artamonovkirill
Copy link

Given a job like

- name: test-pull-requests
  plan:
  - get: pull-request
    trigger: true
    version: every
  - get: node
  - put: pull-request
    params:
      state: INPROGRESS
      key: concourse-build
      description: Building on Concourse
  - task: test
    image: node
    privileged: true
    file: pull-request/config/concourse/tasks/test-pull-request.yml
    timeout: 1h
    on_success:
      put: pull-request
      params:
        state: SUCCESSFUL
        key: concourse-build
        description: Ready to merge
    on_failure:
      put: pull-request
      params:
        state: FAILED
        key: concourse-build
        description: Cannot merge

INPROGRESS put causes a new version of the same PR to be created in the resourse, so Concourse builds the same commit twice.
Is there a way to configure the plugin to ignore such type of PR updates?

@idr0id
Copy link
Member

idr0id commented Nov 12, 2018

Hi,

The Concourse is not available to skipping versions but have the workaround. You should add the resource with the same settings as pull-request for changing the build status only.

- name: test-pull-requests
  plan:
  - get: pull-request
    trigger: true
    version: every
  - get: node
  - put: pull-request-status
    params:
      state: INPROGRESS
      key: concourse-build
      description: Building on Concourse

@artamonovkirill
Copy link
Author

👍 Great! Would it make sense to mention this workaround in the documentation?

idr0id added a commit that referenced this issue Jan 28, 2019
add troubleshooting for #15
@idr0id
Copy link
Member

idr0id commented Jan 28, 2019

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants