-1

Trying to add new system properties to Jenkins through its GUI through script console like : System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "") and some other properties but they're removed whenever I restart Jenkins.

Is there a way to save the properties and survive the restart of Jenkins or is there any other way other than script console to add those properties?

PS: I'm running Jenkins on AWS ECS container and I don't have /etc/sysconfig/jenkins or /etc/default/jenkins path to add the setting to the java args.

Khouloud
  • 11
  • 2

1 Answers1

2

To set system properties permanently in a official Jenkins docker image, you need to pass it as JVM arguments to the container through the variable environment JAVA_OPTS. For example :

docker run --name=docker-jenkins --env JAVA_OPTS="-Dhudson.model.DirectoryBrowserSupport.CSP=\"\""

So, on AWS ECS, you need to find a way to pass environment variable to the container. Maybe, this topic can help you.

SmartTom
  • 691
  • 7
  • 14