From 4aa56074c22fd2b43551831164be444f4dfbffae Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Wed, 17 Jul 2024 16:13:01 -0400 Subject: [PATCH] Add missing jdk changes from al2023 update (#477) Signed-off-by: Peter Zhu --- lib/compute/jenkins-main-node.ts | 4 ++-- test/compute/jenkins-main-node.test.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/compute/jenkins-main-node.ts b/lib/compute/jenkins-main-node.ts index aa5905a..7d0fce4 100644 --- a/lib/compute/jenkins-main-node.ts +++ b/lib/compute/jenkins-main-node.ts @@ -239,10 +239,10 @@ export class JenkinsMainNode { InitPackage.yum('openssl'), InitPackage.yum('mod_ssl'), InitPackage.yum('amazon-efs-utils'), - InitCommand.shellCommand('amazon-linux-extras install java-openjdk11 -y'), InitPackage.yum('docker'), InitPackage.yum('python3'), InitPackage.yum('python3-pip.noarch'), + InitPackage.yum('java-11-amazon-corretto'), InitCommand.shellCommand('pip3 install botocore'), InitCommand.shellCommand('systemctl enable crond.service'), InitCommand.shellCommand('systemctl start crond.service'), @@ -250,7 +250,7 @@ export class JenkinsMainNode { InitCommand.shellCommand('sudo wget -nv https://github.com/mikefarah/yq/releases/download/v4.22.1/yq_linux_amd64 -O /usr/bin/yq && sudo chmod +x /usr/bin/yq'), // eslint-disable-next-line max-len InitCommand.shellCommand('sudo curl -L https://github.com/docker/compose/releases/download/v2.9.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/bin/docker-compose && sudo chmod +x /usr/bin/docker-compose'), - InitCommand.shellCommand('python3 -m pip install --upgrade pip && python3 -m pip install cryptography boto3 requests-aws4auth'), + InitCommand.shellCommand('pip3 install cryptography boto3 requests-aws4auth'), InitCommand.shellCommand(httpConfigProps.useSsl // eslint-disable-next-line max-len diff --git a/test/compute/jenkins-main-node.test.ts b/test/compute/jenkins-main-node.test.ts index 636bd0f..55913fd 100644 --- a/test/compute/jenkins-main-node.test.ts +++ b/test/compute/jenkins-main-node.test.ts @@ -26,8 +26,8 @@ describe('JenkinsMainNode Config Elements', () => { // THEN test('Config elements expected counts', async () => { - expect(configElements.filter((e) => e.elementType === 'COMMAND')).toHaveLength(24); - expect(configElements.filter((e) => e.elementType === 'PACKAGE')).toHaveLength(10); + expect(configElements.filter((e) => e.elementType === 'COMMAND')).toHaveLength(23); + expect(configElements.filter((e) => e.elementType === 'PACKAGE')).toHaveLength(11); expect(configElements.filter((e) => e.elementType === 'FILE')).toHaveLength(4); });