Skip to content

Commit

Permalink
Add Windows Gradle Check Jenkins Agent (#210)
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Zhu <[email protected]>

Signed-off-by: Peter Zhu <[email protected]>
  • Loading branch information
peterzhuamazon authored Oct 24, 2022
1 parent e1e59ff commit 9e16623
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 9 deletions.
4 changes: 2 additions & 2 deletions lib/ci-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ export class CIStack extends Stack {
+ 'If you do not copy the AMI in required region and update the code then the jenkins agents will not spin up.');

this.agentNodes = [agentNode.AL2_X64, agentNode.AL2_X64_DOCKER_HOST, agentNode.AL2_X64_DOCKER_HOST_PERF_TEST,
agentNode.AL2_ARM64, agentNode.AL2_ARM64_DOCKER_HOST, agentNode.UBUNTU2004_X64, agentNode.UBUNTU2004_X64_DOCKER_BUILDER,
agentNode.MACOS12_X64_MULTI_HOST, agentNode.WINDOWS2019_X64];
agentNode.AL2_ARM64, agentNode.AL2_ARM64_DOCKER_HOST, agentNode.UBUNTU2004_X64_GRADLE_CHECK, agentNode.UBUNTU2004_X64_DOCKER_BUILDER,
agentNode.MACOS12_X64_MULTI_HOST, agentNode.WINDOWS2019_X64, agentNode.WINDOWS2019_X64_GRADLE_CHECK];
} else {
this.agentNodes = [agentNode.AL2_X64_DEFAULT_AGENT, agentNode.AL2_ARM64_DEFAULT_AGENT];
}
Expand Down
20 changes: 17 additions & 3 deletions lib/compute/agent-nodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,16 @@ export class AgentNodes {

readonly AL2_ARM64_DOCKER_HOST: AgentNodeProps;

readonly UBUNTU2004_X64: AgentNodeProps;
readonly UBUNTU2004_X64_GRADLE_CHECK: AgentNodeProps;

readonly UBUNTU2004_X64_DOCKER_BUILDER: AgentNodeProps;

readonly MACOS12_X64_MULTI_HOST: AgentNodeProps;

readonly WINDOWS2019_X64: AgentNodeProps;

readonly WINDOWS2019_X64_GRADLE_CHECK: AgentNodeProps;

readonly AL2_X64_DEFAULT_AGENT: AgentNodeProps;

readonly AL2_ARM64_DEFAULT_AGENT: AgentNodeProps;
Expand Down Expand Up @@ -100,7 +102,7 @@ export class AgentNodes {
+ ' sudo yum update --skip-broken --exclude=openssh* --exclude=docker* --exclude=gh* -y && docker ps',
remoteFs: '/var/jenkins',
};
this.UBUNTU2004_X64 = {
this.UBUNTU2004_X64_GRADLE_CHECK = {
agentType: 'unix',
workerLabelString: 'Jenkins-Agent-Ubuntu2004-X64-C524xlarge-Single-Host',
instanceType: 'C524xlarge',
Expand Down Expand Up @@ -145,8 +147,20 @@ export class AgentNodes {
remoteUser: 'Administrator',
maxTotalUses: -1,
minimumNumberOfSpareInstances: 2,
numExecutors: 2,
amiId: 'ami-006c911a4bd898d4a',
initScript: 'echo',
remoteFs: 'C:\\Users\\Administrator\\jenkins',
};
this.WINDOWS2019_X64_GRADLE_CHECK = {
agentType: 'windows',
workerLabelString: 'Jenkins-Agent-Windows2019-X64-C524xlarge-Single-Host',
instanceType: 'C54xlarge',
remoteUser: 'Administrator',
maxTotalUses: 1,
minimumNumberOfSpareInstances: 1,
numExecutors: 1,
amiId: 'ami-097c07673f792f89e',
amiId: 'ami-006c911a4bd898d4a',
initScript: 'echo',
remoteFs: 'C:\\Users\\Administrator\\jenkins',
};
Expand Down
20 changes: 16 additions & 4 deletions packer/scripts/windows/scoop-install-commons.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ mv -v 'C:\\Windows\\System32\\find.exe' 'C:\\Windows\\System32\\find_windows.exe
# Add some sleep due to a potential race condition
Start-Sleep -Seconds 5

# Setup Repos (This has to happen after git is installed or will error out)
scoop bucket add java
scoop bucket add versions
scoop bucket add extras
scoop bucket add github-gh https://github.com/cli/scoop-gh.git

# Install mingw for k-NN specific requirements with renaming
# This file can change its version overtime
scoop install mingw
Expand All @@ -51,10 +57,16 @@ $libPathFound = $libFound.replace("$libName", '')
$libPathFound
mv -v "$libFound" "$libPathFound\\$libNameRequired"

# Setup Repos (This has to happen after git is installed or will error out)
scoop bucket add java
scoop bucket add versions
scoop bucket add github-gh https://github.com/cli/scoop-gh.git
# Install zlib for k-NN compilation requirements
scoop install zlib
# Reg PEP
$zlibVersionInfo = (scoop info zlib | out-string -stream | Select-String 'Version.*:')
$zlibVersionNumber = ($zlibVersionInfo -split ':' | select -last 1)
$zlibVersionNumber = $zlibVersionNumber.Trim()
$zlibHome = "C:\\Users\\Administrator\\scoop\\apps\\zlib\\$zlibVersionNumber"
$zlibRegFilePath = "$zlibHome\\register.reg"
$zlibRegFilePath
regedit /s $zlibRegFilePath

# Install jdk8
scoop install temurin8-jdk
Expand Down

0 comments on commit 9e16623

Please sign in to comment.