jenkins: Install required jre in jenkins base profile
Without this change, applying the manifest on jenkins server the first time around just fails the jenkins service as the jre is missing from the PATH. [1]
Implementation wise, this moves the java install instruction into the jenkins base profile as it's already a requirement for the agent.
Related to T3770
- [1] Related to migrated/migration$1227
Test Plan
jenkins-debian (agent), no impact:
$ $SWH_PUPPET_ENVIRONMENT_HOME/bin/octocatalog-diff --octocatalog-diff-args --no-truncate-details --to staging jenkins-debian1
...
I, [2021-12-07T10:15:12.709003 #1011971] INFO -- : Catalogs compiled for jenkins-debian1.internal.softwareheritage.org
I, [2021-12-07T10:15:12.969180 #1011971] INFO -- : Diffs computed for jenkins-debian1.internal.softwareheritage.org
I, [2021-12-07T10:15:12.969216 #1011971] INFO -- : No differences
*** End octocatalog-diff on jenkins-debian1.internal.softwareheritage.org
Install java within the jenkins server (thyssen):
$ $SWH_PUPPET_ENVIRONMENT_HOME/bin/octocatalog-diff --octocatalog-diff-args --no-truncate-details --to staging thyssen
...
I, [2021-12-07T10:15:25.898539 #1013906] INFO -- : Catalogs compiled for thyssen.internal.softwareheritage.org
I, [2021-12-07T10:15:26.181157 #1013906] INFO -- : Diffs computed for thyssen.internal.softwareheritage.org
diff origin/production/thyssen.internal.softwareheritage.org current/thyssen.internal.softwareheritage.org
*******************************************
- Anchor[apt_key 150FDE3F7787E7D11EF4E12A9B7D32F2D50582E6 present]
*******************************************
+ Anchor[apt_key 62A9756BFD780C377CF24BA8FCEF32E745F2C3D5 present]
*******************************************
+ Anchor[java::begin:]
*******************************************
+ Anchor[java::end]
*******************************************
+ Exec[update-java-alternatives] =>
parameters =>
"command": "update-java-alternatives --set java-1.11.0-openjdk-amd64 --jre-headless"
"path": "/usr/bin:/usr/sbin:/bin:/sbin"
"unless": "test /etc/alternatives/java -ef '/usr/lib/jvm/java-1.11.0-openjdk-amd64/bin/java'"
*******************************************
+ File_line[java-home-environment] =>
parameters =>
"line": "JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64/"
"match": "JAVA_HOME="
"path": "/etc/environment"
*******************************************
+ Package[java-common] =>
parameters =>
"ensure": "present"
*******************************************
+ Package[java] =>
parameters =>
"ensure": "present"
"name": "openjdk-11-jre-headless"
*******************************************
*** End octocatalog-diff on thyssen.internal.softwareheritage.org
Further check with vagrant ongoing (creating back from scratch thyssen node... slow...)
Migrated from D6757 (view on Phabricator)