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

The jobs should be able to skip the build #36

Open
arangamani opened this issue Mar 5, 2014 · 0 comments
Open

The jobs should be able to skip the build #36

arangamani opened this issue Mar 5, 2014 · 0 comments

Comments

@arangamani
Copy link
Member

The CI server currently builds a job for every single commit to master and pull requests. There are certain commits where we use the [skip ci] functionality provided by travis-ci to skip builds that only has non-functional changes but the cookbooks-ci doesn't currently has this feature.

Similar to the behavior of the travis CI, if either [ci skip] or [skip ci] is specified in the commit message, skip the CI build. This is not supported by default by the Jenkins Git plugin. But there is a simple plugin in Jenkins called Ci Skip which seems to work. It triggers a new build regardless of the commit message but the build finishes as NOT_BUILT if the commit message matches the skip regex. This is fine as long as it doesn't use any resources.

The following xml portion is added to the job configuration. This can simply be added to the job template in the buildWrappers section.

<buildWrappers>
  ...
  <ruby-proxy-object>
    <ruby-object ruby-class="Jenkins::Tasks::BuildWrapperProxy" pluginid="ci-skip">
      <pluginid pluginid="ci-skip" ruby-class="String">ci-skip</pluginid>
      <object ruby-class="CiSkipWrapper" pluginid="ci-skip">
        <ci__skip ruby-class="NilClass" pluginid="ci-skip"/>
      </object>
    </ruby-object>
  </ruby-proxy-object>
  ...
</buildWrappers>
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

1 participant