-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
79 lines (75 loc) · 2.33 KB
/
Jenkinsfile
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
String pipelineVersion = "development"
library("jenkins-pipeline@${pipelineVersion}")
loglevel = "DEBUG"
components = [
vsphereVMs: [
name: "vsphereVMs",
description: "Photon worker fleet",
version: "latest",
type: "infrastructure",
config: [
infrastructureType: "vsphere",
terraformDirectories: [
directory1: "PhotonCluster"
],
terraformVars: [
num_instances: "1",
name_prefix: "photon-pool-a-small",
resource_pool_type: "small"
],
terraformVarsFiles: [
vsphereVarFile: "./vsphere-vars.tfvars",
provisionerVarFile: "./provisioner-vars.tfvars",
consulVarFile: "./consul-vars.tfvars",
nomadVarFile: "./nomad-vars.tfvars"
]
],
scm: [
current: [
repoName: "terraform-vsphere",
branchName: "${env.BRANCH_NAME}"
],
ansible: [
repoName: "ansible-deployments",
branchName: "develop"
]
]
]
]
stages = [
deployVMs_vsphere: [
title: "Deploy Photon Fleet",
description: "Deploy cluster of Photon OS VMs",
type: "install",
agent: "agent-deploytools",
config: [
installType: "infrastructure_install",
infrastructure: "vsphereVMs",
targetEnv: "dalDC01", //TODO: Create environment generic from Packer or Terraform for both to use
targets: [
vsphereVMs: [
name: "PhotonCluster",
strategy: "terraform",
graphFlag: false,
terraformVarsFiles: [
"vsphereVarFile",
"provisionerVarFile",
"consulVarFile",
"nomadVarFile"
]
]
]
],
withScm: [
primaryScm: [
scmEnv: "frankBitBucketRepoHost",
scmName: "current"
],
extraScm1: [
scmEnv: "frankBitBucketRepoHost",
scmName: "ansible"
]
]
]
]
runPipeline(components, stages, loglevel)