scm-sync-configuration-plugin
scm-sync-configuration-plugin copied to clipboard
how to reload scm configuration programmatically
I'm writing an Ansible script that installs Jenkins and loads SCM config from git. I've got most of it working but can't figure out how to invoke http://
Interested too
+1
Trying to solve same issue :+1:
I managed to do it:
Using ansible:
-
name: Autoload scm configure become: true become_user: jenkins shell: "curl http://localhost:8080/plugin/scm-sync-configuration/reloadAllFilesFromScm -u admin:{{ initialpassword.stdout }}" notify: restart jenkins
-
name: Autoload scm configure become: true become_user: jenkins shell: "curl http://localhost:8080/reload -u admin:{{ initialpassword.stdout }}" notify: restart jenkins
Bash: curl http://ip-address:8080/plugin/scm-sync-configuration/reloadAllFilesFromScm -u admin:password curl http://ip-address:8080/reload -u admin:password
nice one, thanks
@PeterLappo How did you manage to set the plugin configuration with Ansible? Can you provide the complete tasks list?
@xussof To reload Jenkins a POST is needed:
curl -X POST http://ip-address:8080/reload -u admin:password
This worked for me.