From 77c94a7d35d6ef3d99117e0a72429ba3d058497a Mon Sep 17 00:00:00 2001 From: Rishabh Singh Date: Mon, 10 Jun 2024 11:27:37 -0700 Subject: [PATCH] Install cronie package on main node Signed-off-by: Rishabh Singh --- lib/compute/jenkins-main-node.ts | 3 +++ lib/compute/oidc-config.ts | 4 ++-- test/compute/jenkins-main-node.test.ts | 4 ++-- test/data/test_env.yaml | 9 ++++----- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/lib/compute/jenkins-main-node.ts b/lib/compute/jenkins-main-node.ts index 59849c1b..b75f55f7 100644 --- a/lib/compute/jenkins-main-node.ts +++ b/lib/compute/jenkins-main-node.ts @@ -235,6 +235,7 @@ export class JenkinsMainNode { reloadPasswordSecretsArn: string, efsId?: string): InitElement[] { return [ InitPackage.yum('wget'), + InitPackage.yum('cronie'), InitPackage.yum('openssl'), InitPackage.yum('mod_ssl'), InitPackage.yum('amazon-efs-utils'), @@ -243,6 +244,8 @@ export class JenkinsMainNode { InitPackage.yum('python3'), InitPackage.yum('python3-pip.noarch'), InitCommand.shellCommand('pip3 install botocore'), + InitCommand.shellCommand('systemctl enable crond.service'), + InitCommand.shellCommand('systemctl start crond.service'), // eslint-disable-next-line max-len 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 diff --git a/lib/compute/oidc-config.ts b/lib/compute/oidc-config.ts index 3b6e0386..9bb7fc1b 100644 --- a/lib/compute/oidc-config.ts +++ b/lib/compute/oidc-config.ts @@ -79,14 +79,14 @@ export class OidcConfig { roleBased: { roles: { global: [{ - entries: adminUsers.map(user => ({ user })), + entries: adminUsers.map((user) => ({ user })), name: 'admin', pattern: '.*', permissions: OidcConfig.adminRolePermissions , }, { - entries: readOnlyUsers.map(user => ({ user })), + entries: readOnlyUsers.map((user) => ({ user })), name: 'read', pattern: '.*', permissions: OidcConfig.readOnlyRolePermissions, diff --git a/test/compute/jenkins-main-node.test.ts b/test/compute/jenkins-main-node.test.ts index ab588d4f..636bd0fe 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(22); - expect(configElements.filter((e) => e.elementType === 'PACKAGE')).toHaveLength(9); + expect(configElements.filter((e) => e.elementType === 'COMMAND')).toHaveLength(24); + expect(configElements.filter((e) => e.elementType === 'PACKAGE')).toHaveLength(10); expect(configElements.filter((e) => e.elementType === 'FILE')).toHaveLength(4); }); diff --git a/test/data/test_env.yaml b/test/data/test_env.yaml index cbb8ff6e..b5ecbcab 100644 --- a/test/data/test_env.yaml +++ b/test/data/test_env.yaml @@ -113,6 +113,9 @@ globalCredentialsConfiguration: configuration: providerFilter: none typeFilter: none +appearance: + loginTheme: + useDefaultTheme: true security: apiToken: creationOfLegacyTokenEnabled: false @@ -185,7 +188,7 @@ unclassified: apiRateLimitChecker: ThrottleForNormalize gitHubPluginConfig: hookUrl: http://localhost:8080/github-webhook/ - gitSCM: + scmGit: addGitTagAction: false allowSecondFetch: false createAccountBasedOnEmail: false @@ -199,14 +202,10 @@ unclassified: storage: file location: adminAddress: address not configured yet - login-theme-plugin: - useDefaultTheme: true mailer: charset: UTF-8 useSsl: false useTls: false - pluginImpl: - enableCredentialsFromNode: false pollSCM: pollingThreadCount: 10 timestamper: