Skip to content

Commit

Permalink
[Improvement] jenkins/* - Update Jenkins to 2.303.1 and switch to rec…
Browse files Browse the repository at this point in the history
…ommended Java version 11 (widdix#576)
  • Loading branch information
michaelwittig authored Aug 27, 2021
1 parent a25f027 commit f112437
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 19 deletions.
27 changes: 16 additions & 11 deletions jenkins/jenkins2-ha-agents.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ Resources:
Metadata:
'AWS::CloudFormation::Init':
configSets:
default: [awslogs, !If [HasIAMUserSSHAccess, ssh-access, !Ref 'AWS::NoValue'], mount, extras, install, setup, custom_before, run, custom_after]
default: [awslogs, !If [HasIAMUserSSHAccess, ssh-access, !Ref 'AWS::NoValue'], mount, extras, epel, dependencies, install, setup, custom_before, run, custom_after]
awslogs:
packages:
yum:
Expand Down Expand Up @@ -952,15 +952,23 @@ Resources:
'a_enable_docker':
command: 'amazon-linux-extras enable docker=18.06.1 && yum -y clean metadata'
test: "! grep -Fxq '[amzn2extra-docker]' /etc/yum.repos.d/amzn2-extras.repo"
'b_enable_corretto8':
command: 'amazon-linux-extras enable corretto8 && yum -y clean metadata'
test: "! grep -Fxq '[amzn2extra-corretto8]' /etc/yum.repos.d/amzn2-extras.repo"
'b_enable_epel':
command: 'amazon-linux-extras enable epel=7.11 && yum -y clean metadata'
test: "! grep -Fxq '[amzn2extra-epel]' /etc/yum.repos.d/amzn2-extras.repo"
epel:
packages:
yum:
'epel-release': []
dependencies:
packages:
yum:
'java-11-amazon-corretto-headless': []
'daemonize': []
install:
packages:
rpm:
jenkins: 'http://ftp-chi.osuosl.org/pub/jenkins/redhat-stable/jenkins-2.289.3-1.1.noarch.rpm'
jenkins: 'http://ftp-chi.osuosl.org/pub/jenkins/redhat-stable/jenkins-2.303.1-1.1.noarch.rpm'
yum:
'java-1.8.0-amazon-corretto': []
'ruby': []
rubygems:
'aws-sdk-autoscaling': ['1.47.0']
Expand Down Expand Up @@ -1294,7 +1302,7 @@ Resources:
command: 'until $(curl --silent --max-time 60 -o /dev/null -I -f -u "admin:$(cat /var/lib/jenkins/secrets/initialAdminPassword)" http://localhost:8080/cli/); do printf "."; sleep 1; done'
test: '[ ! -f /var/lib/jenkins/setup_done.txt ]'
'i_download_jenkins_plugin_manager':
command: 'wget --quiet --timeout=60 --output-document=/opt/jenkins-plugin-manager.jar https://github.com/jenkinsci/plugin-installation-manager-tool/releases/download/2.10.0/jenkins-plugin-manager-2.10.0.jar'
command: 'wget --quiet --timeout=60 --output-document=/opt/jenkins-plugin-manager.jar https://github.com/jenkinsci/plugin-installation-manager-tool/releases/download/2.10.2/jenkins-plugin-manager-2.10.2.jar'
est: '[ ! -f /var/lib/jenkins/setup_done.txt ]'
'j_install_plugins':
command: 'java -jar /opt/jenkins-plugin-manager.jar --war /usr/lib/jenkins/jenkins.war --plugin-download-directory /var/lib/jenkins/plugins --plugin-file /root/plugins.txt --latest=false'
Expand Down Expand Up @@ -1814,13 +1822,10 @@ Resources:
'a_enable_docker':
command: 'amazon-linux-extras enable docker=18.06.1 && yum -y clean metadata'
test: "! grep -Fxq '[amzn2extra-docker]' /etc/yum.repos.d/amzn2-extras.repo"
'b_enable_corretto8':
command: 'amazon-linux-extras enable corretto8 && yum -y clean metadata'
test: "! grep -Fxq '[amzn2extra-corretto8]' /etc/yum.repos.d/amzn2-extras.repo"
install:
packages:
yum:
'java-1.8.0-amazon-corretto': []
'java-11-amazon-corretto-headless': []
files:
'/etc/cfn/cfn-hup.conf':
content: !Sub |
Expand Down
23 changes: 15 additions & 8 deletions jenkins/jenkins2-ha.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ Resources:
Metadata:
'AWS::CloudFormation::Init':
configSets:
default: [awslogs, !If [HasIAMUserSSHAccess, ssh-access, !Ref 'AWS::NoValue'], mount, extras, install, setup, custom_before, run, custom_after]
default: [awslogs, !If [HasIAMUserSSHAccess, ssh-access, !Ref 'AWS::NoValue'], mount, extras, epel, dependencies, install, setup, custom_before, run, custom_after]
awslogs:
packages:
yum:
Expand Down Expand Up @@ -864,15 +864,22 @@ Resources:
'a_enable_docker':
command: 'amazon-linux-extras enable docker=18.06.1 && yum -y clean metadata'
test: "! grep -Fxq '[amzn2extra-docker]' /etc/yum.repos.d/amzn2-extras.repo"
'b_enable_corretto8':
command: 'amazon-linux-extras enable corretto8=1.8.0_202 && yum -y clean metadata'
test: "! grep -Fxq '[amzn2extra-corretto8]' /etc/yum.repos.d/amzn2-extras.repo"
'b_enable_epel':
command: 'amazon-linux-extras enable epel=7.11 && yum -y clean metadata'
test: "! grep -Fxq '[amzn2extra-epel]' /etc/yum.repos.d/amzn2-extras.repo"
epel:
packages:
yum:
'epel-release': []
dependencies:
packages:
yum:
'java-11-amazon-corretto-headless': []
'daemonize': []
install:
packages:
rpm:
jenkins: 'http://ftp-chi.osuosl.org/pub/jenkins/redhat-stable/jenkins-2.289.3-1.1.noarch.rpm'
yum:
'java-1.8.0-amazon-corretto': []
jenkins: 'http://ftp-chi.osuosl.org/pub/jenkins/redhat-stable/jenkins-2.303.1-1.1.noarch.rpm'
files:
'/etc/cfn/cfn-hup.conf':
content: !Sub |
Expand Down Expand Up @@ -948,7 +955,7 @@ Resources:
command: 'until $(curl --silent --max-time 60 -o /dev/null -I -f -u "admin:$(cat /var/lib/jenkins/secrets/initialAdminPassword)" http://localhost:8080/cli/); do printf "."; sleep 1; done'
test: '[ ! -f /var/lib/jenkins/setup_done.txt ]'
'h_download_jenkins_plugin_manager':
command: 'wget --quiet --timeout=60 --output-document=/opt/jenkins-plugin-manager.jar https://github.com/jenkinsci/plugin-installation-manager-tool/releases/download/2.10.0/jenkins-plugin-manager-2.10.0.jar'
command: 'wget --quiet --timeout=60 --output-document=/opt/jenkins-plugin-manager.jar https://github.com/jenkinsci/plugin-installation-manager-tool/releases/download/2.10.2/jenkins-plugin-manager-2.10.2.jar'
est: '[ ! -f /var/lib/jenkins/setup_done.txt ]'
'i_install_plugins':
command: 'java -jar /opt/jenkins-plugin-manager.jar --war /usr/lib/jenkins/jenkins.war --plugin-download-directory /var/lib/jenkins/plugins --plugin-file /root/plugins.txt --latest=false'
Expand Down

0 comments on commit f112437

Please sign in to comment.