-
Bug
-
Resolution: Fixed
-
Major
-
-
pannonian, iapetus
As reported by cliffmeyers:
I've been working on the Github Creation API and have the first simplest flow wired up for creating an org folder. I am encountering a problem although I found the workaround for it. I wanted to run it by you to see what you think.
First the UI calls this endpoint to get the credential that I previously created:
http://localhost:8080/jenkins/blue/rest/organizations/jenkins/scm/github/
It returns an object like this (omitting _class and _links)
{
"credentialId": "github",
"id": "github",
"uri": "https://api.github.com"
}
Then I make a call to fetch the orgs which works fine:
http://localhost:8080/jenkins/blue/rest/organizations/jenkins/scm/github/organizations/?credentialId=github
Then when I make the creation call I send an object like this:
{
"name": "cliffmeyers",
"$class": "io.jenkins.blueocean.blueocean_github_pipeline.GithubPipelineCreateRequest",
"scmConfig": {
"uri": "https://api.github.com",
"config": {
"orgName": "cliffmeyers",
"repos": []
}
}
}
This works fine. However if I add the credentialId: 'github' to this it fails saying invalid credential.
- blocks
-
JENKINS-41603 Update Git Creation flow to support credentials in local scope
-
- Resolved
-