Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

Adding a Build Trigger

Jeremy Poulin edited this page Dec 4, 2018 · 7 revisions

Brewhub Build

For a brewhub build (internal to RedHat), you'll want to do the following:

  1. Make sure the RedHat CI Jenkins plugin is installed on your Jenkins.
  2. Add a buildTrigger block in the Jenkinsfile. This is where you'd set the JMS trigger for the brew event that kicks off your build.
// TODO Fill out UUID, pkg-name, and relevant-tag
pipelineTriggers(
      [
        [
          $class: 'CIBuildTrigger',
          noSquash: true,
          providerData:
            [
            $class: 'ActiveMQSubscriberProviderData',
            name: 'Red Hat UMB',
            overrides: ['Consumer.rh-jenkins-ci-plugin.${UUID}.VirtualTopic.eng.brew.>'],
            selector: "name = '${PKG_NAME}' AND type = 'Tag' AND tag LIKE '${RELEVANT_TAG}'",
            timeout: null
          ]
        ]
      ]
),