Home
DevCentral
Search
Configure Global Search
Log In
Transactions
T1441
Change Details
Change Details
Old
New
Diff
If the class of a job is `org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject`, there is a need to parse one job per branch. To do so, iterate the jobs key, appending the branch to the name, and then we can parse it like a regular job with self.parse_project. Perhaps also if there is only one job, we can omit the branch suffix. For example, the two syntax are equivalent: ``` $ curl https://cd.nasqueron.org/api/json?depth=1 |jq .jobs[0].name limiting-factor-doc $ curl https://cd.nasqueron.org/api/json?depth=1 |jq .jobs[1].name tests-prod-environment-behaves-correctly $ curl https://cd.nasqueron.org/api/json?depth=1 |jq .jobs[1].jobs[0].name master $ curl https://cd.nasqueron.org/api/json?depth=1 |jq .jobs[1].jobs[0].color red ```
If the class of a job is `org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject`, there is a need to parse one job per branch. To do so, iterate the jobs key, appending the branch to the name, and then we can parse it like a regular job with self.parse_project. Perhaps also if there is only one job, we can omit the branch suffix. For example, the two syntax are equivalent: ``` $ curl https://cd.nasqueron.org/api/json?depth=1 | jq .jobs[0].name limiting-factor-doc $ curl https://cd.nasqueron.org/api/json?depth=1 | jq .jobs[1].name tests-prod-environment-behaves-correctly $ curl https://cd.nasqueron.org/api/json?depth=1 | jq .jobs[1].jobs[0].name master $ curl https://cd.nasqueron.org/api/json?depth=1 | jq .jobs[1].jobs[0].color red ```
If the class of a job is `org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject`, there is a need to parse one job per branch. To do so, iterate the jobs key, appending the branch to the name, and then we can parse it like a regular job with self.parse_project. Perhaps also if there is only one job, we can omit the branch suffix. For example, the two syntax are equivalent: ``` $ curl https://cd.nasqueron.org/api/json?depth=1 |
jq .jobs[0].name limiting-factor-doc $ curl https://cd.nasqueron.org/api/json?depth=1 |
jq .jobs[1].name tests-prod-environment-behaves-correctly $ curl https://cd.nasqueron.org/api/json?depth=1 |
jq .jobs[1].jobs[0].name master $ curl https://cd.nasqueron.org/api/json?depth=1 |
jq .jobs[1].jobs[0].color red ```
Continue