Allow to select target publishing server - via Jenkins Credentials subsys.

To make this work, a new "Credential Domain" should be configured, with
filter by adhoc "pubapi" URL schema. Within domain, using "Username with
password" credential type. "Username" should be a publishing server though,
and password - master publishing key. Additionally, for JJB usage, in
"Advanced" section, a credential ID should be defined to have a form
pubapi-<server_host>, e.g. pubapi-snapshots.linaro.org.

Set PUBLISH_SERVER envvar based on publishing server selected by plugin.

This value can be directly passed to --server param of linaro-cp tool, thus
avoiding duplicating server name in 2 places, and confusion if they don't
match.

Also, other minor usability/diagnosing tweaks:
- Log the fact that token was requested to build log.
- If credential id for a job isn't set, use "pubapi-snapshots.linaro.org".
(For compatibility with jobs configured for older plugin version.)

Change-Id: I02d6a8fa48485c1f4ed2cb4e3b33d6c1170155ec
4 files changed
tree: 03bfe4805efdc26e1e2b9b6c9554702e6c255147
  1. src/
  2. pom.xml
  3. README.txt