I am looking for scm command which can be used to call RTC build definition from Jenkin's Job.
Earlier, I have tried Team Concert plugin to call build definition from jenkins. However, It has limitation of calling single "build definition".
I need to call multiple "build definition" of different streams from jenkins Job.
Related
I am a novice when it comes to Jenkins. I would like to be able to take different projects and build them in sequence with each other with a Pipeline. I have noticed that Jenkins can run various stages in sequence or in parallel via a Pipeline. Is there a way for this to happen with running projects in sequence or in parallel that exists on the same node?
I know this question is a bit old. But in case there's someone out there that might be searching for an answer, follow these steps (Remember the names of the Jobs as you need to type them)
Create a "Multijob Project"
In the "Build" section, type the Name of your first Job.
Again In the "Build" section, "Add build step" type the next Job name.
In both builds, "Block until the triggered projects finish" should be ticked.
Save & Build your Multijob Project.
Yes, you can use build step to trigger any project (job) you want in Jenkins. See https://jenkins.io/doc/pipeline/steps/pipeline-build-step/
Is it possible, or are there tools available to allow you, to import or convert a legacy Jenkins job build definition into a TFS 2017 build definition. I'm not looking to convert the job to a Jenkins job within TFS, but simply use the steps contained in the Jenkins job to create a new build definition.
If the steps contained in jenkins job you are meaning just as the following screen shows which you can specify the details of the job.
Unfortunately, it's not able to directly covert this to a TFS build definition. There is no such kind tool could do this. It's only able to Export/Import TFS vNext Build Definition itself. You have to manually convert jenkins job build definition to TFS build definition.
I have a number of projects that need to be analysed by SONAR from jenkins. These projects include ant and maven projects. I have created a separate job for each SONAR analysis in jenkins.
Is it possible to have a single jenkins job in which I can pass some parameters from each individual sonar job and then see the dashboard?
If so, how do i go about it?
This solution is for Subversion and Maven.
Install the Parameterized Trigger Plugin
Create a Maven job for the SonarQube analysis, eg. _common-sonar with these settings:
Source Code Management: "Subversion", Repository URL: $PREVIOUS_SVN_URL, Check-out Strategy: "Always check out a fresh copy"
Build: Goals and options: install
Post-build Actions: "Sonar"
For the job you want to run analysis on add a Post-build Action "Trigger parameterized build on other projects" with these settings:
Projects to build: _common-sonar
Add Predefined parameters: Parameters: PREVIOUS_SVN_URL=${SVN_URL}
Now when the job-to-analyse completes it triggers the analysis job. The analysis job checks out the same SVN URL which was used by the first job.
This solution works without scripting or copying workspaces but there are quite obvious limitations and non-ideal features:
the build command is always only mvn install
the SVN checkout may be from different revision than original build
checkout and build are always done from scratch
I didn't consider ant at all here.
Improvement ideas are quite welcome!
Late improvement edit:
Instead of using a maven build ( in _common-sonar), you may also use SonarQube directly by invoking a Standalone SonarQube analysis
Additionally to the SVN URL you can add a parameter for the build tag and project name to use in sonar. Simply add
NAME=YOUR_PROJECT_NAME
BUILDTAG=$BUILD_TAG
beneath the PREVIOUS_SVN_URL parameter.
In your _common-sonar you can use it with ${NAME} and ${BUILDTAG}.
In a similar need I had once, I created a single job, which pulled sources of several projects (each to its own sub-folder in job's workspace).
Then, I wrote a simple shell script that looped over all directories and ran the sonar analysis.
The job had the sonar post build plugin which showed an aggregated report.
Unfortunately, I don't have an example as this was some years ago, but you can make it work.
I hope this helps.
I am able to trigger jenkins job whenever i commit my ios project in SVN.
But my project has 4-5 configuration e.g. Debug, Release, DebugStaging, ReleaseStaging, DebugLive.
So what i want to achieve is, whenever I commit in SVN, jenkins should build 4-5 jobs based on my xcode configuration.
I tried in Jenkins Item configuration under Build -> Xcode -> General Build Settings -> Configuration to write DebugStaging, but it fails my jenkins job.
With the Xcode plugin, you have an option to set the configuration you want to use:
configuration: This is the name of the configuration as defined in the Xcode project.
By default there are Debug and Release configurations.
Then you will probably want to create a multi-configuration (matrix) Project.
The Configuration Matrix allows you to specify what steps to
duplicate, and create a multiple-axis graph of the type of builds to
create.
Basically in your job configuration page:
in Configuration Matrix, add a "User-defined axis" with name CONFIGURATION and values Debug, Release, DebugStaging, ReleaseStaging, DebugLive.
in Build, add a "Conditional step" (single or multiple):
in Run?, select "always",
in Builder, select your Xcode builder and set its CONFIGURATION to :
${ENV, var="CONFIGURATION"}
Your job should finally run as many times as you have configurations, that is 5 times.
Additional reading:
Building a matrix project
How to configure jenkins multi-configuration build and test
Jenkins and multi-configuration (matrix) jobs
Is it possible to execute a Post-build Deliver when using Jenkins server with RTC source?
This is my process;
When a job is started Jenkins connects to RTC Source using the Rational Team Concert plugin and fetches the required code. (Connects to RTC using a build definition which contains details of the workspace to use. This build definition also contains details of the post-build steps)
Jenkins tests/builds/deploys application
Job completes with a status of success.
When I open the results view for the build definition associated with this Jenkins job i notice the absence of any post-build delivery information in the Contribution Summary.
Using the setup I've mentioned should Post-build Delivery be possible?
#niloc,
The ability to initiate a post-deliver option currently only exists in JBE (Jazz Build Engine). There currently is an enhancement open to improve this for the Team Concert Plugin for Hudson/Jenkins ... Teamconcert plugin to trigger Post-Build Events configured in RTC Build Definition.
However, Heather describes a work around in a comment on 05/Dec/13.
Scott
The post-build delivery step can only be set in the build definition with in RTC.
Jenkins won't know anything about it: it doesn't execute that step. RTC does.