Hello!

As mentioned in the other email, here's the second problem I'm facing.

For reference, this is my current Jenkinsfile shared between about
eighty projects via a Git submodule:

https://raw.githubusercontent.com/io7m/jenkinsfiles/50d80c92c8a51df11b7970ebbdbae7611dc8ac51/com.io7m.jenkins.github.txt

I would like to try to move my whole setup towards greater automation.
I currently have three different nodes that perform builds, but only
one of those is trusted enough that I'd actually use the artifacts that
it produces. The other two nodes are really just there to build code
and run the tests - to ensure it builds, and to ensure the tests are
successful - but the artifacts are discarded afterwards.

What I would like to try and do is declare a pipeline such that if a
particular job is tagged as being a release build (via a Git tag), then
the trusted node is tasked with doing the build rather than it just
being a matter of whichever node has an executor to spare. This same
node would also push the artifacts to Maven Central. For non-release
builds, I'm fine with any node doing the build.

Is it actually possible to do this via a declarative pipeline? From
what I can make out, I'd need to do the "buildingTag()" check outside
of the set of stages, and I'd need to then pick a node that had a
"trusted-builder" label assigned to it. Unfortunately, I can't work out
how to do this. Do I need to move to scripted instead of declarative
pipelines?

-- 
Mark Raynsford | http://www.io7m.com

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/20190623173424.0784a652%40almond.int.arc7.info.
For more options, visit https://groups.google.com/d/optout.

Attachment: pgptYutTixWmJ.pgp
Description: OpenPGP digital signature

Reply via email to