Goal
I'm trying to orchestrate a dependency chain using the GitHub organization plugin along with the jenkins pipeline.
As the products I'm building have a number of shared dependencies, I'm using nuget packages to manage dependency versioning and updates.
However, I'm having trouble getting necessary artifacts/info to the projects doing the orchestration.
Strategy
On a SCM change any upstream shared libraries should build a nuget package and orchestrate any downstream builds that need new references:
TLDR: I need a method of either passing a string or text file upstream to a job mid-execution (from multiple downstream jobs) OR I need a method for multiple dowstream jobs with shared downstream dependencies to coordinate and jointly pass information to a downstream job (triggering it only once).
Thanks!
This article can be useful for you - https://www.cloudbees.com/blog/using-workflow-deliver-multi-componentapp-pipeline
sometimes Artifact way is needed. upstream job:
void runStaging(String VERSION) {
stagingJob = build job: 'staging-start', parameters: [
string(name: 'VERSION', value: VERSION),
]
step ([$class: 'CopyArtifact',
projectName: 'staging-start',
filter: 'IP',
selector: [$class: 'SpecificBuildSelector',
buildNumber: stagingJob.id
]
]);
IP = sh(returnStdout: true, script: "cat IP").trim()
...
}
downstream job
sh 'echo 10.10.0.101 > IP'
archiveArtifacts 'IP'