question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow reloading configuration contents via POST (not from disk)

See original GitHub issue

Feature Request

I’m in the process of migrating our Jenkins installation to use Configuration as Code. We have some prior work in the form of a repo that uses Groovy to specify the jobs configuration (kinda like job DSL, but home-grown).

When this repo is changed, a build is started on Jenkins that reloads the jobs.

I would like to add the YAML CasC to the same repo and reload it during the same build. I found that it’s possible to trigger a reload via a number of different ways (Jenkins CLI, API request). However, all of those ways assume a fixed location for the configuration.

Normally, our build jobs are checked out into a random workspace path which is cleaned up after the build is finished. We can work around this, but it would be nice to have a better solution. Hence this feature request. There is some prior discussion here: https://github.com/jenkinsci/configuration-as-code-plugin/issues/76

A POST endpoint that can directly load configuration would allow a natural webhook-build-update workflow to connect CasC to git. Additionaly, it would also be useful for administrators looking to change individual settings via curl.

Proposal

Add a new POST endpoint such that

POST JENKINS_URL/configuration-as-code/configure

takes YAML configuration that is applied the same way as if it was loaded from a file.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
sztomicommented, Feb 27, 2020

So instead of all that complexity, how about the proposal in this issue? 😃

0reactions
jetersencommented, Feb 27, 2020

Ya if we want to support the git client which is also another complexity. However they have very different APIs and have very different ways of reading the raw file.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found