-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
51 changed files
with
3,437 additions
and
3,437 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
/target | ||
/work | ||
.settings/ | ||
.DS_Store | ||
.classpath | ||
.project | ||
.idea | ||
*.iml | ||
/target | ||
/work | ||
.settings/ | ||
.DS_Store | ||
.classpath | ||
.project | ||
.idea | ||
*.iml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
## When to use MultiJob (tikal-multijob-plugin) plugin ? | ||
- If you'd like to stop the mess with downstream / upstream jobs chains definitions | ||
- When you want to add full hierarchy of Jenkins jobs that will be executed in sequence or in parallel | ||
- Add context to your buildflow implementing parameter inheritance from the MultiJob to all its Phases and Jobs, Phases are sequential whilst jobs inside each Phase are parallel | ||
|
||
### More info on wiki page @: https://wiki.jenkins-ci.org/display/JENKINS/Multijob+Plugin | ||
|
||
### Found a bug ? require a new feature ? | ||
#### Feel free to open an issue: https://github.com/jenkinsci/tikal-multijob-plugin/issues | ||
**** | ||
### Plugin CI job: https://jenkins.ci.cloudbees.com/job/plugins/job/tikal-multijob-plugin/ | ||
## When to use MultiJob (tikal-multijob-plugin) plugin ? | ||
- If you'd like to stop the mess with downstream / upstream jobs chains definitions | ||
- When you want to add full hierarchy of Jenkins jobs that will be executed in sequence or in parallel | ||
- Add context to your buildflow implementing parameter inheritance from the MultiJob to all its Phases and Jobs, Phases are sequential whilst jobs inside each Phase are parallel | ||
|
||
### More info on wiki page @: https://wiki.jenkins-ci.org/display/JENKINS/Multijob+Plugin | ||
|
||
### Found a bug ? require a new feature ? | ||
#### Feel free to open an issue: https://github.com/jenkinsci/tikal-multijob-plugin/issues | ||
**** | ||
### Plugin CI job: https://jenkins.ci.cloudbees.com/job/plugins/job/tikal-multijob-plugin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,44 @@ | ||
# Retrying failed subjobs # | ||
|
||
The MultiJob plugin provides a retry functionality for subjobs. | ||
|
||
1. On the Jenkins master server: store a text file with the content from the Jenkins output to parse, e.g. in `/etc/jenkins/retryrules/myrule`. If the defined text has been found and the subjob's status is `UNSTABLE`: restart that subjob. | ||
|
||
* Example: Retry when a subjob is failed, but not unstable (pre plugin version 1.25 behaviour): | ||
|
||
```Finished: FAILURE``` | ||
|
||
* Example: Retry when some action in the job fails due to an exception (in this case some sort of timeout): | ||
|
||
```java.util.concurrent.TimeoutException``` | ||
|
||
* Example: Retry anyway when the status is `FAILURE`, regardless of output: | ||
|
||
```.*``` | ||
|
||
2. Go to Jenkins -> *Manage Jenkins* -> *Configure System* -> *MultiJob Retry Rules* | ||
* Add a new *Parsing Rule* | ||
* Pick a descriptive *Name*, e.g. `myrule` | ||
* Point *Parsing Rules File* to the file on the Jenkins master, e.g. `/etc/jenkins/retryrules/myrule` | ||
* *Save* the configuration | ||
|
||
3. Go to your MultiJob Jenkins job -> *MultiJob Phase* -> *Phase Jobs* -> *[YOUR_SUBJOB]* | ||
* Tick *Enable Retry* | ||
* Select the appropriate strategy, e.g. `myrule` | ||
* Set the amount of *retries*. Note that 3 retries means that a job will be executed at most 4 times. | ||
|
||
4. In the *Console log* of your MultiJob you can see the retries, e.g: | ||
``` | ||
Finished Build : #1 of Job : Y with status : FAILURE | ||
Scanning failed job console output using parsing rule file /etc/jenkins/retryrules/myrule. | ||
Known failure detected, retrying this build. Try 1 of 2. | ||
Finished Build : #2 of Job : Y with status : FAILURE | ||
Scanning failed job console output using parsing rule file /etc/jenkins/retryrules/myrule. | ||
Known failure detected, retrying this build. Try 2 of 2. | ||
Finished Build : #3 of Job : Y with status : FAILURE | ||
Known failure detected, max retries (2) exceeded. | ||
Build step 'MultiJob Phase' marked build as failure | ||
``` | ||
# Retrying failed subjobs # | ||
|
||
The MultiJob plugin provides a retry functionality for subjobs. | ||
|
||
1. On the Jenkins master server: store a text file with the content from the Jenkins output to parse, e.g. in `/etc/jenkins/retryrules/myrule`. If the defined text has been found and the subjob's status is `UNSTABLE`: restart that subjob. | ||
|
||
* Example: Retry when a subjob is failed, but not unstable (pre plugin version 1.25 behaviour): | ||
|
||
```Finished: FAILURE``` | ||
|
||
* Example: Retry when some action in the job fails due to an exception (in this case some sort of timeout): | ||
|
||
```java.util.concurrent.TimeoutException``` | ||
|
||
* Example: Retry anyway when the status is `FAILURE`, regardless of output: | ||
|
||
```.*``` | ||
|
||
2. Go to Jenkins -> *Manage Jenkins* -> *Configure System* -> *MultiJob Retry Rules* | ||
* Add a new *Parsing Rule* | ||
* Pick a descriptive *Name*, e.g. `myrule` | ||
* Point *Parsing Rules File* to the file on the Jenkins master, e.g. `/etc/jenkins/retryrules/myrule` | ||
* *Save* the configuration | ||
|
||
3. Go to your MultiJob Jenkins job -> *MultiJob Phase* -> *Phase Jobs* -> *[YOUR_SUBJOB]* | ||
* Tick *Enable Retry* | ||
* Select the appropriate strategy, e.g. `myrule` | ||
* Set the amount of *retries*. Note that 3 retries means that a job will be executed at most 4 times. | ||
|
||
4. In the *Console log* of your MultiJob you can see the retries, e.g: | ||
``` | ||
Finished Build : #1 of Job : Y with status : FAILURE | ||
Scanning failed job console output using parsing rule file /etc/jenkins/retryrules/myrule. | ||
Known failure detected, retrying this build. Try 1 of 2. | ||
Finished Build : #2 of Job : Y with status : FAILURE | ||
Scanning failed job console output using parsing rule file /etc/jenkins/retryrules/myrule. | ||
Known failure detected, retrying this build. Try 2 of 2. | ||
Finished Build : #3 of Job : Y with status : FAILURE | ||
Known failure detected, max retries (2) exceeded. | ||
Build step 'MultiJob Phase' marked build as failure | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,41 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.jvnet.hudson.plugins</groupId> | ||
<artifactId>plugin</artifactId> | ||
<version>1.395</version> | ||
</parent> | ||
|
||
<groupId>com.tikal.hudson.plugins</groupId> | ||
<artifactId>hudson-multijob-plugin</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<packaging>hpi</packaging> | ||
<repositories> | ||
<repository> | ||
<id>tikal-public</id> | ||
<url>${public.repository.url}</url> | ||
</repository> | ||
</repositories> | ||
|
||
<pluginRepositories> | ||
<pluginRepository> | ||
<id>tikal-public</id> | ||
<url>${public.repository.url}</url> | ||
</pluginRepository> | ||
</pluginRepositories> | ||
|
||
<properties> | ||
<!--<public.repository.url>http://maven.glassfish.org/content/groups/public/</public.repository.url> --> | ||
<public.repository.url>http://dev.tikalk.com/nexus/content/groups/public/</public.repository.url> | ||
</properties> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.jvnet.hudson.main</groupId> | ||
<artifactId>hudson-war</artifactId> | ||
<type>war</type> | ||
<version>${project.parent.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
</project> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.jvnet.hudson.plugins</groupId> | ||
<artifactId>plugin</artifactId> | ||
<version>1.395</version> | ||
</parent> | ||
|
||
<groupId>com.tikal.hudson.plugins</groupId> | ||
<artifactId>hudson-multijob-plugin</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<packaging>hpi</packaging> | ||
<repositories> | ||
<repository> | ||
<id>tikal-public</id> | ||
<url>${public.repository.url}</url> | ||
</repository> | ||
</repositories> | ||
|
||
<pluginRepositories> | ||
<pluginRepository> | ||
<id>tikal-public</id> | ||
<url>${public.repository.url}</url> | ||
</pluginRepository> | ||
</pluginRepositories> | ||
|
||
<properties> | ||
<!--<public.repository.url>http://maven.glassfish.org/content/groups/public/</public.repository.url> --> | ||
<public.repository.url>http://dev.tikalk.com/nexus/content/groups/public/</public.repository.url> | ||
</properties> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.jvnet.hudson.main</groupId> | ||
<artifactId>hudson-war</artifactId> | ||
<type>war</type> | ||
<version>${project.parent.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
</project> |
Oops, something went wrong.