(question) Mark PR with "build started" creates a new version of a PR
artamonovkirill opened this issue · 3 comments
artamonovkirill commented
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 commented
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 commented
👍 Great! Would it make sense to mention this workaround in the documentation?
idr0id commented
Done.