-
Notifications
You must be signed in to change notification settings - Fork 89
/
configuration-as-code-windows-it.yml
54 lines (54 loc) · 3.04 KB
/
configuration-as-code-windows-it.yml
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
jenkins:
clouds:
- computeEngine:
cloudName: integration
projectId: ${env.GOOGLE_PROJECT_ID}
instanceCapStr: 10
credentialsId: ${env.GOOGLE_PROJECT_ID}
configurations:
- namePrefix: integration
description: integration
launchTimeoutSecondsStr: 3000
retentionTimeMinutesStr: 600
mode: EXCLUSIVE
labelString: integration
numExecutorsStr: 1
runAsUser: jenkins
remoteFs: ''
windowsConfiguration:
passwordCredentialsId: windowsPasswordId
privateKeyCredentialsId: ''
oneShot: true
createSnapshot: false
region: "https://www.googleapis.com/compute/v1/projects/${env.GOOGLE_PROJECT_ID}/regions/${env.GOOGLE_REGION}"
zone: "https://www.googleapis.com/compute/v1/projects/${env.GOOGLE_PROJECT_ID}/zones/${env.GOOGLE_ZONE}"
template: '' # tried not setting, added when 'saved' in UI
machineType: "https://www.googleapis.com/compute/v1/projects/${env.GOOGLE_PROJECT_ID}/zones/${env.GOOGLE_ZONE}/machineTypes/n1-standard-1"
preemptible: false
minCpuPlatform: '' # tried not setting, added when 'saved' in UI
startupScript: "Stop-Service sshd\n$ConfiguredPublicKey = \"jenkins:${env.GOOGLE_PUBLIC_KEY}\"\nWrite-Output \"Second phase\"\nSet-Content -Path $env:PROGRAMDATA\\ssh\\administrators_authorized_keys -Value $ConfiguredPublicKey\nicacls $env:PROGRAMDATA\\ssh\\administrators_authorized_keys /inheritance:r\nicacls $env:PROGRAMDATA\\ssh\\administrators_authorized_keys /grant SYSTEM:`(F`)\nicacls $env:PROGRAMDATA\\ssh\\administrators_authorized_keys /grant BUILTIN\\Administrators:`(F`)\nRestart-Service sshd"
networkConfiguration:
autofilled:
network: default
subnetwork: default
networkTags: "jenkins-agent ssh"
networkInterfaceIpStackMode:
singleStack:
externalIPV4Address: true
useInternalAddress: false
bootDiskSourceImageProject: ${env.GOOGLE_BOOT_DISK_PROJECT_ID}
bootDiskSourceImageName: "projects/${env.GOOGLE_BOOT_DISK_PROJECT_ID}/global/images/${env.GOOGLE_BOOT_DISK_IMAGE_NAME}"
bootDiskType: "https://www.googleapis.com/compute/v1/projects/${env.GOOGLE_PROJECT_ID}/zones/${env.GOOGLE_ZONE}/diskTypes/pd-ssd"
bootDiskSizeGbStr: 50
bootDiskAutoDelete: true
serviceAccountEmail: "${env.GOOGLE_SA_NAME}@${env.GOOGLE_PROJECT_ID}.iam.gserviceaccount.com"
credentials:
system:
domainCredentials:
- credentials:
- usernamePassword:
scope: SYSTEM
id: windowsPasswordId
username: jenkins
description: "integration test password key for windows"
password: ${env.GOOGLE_JENKINS_PASSWORD}