set build name according to build status

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

set build name according to build status

maple.feng.wang@hotmail.com
Hi,

I met a problem when I tried to set build name according to build status in Jenkins.

My requirement is quite simple, when build is in progress, the build name is "Depolying xxx on xxx ...", when the build succeed, then set build name as "Deploy xxx on xxx successfully", when the build fails, then set build name as "Deploy xxx on xxx failed".

My configuration is quite clear:

set build name "Depolying xxx on xxx ..." in build environment

set build name "Deploy xxx on xxx successfully" in conditional step(Current Build Status, Worst status: SUCCESS, Best status: SUCCESS) in build section 

set build name "Deploy xxx on xxx failed" in conditional step(Current Build Status, Worst status: Failure, Best status: Failure) in build section


But the result is not what I expect, here is log for build successfully:
 
```
[Current build status] check if current [SUCCESS] is worse or equals then [SUCCESS] and better or equals then [SUCCESS]
Run condition [Current build status] enabling perform for step [BuilderChain]
New run name is '#9 - Deploy on 192.168.13.8 successfully'
Variable with name 'BUILD_DISPLAY_NAME' already exists, current value: '#9 - Deploying on 192.168.13.8 ...', new value: '#9 - Deploy on 192.168.13.8 successfully'
[Current build status] check if current [SUCCESS] is worse or equals then [FAILURE] and better or equals then [FAILURE]
Run condition [Current build status] preventing perform for step [BuilderChain]
New run name is '#9 - Deploying on 192.168.13.8 ...'
Variable with name 'BUILD_DISPLAY_NAME' already exists, current value: '#9 - Deploy on 192.168.13.8 successfully', new value: '#9 - Deploying on 192.168.13.8 ...'
```

The plugin detected the status and change the name as expected at first, but somehow, it's renamed back. I don't know why it happened, how should I configure to archive what I expect? thanks.

best regards.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/3ddedd8c-292c-4ad0-9e1f-88e180190e88o%40googlegroups.com.