Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Ubuntu Single Host for Gradle Check #149

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/ci-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export class CIStack extends Stack {
const listenerCertificate = ListenerCertificate.fromArn(certificateArn.secretValue.toString());
const agentNode = new AgentNodes();
const agentNodes: AgentNodeProps[] = [agentNode.AL2_X64, agentNode.AL2_X64_DOCKER_HOST, agentNode.AL2_ARM64, agentNode.AL2_ARM64_DOCKER_HOST,
agentNode.UBUNTU_X64_DOCKER_BUILDER];
agentNode.UBUNTU_X64, agentNode.UBUNTU_X64_DOCKER_BUILDER];

const mainJenkinsNode = new JenkinsMainNode(this, {
vpc,
Expand Down
2 changes: 1 addition & 1 deletion lib/compute/agent-node-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export class AgentNodeConfig {
ebsOptimized: false,
hostKeyVerificationStrategy: 'OFF',
iamInstanceProfile: this.AgentNodeInstanceProfileArn,
idleTerminationMinutes: '30',
idleTerminationMinutes: '60',
initScript: config.initScript,
labelString: config.workerLabelString,
launchTimeoutStr: '300',
Expand Down
23 changes: 19 additions & 4 deletions lib/compute/agent-nodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ export class AgentNodes {

readonly AL2_ARM64_DOCKER_HOST: AgentNodeProps;

readonly UBUNTU_X64: AgentNodeProps;

readonly UBUNTU_X64_DOCKER_BUILDER: AgentNodeProps;

constructor() {
Expand All @@ -30,31 +32,44 @@ export class AgentNodes {
remoteUser: 'ec2-user',
numExecutors: 1,
amiId: 'ami-00a07e55fcad01043',
initScript: 'sudo yum update -y || sleep 10 && sudo yum update -y',
initScript: 'sudo yum clean all && sudo yum repolist &&'
+ ' sudo yum update --exclude=openssh* --exclude=docker* -y',
};
this.AL2_X64_DOCKER_HOST = {
workerLabelString: 'Jenkins-Agent-al2-x64-c54xlarge-Docker-Host',
instanceType: 'C54xlarge',
remoteUser: 'ec2-user',
numExecutors: 8,
amiId: 'ami-00a07e55fcad01043',
initScript: 'sudo yum update -y || sleep 10 && sudo yum update -y',
initScript: 'sudo yum clean all && sudo yum repolist &&'
+ ' sudo yum update --exclude=openssh* --exclude=docker* -y',
};
this.AL2_ARM64 = {
workerLabelString: 'Jenkins-Agent-al2-arm64-c6g4xlarge-Single-Host',
instanceType: 'C6g4xlarge',
remoteUser: 'ec2-user',
numExecutors: 1,
amiId: 'ami-020c52efb1a60f1ae',
initScript: 'sudo yum update -y || sleep 10 && sudo yum update -y',
initScript: 'sudo yum clean all && sudo yum repolist &&'
+ ' sudo yum update --exclude=openssh* --exclude=docker* -y',
};
this.AL2_ARM64_DOCKER_HOST = {
workerLabelString: 'Jenkins-Agent-al2-arm64-c6g4xlarge-Docker-Host',
instanceType: 'C6g4xlarge',
remoteUser: 'ec2-user',
numExecutors: 8,
amiId: 'ami-020c52efb1a60f1ae',
initScript: 'sudo yum update -y || sleep 10 && sudo yum update -y',
initScript: 'sudo yum clean all && sudo yum repolist &&'
+ ' sudo yum update --exclude=openssh* --exclude=docker* -y',
};
this.UBUNTU_X64 = {
workerLabelString: 'Jenkins-Agent-Ubuntu2004-X64-c54xlarge-Single-Host',
instanceType: 'C54xlarge',
remoteUser: 'ubuntu',
numExecutors: 1,
amiId: 'ami-0f6ceb3b3687a3fba',
initScript: 'sudo apt-mark hold docker docker.io openssh-server && docker ps &&'
+ ' sudo apt-get update -y && sudo apt-get upgrade -y && sudo apt-get install docker-compose -y',
};
this.UBUNTU_X64_DOCKER_BUILDER = {
workerLabelString: 'Jenkins-Agent-Ubuntu2004-X64-m52xlarge-Docker-Builder',
Expand Down
20 changes: 20 additions & 0 deletions resources/baseJenkins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,26 @@ tool:
installations:
- home: "git"
name: "Default"
jdk:
installations:
- name: "jdk-8"
properties:
- installSource:
installers:
- adoptOpenJdkInstaller:
id: "jdk8u332-b09"
- name: "jdk-11"
properties:
- installSource:
installers:
- adoptOpenJdkInstaller:
id: "jdk-11.0.15+10"
- name: "jdk-17"
properties:
- installSource:
installers:
- adoptOpenJdkInstaller:
id: "jdk-17.0.3+7"
mavenGlobalConfig:
globalSettingsProvider: "standard"
settingsProvider: "standard"
Expand Down
26 changes: 24 additions & 2 deletions test/data/test_env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ jenkins:
disableRememberMe: false
labelAtoms:
- name: built-in
- name: main-node
labelString: main-node
markupFormatter:
rawHtml:
disableSyntaxHighlighting: true
mode: NORMAL
mode: EXCLUSIVE
myViewsTabBar: standard
numExecutors: 2
numExecutors: 4
primaryView:
all:
name: all
Expand Down Expand Up @@ -167,6 +169,26 @@ tool:
installations:
- home: git
name: Default
jdk:
installations:
- name: jdk-8
properties:
- installSource:
installers:
- adoptOpenJdkInstaller:
id: jdk8u332-b09
- name: jdk-11
properties:
- installSource:
installers:
- adoptOpenJdkInstaller:
id: jdk-11.0.15+10
- name: jdk-17
properties:
- installSource:
installers:
- adoptOpenJdkInstaller:
id: jdk-17.0.3+7
mavenGlobalConfig:
globalSettingsProvider: standard
settingsProvider: standard
Expand Down