Difficult to softcode credential references in property scripts

7 views
Skip to first unread message

David Karr

unread,
Jun 24, 2019, 6:16:01 PM6/24/19
to Jenkins Users
I'm working with someone who has defined a Jenkins job that does some sophisticated work to set up choice properties.  Each property has a small script that computes the possible values.  It attempts to get the values from the same git repository that the Jenkinsfile resides in.  Unfortunately, it appears that the available context in a property script is pretty weak.  We can't use "withCredentials", because this isn't executing in the context of a build job.

Someone suggested having a separate job get these credentials and then write them to a file using "archiveArtifacts", and then somehow read the contents of that artifact in the property script.  Does that seem like it would be even possible?
Reply all
Reply to author
Forward
0 new messages