Move Trigger Configuration Reload to a new feature page #1150 (#1155)

* Move Trigger Configuration Reload to a new feature page #1150

* Move Trigger Configuration Reload to a new feature page #1150
This commit is contained in:
Luno 2019-10-12 05:46:10 -03:00 committed by Oleg Nenashev
parent 37735e0a44
commit 045631a8bf
2 changed files with 22 additions and 21 deletions

View File

@ -135,6 +135,7 @@ You can find more documentation about JCasC here:
- [Handling Secrets](./docs/features/secrets.adoc)
- [Exporting configurations](./docs/features/configExport.md)
- [Validating configurations](./docs/features/jsonSchema.md)
- [Triggering Configuration Reload](./docs/features/configurationReload.md)
The configuration file format depends on the version of jenkins-core and installed plugins.
Documentation is generated from a live instance, as well as a JSON schema you can use to validate configuration file
@ -158,27 +159,6 @@ Kubernetes users:\
Most plugins should be supported out-of-the-box, or maybe require some minimal changes. See this [dashboard](https://issues.jenkins.io/secure/Dashboard.jspa?selectPageId=18341) for known compatibility issues.
## Triggering Configuration Reload
You have the following option to trigger a configuration reload:
- via the user interface: `Manage Jenkins -> Configuration -> Reload existing configuration`
- via http POST to `JENKINS_URL/configuration-as-code/reload`
Note: this needs to include a valid CRUMB and authentication information e.g. username + token of a user with admin
permissions. Since Jenkins 2.96 CRUMB is not needed for API tokens.
- via Jenkins CLI
- via http POST to `JENKINS_URL/reload-configuration-as-code`
It's disabled by default and secured via a token configured as system property `casc.reload.token`.
Setting the system property enables this functionality and the requests need to include the token as
query parameter named `casc-reload-token`, i.e. `JENKINS_URL/reload-configuration-as-code/?casc-reload-token=32424324rdsadsa`.
`curl -X POST "JENKINS_URL:8080/reload-configuration-as-code/?casc-reload-token=32424324rdsadsa"`
- via Groovy script
```groovy
import io.jenkins.plugins.casc.ConfigurationAsCode;
ConfigurationAsCode.get().configure()
```
## Configuration-as-Code extension plugins

View File

@ -0,0 +1,21 @@
## Triggering Configuration Reload
You have the following option to trigger a configuration reload:
- via the user interface: `Manage Jenkins -> Configuration -> Reload existing configuration`
- via http POST to `JENKINS_URL/configuration-as-code/reload`
Note: this needs to include a valid CRUMB and authentication information e.g. username + token of a user with admin
permissions. Since Jenkins 2.96 CRUMB is not needed for API tokens.
- via Jenkins CLI
- via http POST to `JENKINS_URL/reload-configuration-as-code`
It's disabled by default and secured via a token configured as system property `casc.reload.token`.
Setting the system property enables this functionality and the requests need to include the token as
query parameter named `casc-reload-token`, i.e. `JENKINS_URL/reload-configuration-as-code/?casc-reload-token=32424324rdsadsa`.
`curl -X POST "JENKINS_URL:8080/reload-configuration-as-code/?casc-reload-token=32424324rdsadsa"`
- via Groovy script
```groovy
import io.jenkins.plugins.casc.ConfigurationAsCode;
ConfigurationAsCode.get().configure()
```