Skip to content

Commit

Permalink
Merge pull request #169 from abayer/jenkins-43625
Browse files Browse the repository at this point in the history
[JENKINS-43625] Test attempting to reproduce bug - passes, though
  • Loading branch information
abayer committed Jul 7, 2017
2 parents 1609339 + 8407d2f commit 6c65ef8
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
Expand Up @@ -738,4 +738,14 @@ public void inCustomWorkspaceInStage() throws Exception {
.logMatches("Workspace dir is .*some-sub-dir")
.go();
}

@Issue("JENKINS-43625")
@Test
public void parallelAndPostFailure() throws Exception {
expect(Result.FAILURE, "parallelAndPostFailure")
.logContains("[Pipeline] { (foo)", "I HAVE EXPLODED")
.logNotContains("[first] { (Branch: first)", "[second] { (Branch: second)")
.go();
}

}
@@ -0,0 +1,52 @@
/*
* The MIT License
*
* Copyright (c) 2017, CloudBees, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

pipeline {
agent any
stages {
stage("barf") {
steps {
sh "exit 1"
}
}
stage("foo") {
steps {
parallel(first: {
echo "First branch"
},
second: {
echo "Second branch"
})
}
}
}
post {
failure {
echo "I HAVE EXPLODED"
}
}
}



0 comments on commit 6c65ef8

Please sign in to comment.