Closed steven-foster closed 4 years ago
Have you tried to add a html form as html?
Yes, it worked for the most part but the styling was a bit odd. The badge was placed on a newline. Maybe there's a workaround for that.
I don't know. If you provided me your pipeline script, I could have a look at it.
Here's what I have:
node() {
def html = """<form method="post" name="parameters" action="/job/artifact_publish/buildWithParameters?BUILD_SELECTOR=${env.JOB_NAME}%23${env.BUILD_NUMBER}">
<input name="statusCode" value="303" type="hidden" />
<input type="image" src="/plugin/badge/images/save.gif" />
</form>""".stripIndent()
echo "hi"
addHtmlBadge html: html
}
In my opinion triggering other builds is not something that one would necessarily expect from this plugin. A solution you showed is a good way to go.
I'd like to use badges to trigger other builds with parameters, which requires a POST to a particular URL. I can mostly do this with the HTML badge, but it would be neat to have a POST mode in the standard link badges too if possible.