Jenkins

Jenkins: Passing Arguments between projects/builds

Problem: Test Project needlessly builds its target application

Currently Project2 requires a full build before executing tests - simply because the test tools are integrated into Project1.

Also, Project2 is a PHP Composer project, so the test tool binaries are NOT present after pulling source from SCM. Composer install is required before those binaries are available. With build times of roughly 50m & test times of less than 10m - this feels like insanity.

 

Solution

The project(Projec1) build & tests(Project2) need to be segregated so Project1 needs to pass its ${WORKSPACE} value to the triggered 'downstream' project. To do so use 'Predefined parameters':

Projec1 - Upstream - Parameters

BuildDeployWkspc=${WORKSPACE}
BuildDeployBuildNum=${BUILD_NUMBER}

 

Project2 - DownStream - Variables

$BuildDeployWkspc
$BuildDeployBuildNum

 

Tags

Jenkins: 13 - What is Pipeline in Jenkins

What is Pipeline in Jenkins

  • Workflow with group of events or jobs that are chained & integrated with each other in sequence.
  • Every job in a pipeline has some dependency on one or more other jobs

Continuous Delivery Pipeline

  • Build Jobs
    • Notification Feedback
  • Deploy Jobs
    • Notification Feedback
  • Test Jobs
    • Notification Feedback
  • Release Jobs
    • Notification Feedback

 

Tags
Subscribe to Jenkins