-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
95 lines (86 loc) · 3.18 KB
/
.gitlab-ci.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
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
85
86
87
88
89
90
91
92
93
94
95
variables:
net_name: "gitlab-autoscale"
instance_type: "m1.small"
key_name: "bh9_testing"
sec_grps: 'cloudforms_ssh_in,internal_etcd,netdata,cockroachdb'
auth_url: "http://delta.internal.sanger.ac.uk:5000/v2.0/"
stages:
- imagecreate
- trusty
- xenial
- centos
xenial_image_creation:
stage: imagecreate
tags:
- openstack-autoscale
- packer-autoscale
except:
- documentation
script:
- export OS_AUTH_URL=$auth_url
- if [ -z $(openstack image list | grep 'Xenial etcd') ]; then
- /software/packer-0.9.0/bin/packer build xenial_template.json
- fi
centos_image_creation:
stage: imagecreate
tags:
- openstack-autoscale
- packer-autoscale
except:
- documentation
script:
- export OS_AUTH_URL=$auth_url
- if [ -z $(openstack image list | grep 'Centos etcd') ]; then
- /software/packer-0.9.0/bin/packer build centos_template.json
- fi
trusty_image_creation:
stage: imagecreate
tags:
- openstack-autoscale
- packer-autoscale
except:
- documentation
script:
- export OS_AUTH_URL=$auth_url
- if [ -z $(openstack image list | grep 'Trusty etcd') ]; then
- /software/packer-0.9.0/bin/packer build trusty_template.json
- fi
xenial_stack_create:
stage: xenial
tags:
- openstack-autoscale
except:
- documentation
script:
- sec_grps=$(echo $sec_grps | cut -d\' -f2)
- export OS_AUTH_URL=$auth_url
- echo $sec_grps
- openstack stack create --wait -t template.yaml --parameter OS_AUTH_URL="$auth_url" --parameter OS_USERNAME="$OS_USERNAME" --parameter OS_TENANT_NAME="$OS_TENANT_NAME" --parameter OS_PASSWORD="$OS_PASSWORD" --parameter net_name="$net_name" --parameter image="Xenial etcd" --parameter sec_grps="$sec_grps" --parameter instance_type="$instance_type" --parameter key_name="$key_name" --parameter configscript="cockroach.sh" a$CI_BUILD_ID
- sleep 300
- ./test.sh
centos_stack_create:
stage: centos
tags:
- openstack-autoscale
except:
- documentation
script:
- sec_grps=$(echo $sec_grps | cut -d\' -f2)
- export OS_AUTH_URL=$auth_url
- echo $sec_grps
- openstack stack create --wait -t template.yaml --parameter OS_AUTH_URL="$auth_url" --parameter OS_USERNAME="$OS_USERNAME" --parameter OS_TENANT_NAME="$OS_TENANT_NAME" --parameter OS_PASSWORD="$OS_PASSWORD" --parameter net_name="$net_name" --parameter image="Centos etcd" --parameter sec_grps="$sec_grps" --parameter instance_type="$instance_type" --parameter key_name="$key_name" --parameter configscript="cockroach.sh" a$CI_BUILD_ID
- sleep 300
- ./test.sh
trusty_stack_create:
stage: trusty
tags:
- openstack-autoscale
except:
- documentation
script:
- sec_grps=$(echo $sec_grps | cut -d\' -f2)
- export OS_AUTH_URL=$auth_url
- echo $sec_grps
- openstack stack create --wait -t template.yaml --parameter OS_AUTH_URL="$auth_url" --parameter OS_USERNAME="$OS_USERNAME" --parameter OS_TENANT_NAME="$OS_TENANT_NAME" --parameter OS_PASSWORD="$OS_PASSWORD" --parameter net_name="$net_name" --parameter image="Trusty etcd" --parameter sec_grps="$sec_grps" --parameter instance_type="$instance_type" --parameter key_name="$key_name" --parameter configscript="cockroach.sh" a$CI_BUILD_ID
- sleep 300
- ./test.sh