Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-18421

Teamconcert plugin to trigger Post-Build Events configured in RTC Build Definition

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      If I create a Build Definition in RTC and add the Post-Build Tabpage (deliver to stream, promote snapshot (change owner), etc.) these settings are currently not triggered at the end of the build process.

      Please extend the plugin to trigger these post-build events.

        Attachments

          Activity

          Hide
          nedgar Nick Edgar added a comment -

          Regarding post-build deliver, the plugin does not currently support that, just the initial SCM phase.

          In the interim, it's possible to add a step to the build to invoke JBE as a one-off to run a particular phase of the build, e.g.:
          jbe -repository REPO_ADDR -userId USER_ID -passwordFile PASSWORD_FILE -engineId ENGINE_ID -buildResultUUID $buildResultUUID -participants com.ibm.team.build.autoDeliver -noComplete -verbose

          Where $buildResultUUID is the property within Jenkins containing the build result UUID.
          Can also use -pass PASSWORD if you're not using a password file, but there's a risk then that the password would appear in the build log.

          Show
          nedgar Nick Edgar added a comment - Regarding post-build deliver, the plugin does not currently support that, just the initial SCM phase. In the interim, it's possible to add a step to the build to invoke JBE as a one-off to run a particular phase of the build, e.g.: jbe -repository REPO_ADDR -userId USER_ID -passwordFile PASSWORD_FILE -engineId ENGINE_ID -buildResultUUID $buildResultUUID -participants com.ibm.team.build.autoDeliver -noComplete -verbose Where $buildResultUUID is the property within Jenkins containing the build result UUID. Can also use -pass PASSWORD if you're not using a password file, but there's a risk then that the password would appear in the build log.
          Hide
          scowan Scott Cowan added a comment -
          Show
          scowan Scott Cowan added a comment - This feature is being tracked here, https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/277270
          Hide
          praveenkpatidar Praveen Patidar added a comment -

          One more concern about this. As I have added the step for the delivering the code in promoted stream once the build is done. The issue I am facing here is the junit test case is failed even after this the build triggers the step to promote the code.

          Is there anything can be done to restrict the delivery if the test case is failed.

          Show
          praveenkpatidar Praveen Patidar added a comment - One more concern about this. As I have added the step for the delivering the code in promoted stream once the build is done. The issue I am facing here is the junit test case is failed even after this the build triggers the step to promote the code. Is there anything can be done to restrict the delivery if the test case is failed.
          Hide
          scowan Scott Cowan added a comment -

          Hi Praveen,

          The Team Concert Plugin for Jenkins does not currently support starting post-build options in RTC. That is what this enhancement is intended to address. Would you mind detailing your build at https://jazz.net/forum and asking your questions there? You'll have a wider audience of Jazz developers to respond.

          Show
          scowan Scott Cowan added a comment - Hi Praveen, The Team Concert Plugin for Jenkins does not currently support starting post-build options in RTC. That is what this enhancement is intended to address. Would you mind detailing your build at https://jazz.net/forum and asking your questions there? You'll have a wider audience of Jazz developers to respond.
          Hide
          hfraserdube Heather Fraser-Dube added a comment -

          As an example on how to configure the Jenkins build to do the post-build step...

          Create a Jazz Build Engine. You just need to define it. No builds need to be associated with it. It will only run briefly within your Jenkins Job to perform the post-build step.

          Add a step to your build to run the jazz build engine to invoke the post-build deliver participant.
          jbe -repository %repositoryAddress% -userId USER_ID -passwordFile PASSWORD_FILE -engineId ENGINE_ID -buildResultUUID %RTCBuildResultUUID% -participants com.ibm.team.build.autoDeliver -noComplete -verbose

          %RTCBuildResultUUID% is an env variable that will be substituted by Jenkins, it contains the build result UUID.
          ENGINE_ID is the id of the engine previously defined. USER_ID is the user id to use within RTC. PASSWORD_FILE is the file containing the password for the user. These will all likely be the same values as you configured Jenkins with.

          The jbe executable is located within the Toolkit. Example:
          <my install dir>/jazz/buildsystem/buildengine/eclipse/jbe

          If you receive an error about: Failed to load the JNI shared library ... \jre\bin\j9vm\jvm.dll Add a -vm arg specifying the location of the java.exe.

          This is what my extra step on Windows looks like:
          C:/BuildToolkits/RTC-BuildSystem-Toolkit-Win-4.0.4/jazz/buildsystem/buildengine/eclipse/jbe -vm C:/ibm-java-sdk-60-win-x86_64/sdk/jre/bin/java -repository %repositoryAddress% -userId heatherf -passwordFile C:/Jenkins/heatherf-password -engineId JenkinsPostDeliver -buildResultUUID %RTCBuildResultUUID% -participants com.ibm.team.build.autoDeliver -noComplete

          Show
          hfraserdube Heather Fraser-Dube added a comment - As an example on how to configure the Jenkins build to do the post-build step... Create a Jazz Build Engine. You just need to define it. No builds need to be associated with it. It will only run briefly within your Jenkins Job to perform the post-build step. Add a step to your build to run the jazz build engine to invoke the post-build deliver participant. jbe -repository %repositoryAddress% -userId USER_ID -passwordFile PASSWORD_FILE -engineId ENGINE_ID -buildResultUUID %RTCBuildResultUUID% -participants com.ibm.team.build.autoDeliver -noComplete -verbose %RTCBuildResultUUID% is an env variable that will be substituted by Jenkins, it contains the build result UUID. ENGINE_ID is the id of the engine previously defined. USER_ID is the user id to use within RTC. PASSWORD_FILE is the file containing the password for the user. These will all likely be the same values as you configured Jenkins with. The jbe executable is located within the Toolkit. Example: <my install dir>/jazz/buildsystem/buildengine/eclipse/jbe If you receive an error about: Failed to load the JNI shared library ... \jre\bin\j9vm\jvm.dll Add a -vm arg specifying the location of the java.exe. This is what my extra step on Windows looks like: C:/BuildToolkits/RTC-BuildSystem-Toolkit-Win-4.0.4/jazz/buildsystem/buildengine/eclipse/jbe -vm C:/ibm-java-sdk-60-win-x86_64/sdk/jre/bin/java -repository %repositoryAddress% -userId heatherf -passwordFile C:/Jenkins/heatherf-password -engineId JenkinsPostDeliver -buildResultUUID %RTCBuildResultUUID% -participants com.ibm.team.build.autoDeliver -noComplete
          Hide
          kmayfiel Kevin Mayfield added a comment -

          The WIKI page for this plugin needs to document the environment variables added by the plugin.

          %RTCBuildResultUUID% for example.

          Show
          kmayfiel Kevin Mayfield added a comment - The WIKI page for this plugin needs to document the environment variables added by the plugin. %RTCBuildResultUUID% for example.
          Hide
          lvaikunt Lakshmi Narasimhan Vaikuntam added a comment -

          With Team Concert Plugin 1.2.0.3, Post build deliver support has been added for Build Definition configuration. See here

          Show
          lvaikunt Lakshmi Narasimhan Vaikuntam added a comment - With Team Concert Plugin 1.2.0.3, Post build deliver support has been added for Build Definition configuration. See here
          Hide
          lvaikunt Lakshmi Narasimhan Vaikuntam added a comment -

          Delivered in Team Concert Plugin 1.2.0.3. Requires RTC server 6.0.4 and above.

          Show
          lvaikunt Lakshmi Narasimhan Vaikuntam added a comment - Delivered in Team Concert Plugin 1.2.0.3. Requires RTC server 6.0.4 and above.

            People

            • Assignee:
              Unassigned
              Reporter:
              aeon512 Florian Hug
            • Votes:
              6 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: