Score:0

Jenkins NOT failing build when encountered Permission Denied status 126

vn flag

During development, I forgot to set privileges to a script (DB backup) on remote host, which revealed some Jenkins' weakness - when one of steps failed with "Permission Denied" (status 126) it doesn't stop the build, it moves to next steps:

SSH: Connecting with configuration [<remote_host>.com] ...
SSH: EXEC: completed after 201 ms
SSH: Disconnecting configuration [<remote_host>.com] ...
ERROR: Exception when publishing, exception message [Exec exit status not zero. Status [126]]
Build step 'Conditional step (single)' changed build result to FAILURE
Strings match run condition: string 1=[true], string 2=[true]
Run condition [Strings match] enabling perform for step [BuilderChain]
SSH: Current build result is [FAILURE], not going to run.
[Gradle] - Launching build.
...
flywayMigrate
...

In our steps we have Flyway's migration which must not run if DB backup failed.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.