-
Notifications
You must be signed in to change notification settings - Fork 4
/
jenkins-unity-build.ts
84 lines (77 loc) · 2.78 KB
/
jenkins-unity-build.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/usr/bin/env node
import 'source-map-support/register';
import * as cdk from 'aws-cdk-lib';
import { JenkinsUnityBuildStack } from '../lib/jenkins-unity-build-stack';
import { InstanceClass, InstanceSize, InstanceType } from 'aws-cdk-lib/aws-ec2';
import { Size } from 'aws-cdk-lib';
const app = new cdk.App();
new JenkinsUnityBuildStack(app, 'JenkinsUnityBuildStack', {
env: {
// AWS region to deploy this stack to. (Required for defining ALB access logging)
region: 'us-east-2',
// Aws Account ID to deploy this stack to. (Also required if you specify certificateArn or vpcId below.)
// account: '123456789012',
},
allowedCidrs: ['127.0.0.1/32'],
// Amazon Certificate Manager certificate ARN for Jenkins Web UI ALB.
// ALB can be accessed with HTTP if you don't specify this property.
// certificateArn: "",
// You can use an existing VPC by specifying vpcId.
// vpcId: 'vpc-xxxxxxx',
ec2FleetConfigurations: [
{
type: 'LinuxFleet',
name: 'linux-small',
label: 'small',
numExecutors: 5,
},
{
type: 'LinuxFleet',
rootVolumeSize: Size.gibibytes(30),
dataVolumeSize: Size.gibibytes(100),
instanceTypes: [
InstanceType.of(InstanceClass.C5, InstanceSize.XLARGE),
InstanceType.of(InstanceClass.C5A, InstanceSize.XLARGE),
InstanceType.of(InstanceClass.C5N, InstanceSize.XLARGE),
InstanceType.of(InstanceClass.C4, InstanceSize.XLARGE),
],
name: 'linux-fleet',
label: 'linux',
fleetMinSize: 1,
fleetMaxSize: 4,
},
// You can add Windows fleet as well.
// {
// type: 'WindowsFleet',
// rootVolumeSize: Size.gibibytes(50),
// dataVolumeSize: Size.gibibytes(100),
// instanceTypes: [
// InstanceType.of(InstanceClass.M6A, InstanceSize.XLARGE),
// InstanceType.of(InstanceClass.M5A, InstanceSize.XLARGE),
// InstanceType.of(InstanceClass.M5N, InstanceSize.XLARGE),
// InstanceType.of(InstanceClass.M5, InstanceSize.XLARGE),
// ],
// name: 'windows-fleet',
// label: 'windows',
// fleetMinSize: 1,
// fleetMaxSize: 4,
// },
],
// You can add any number of Mac agents.
// macInstancesCOnfigurations: [
// {
// storageSize: cdk.Size.gibibytes(200),
// instanceType: InstanceType.of(InstanceClass.MAC2, InstanceSize.METAL),
// amiId: 'ami-038e1d574f3140013',
// name: 'mac0',
// subnet: (vpc) => vpc.privateSubnets[1],
// },
// ],
// You can deploy Unity Accelerator.
// unityAccelerator: {
// volumeSize: Size.gibibytes(100),
// }
// base url for your Unity license sever.
// You can setup one using this project: https://github.com/aws-samples/unity-build-server-with-aws-cdk
// licenseServerBaseUrl: 'http://10.0.0.100:8080',
});