i trying use publish on ssh plugin publish many kinds of build artifact external server. examples of build artifacts compiled builds, xml output testing, , json output linting.
if testing or linting results in errors, build fail or marked unstable. in case of failed build, publish on ssh plugin not copy build artifacts, writing console:
ssh: current build result [failure], not going run. i see no reason why wouldn't want publish information if exists, , continue report errors build failures. so, there way force jenkins publish build artifacts if job marked failure?
i thought use flexible publish force this, wrapping publish on ssh in "always" condition, gave same output before on build failure.
i can think of couple of work-arounds:
a) store build status in environment variable; force status success; perform publish step; recover build status environment variable using java jenkins-cli.jar set-build-status $stored_status
or
b) write bash script perform publishing step manually using ssh, cutting out publish on ssh plugin altogether
before push forward either of these solutions (neither of like), there piece of configuration i'm missing?
quoting old hooky on jenkinsci-users:
how can force publish on ssh work if build has been marked failure?
use "send files or execute commands on ssh after build runs" in
configuration section "build environment"
job configuration / build environment / send files or execute commands on ssh after build runs
instead of using post-build or build-step.
Comments
Post a Comment