fabric8-services / fabric8-tenant-jenkins

Generates Jenkins tenant namespace YAML
Apache License 2.0
2 stars 14 forks source link

Fix build not getting cancelled on update in PR #102

Closed piyush-garg closed 6 years ago

piyush-garg commented 6 years ago

Fixes openshiftio/openshift.io#3862

So when you push to a PR, the previous build keeps going on, but it should cancel and build for new commit should start. This change is to fix that

Regarding the file, this is autogenerated in var/lib/jenkins by the name of org.jenkinsci.plugins.ghprb.GhprbTrigger.xml

I am overriding that file by mentioning it in configmap with the key file name. I am using the whole content of that file an adding one more extension of CancelBuildOnUpdate

<org.jenkinsci.plugins.ghprb.extensions.build.GhprbCancelBuildsOnUpdate>
      <overrideGlobal>false</overrideGlobal>
</org.jenkinsci.plugins.ghprb.extensions.build.GhprbCancelBuildsOnUpdate>

Information regarding this configuration can be found here https://github.com/jenkinsci/ghprb-plugin/blob/master/src/main/java/org/jenkinsci/plugins/ghprb/extensions/build/GhprbCancelBuildsOnUpdate.java

fabric8cd commented 6 years ago

PR now available for testing: Launch in OpenShift.io and click the update tenant button

piyush-garg commented 6 years ago

@sthaha Updated the PR with relevant information

fabric8cd commented 6 years ago

PR now available for testing: Launch in OpenShift.io and click the update tenant button

fabric8cd commented 6 years ago

PR now available for testing: Launch in OpenShift.io and click the update tenant button

piyush-garg commented 6 years ago

This is regarding #113

piyush-garg commented 6 years ago

This feature will not help, as we are scheduling one job at a time, so fix needs to be added to sync plugin and PR is here https://github.com/fabric8io/jenkins-sync-plugin/pull/40

fabric8cd commented 6 years ago

PR now available for testing: Launch in OpenShift.io and click the update tenant button