Skip to content

Instantly share code, notes, and snippets.

View hominhdat's full-sized avatar
💭
DevOps

Dat Ho hominhdat

💭
DevOps
View GitHub Profile
@hominhdat
hominhdat / gist:7ebeb46a8d309702d8fa6e4d3bc1da37
Created May 28, 2020 06:55 — forked from hayderimran7/gist:78421229af85ae90177b
So what is the 'credentials-id' parameter and how to use it correctly in jenkins-job-builder yaml file of your job?
It took me a while, after multiple knocks on all openstack/cloudbees/jenkins IRCs and googling around, all of them proved to be fruitless that I finally figure what the deal about this parameter all about?
before posting the exact details, i just have a little rant : WHY IS THIS NOT IN THE DOCS OF JENKINS JOB BUILDER (JJB ) ???
Jenkins job builder docs are pretty concise and dont go into much details,
but anyway:
=================================
what is credentials-id parameter?
=================================
so you are writing a yaml file for your job 'foo.yaml' and you need to use a git repo, lets say its in github,
now github private repos are snowflaky where you need to provide credentials to github in order to clone them. Following is step-by-step howto: