mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-14 11:03:09 +02:00
Merge pull request #223 from marcusholl/pr/fixDoNotFailInCaseCommitHistoryDoesNotContainChangeDocumentId
Do not fail immediatly in case commit history does not contain a chan…
This commit is contained in:
commit
339226f304
@ -103,8 +103,9 @@ class CheckChangeInDevelopmentTest extends BasePiperTest {
|
||||
@Test
|
||||
public void changeDocumentIdRetrievalFailsTest() {
|
||||
|
||||
thrown.expect(AbortException)
|
||||
thrown.expectMessage('Something went wrong')
|
||||
thrown.expect(IllegalArgumentException)
|
||||
thrown.expectMessage("No changeDocumentId provided. Neither via parameter 'changeDocumentId' nor via " +
|
||||
"label 'ChangeDocument\\s?:' in commit range [from: origin/master, to: HEAD].")
|
||||
|
||||
ChangeManagement cm = new ChangeManagement(nullScript, null) {
|
||||
|
||||
|
@ -65,7 +65,7 @@ def call(parameters = [:]) {
|
||||
echo "[INFO] ChangeDocumentId '${changeId}' retrieved from commit history"
|
||||
}
|
||||
} catch(ChangeManagementException ex) {
|
||||
throw new AbortException(ex.getMessage())
|
||||
echo "[WARN] Cannot retrieve changeDocumentId from commit history: ${ex.getMessage()}."
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user