YunoHost-Apps / jenkins_ynh

Jenkins package for YunoHost
https://jenkins.io/
Apache License 2.0
5 stars 10 forks source link

Add jenkins.model.JenkinsLocationConfiguration.xml during installation #119

Open CodeShakingSheep opened 1 year ago

CodeShakingSheep commented 1 year ago

Describe the feature request

After a fresh installation I receive a warning

jenkins url is empty but is required for the proper operation of many jenkins features like email notifications, pr status update, and environment variables such as build_url.

Of course this can be configured easily in Jenkins web UI but it would be convenient to have this by default after install. The URL can be set automatically by adding jenkins.model.JenkinsLocationConfiguration.xml in /var/lib/jenkins with the following contents:

<?xml version='1.1' encoding='UTF-8'?>
<jenkins.model.JenkinsLocationConfiguration>
  <adminAddress>yunohostuser@yunohostdomain.tld</adminAddress>
  <jenkinsUrl>https://jenkinsurl.tld</jenkinsUrl>
</jenkins.model.JenkinsLocationConfiguration>

Expected behavior

jenkins.model.JenkinsLocationConfiguration.xml is automatically created during installation with the following variables:

This would also eliminate the mentioned warning after a fresh install.

yalh76 commented 1 year ago

Feel free to do a PR for that.

CodeShakingSheep commented 1 year ago

Ok, will create a PR for this in the upcoming weeks when I find the time.