Are the Jenkinsfile withCredentials directive type names stable?

28 views
Skip to first unread message

Chris Kilding

unread,
Dec 18, 2019, 7:45:21 AM12/18/19
to jenkin...@googlegroups.com
Hello,

The Jenkinsfile withCredentials directive has a number of binding type names (like `string`, `usernamePassword`, `certificate`). Are the type names are stable enough to reuse from other systems? Specifically, I might need to use them as type identifiers within credentials providers, to handle edge cases. If the binding type names are indeed stable, i.e. they will not change for the conceivable future, then they would be better than the obvious alternatives (like Java class names).

Example of the directive:

> withCredentials(string(credentialsId: 'mytoken', variable: 'TOKEN')) {
> // ...
> }

Regards,

Chris

Slide

unread,
Dec 18, 2019, 9:51:13 AM12/18/19
to jenkin...@googlegroups.com
Those directives are taken from the source code (e.g.,  https://github.com/jenkinsci/credentials-binding-plugin/blob/master/src/main/java/org/jenkinsci/plugins/credentialsbinding/impl/StringBinding.java#L65). I don't think people will change those as they are used by many people and it would be a breaking change.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/75b1396d-9719-4c53-b16a-b2acdf68bf89%40www.fastmail.com.


--

Daniel Beck

unread,
Dec 18, 2019, 10:02:55 AM12/18/19
to JenkinsCI Developers
… and symbols can be added (becoming the new default symbol, even), without removing old ones.

I am aware of a single instance where we removed a non-default symbol, nonStoredPasswordParam, that was originally added without any review, because it was misleading: https://jenkins.io/doc/upgrade-guide/2.176/#symbol-nonstoredpasswordparam-removed



--

Daniel Beck
Senior Software Engineer
CloudBees, Inc.

CloudBees-Logo.png


Chris Kilding

unread,
Dec 19, 2019, 11:57:38 AM12/19/19
to jenkin...@googlegroups.com
Great, sounds like the type names are stable enough for my use case.

Chris
Reply all
Reply to author
Forward
0 new messages