Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jenkinsci/pipeline-dependency-walker-plugin
Jenkins plugin, pipeline step, that allows you to perform given pipeline step(s) on a maven job and all its linked jobs.
https://github.com/jenkinsci/pipeline-dependency-walker-plugin
dependency-graph jenkins pipeline
Last synced: about 7 hours ago
JSON representation
Jenkins plugin, pipeline step, that allows you to perform given pipeline step(s) on a maven job and all its linked jobs.
- Host: GitHub
- URL: https://github.com/jenkinsci/pipeline-dependency-walker-plugin
- Owner: jenkinsci
- Created: 2017-01-17T15:10:09.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-15T17:41:19.000Z (about 2 years ago)
- Last Synced: 2025-01-30T06:11:15.262Z (6 days ago)
- Topics: dependency-graph, jenkins, pipeline
- Language: Java
- Homepage: https://plugins.jenkins.io/pipeline-dependency-walker/
- Size: 60.5 KB
- Stars: 2
- Watchers: 4
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Dependency Walker Plugin
========================Licensed under [MIT Licence].
About
-----
Allows you to perform given pipeline step(s) on a job and all its linked jobs.Linked jobs are the upstreams of the job, derived from maven dependencies. Dependency graph can be visualized using
[Dependency Graph View Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Dependency+Graph+View+Plugin).Usage scenarios
---------------### Clean build
The plugin can be used to preform a clean build in the isolated environment for the group of dependent projects.Example of pipeline configuration:
```groovy
node {
stage('build') {
echo "cleanup workspace"
deleteDir()mvnRepo=pwd() + "/m2" // set local maven repo
echo "use maven repo $mvnRepo"walk job: 'parent-project', jobAction: '''
dir(JOB_NAME) {
git url: JOB_SCM_URL, branch: JOB_SCM_BRANCH, credentialsId: JOB_SCM_CREDINTIALS_ID
withMaven(maven: 'mvn', mavenLocalRepo: mvnRepo) {
sh "mvn clean install"
}
}
'''
}
}```
### Multiple release
Another use case is a multiple release. When the release action
(see [Release Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Release+Plugin) or
[M2 Release Plugin](https://wiki.jenkins-ci.org/display/JENKINS/M2+Release+Plugin)) is defined
in a way that it drops SNAPSHOT keyword from dependencies, than using this plugin one can trigger
a consistent release of multiple modules.
In this scenario release should first update dependencies, for example invoking following maven target:
`versions:use-releases scm:checkin -Dmessage="drop snapshot versions"`In some way the plugin is an alternative to [Maven Cascade Release Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Maven+Cascade+Release+Plugin).
Example of pipeline configuration:
```groovy
node {
stage('build') {
walk job: 'parent-project', failOnUnstable: true, jobAction: 'release JOB_NAME'
}
}
```How to develop
--------------First run a development instance of jenkins by executing a command
mvn hpi:runGo to [jenkins development instance](http://localhost:8080/jenkins) and configure as following:
1. In [system configuration](http://localhost:8080/jenkins/configure) click on `Maven installations...` button and configure:
* Set `Name` to `mvn`
* deselect`Install automatically`
* set `MAVEN_HOME` to your local maven installation (e.g. `/usr/share/maven`)
2. In [plugin manager](http://localhost:8080/jenkins/pluginManager/available) install following plugins with *restart*:
* [Pipeline](https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Plugin)
* [Pipeline Maven Integration Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Maven+Plugin)