forked from F5Networks/f5-openstack-hot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
97 lines (97 loc) · 2.34 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
96
97
stages:
- build
- test
- test-exp
- test-sup
- package
- cleanup
prep:
tags:
- os
stage: build
only:
- /^release-.*/
- /^develop*/
- /^gitlab*/
- triggers
script:
- cp -r $CI_PROJECT_DIR ~/src/f5-openstack-hot/ && cp -r ~/src/dev_env/ ~/src/f5-openstack-hot/dev_env/
- cd ~/src && git clone -b $CI_BUILD_REF_NAME --single-branch $OS_TEST_REPO $CI_BUILD_REF_NAME
- mv $CI_BUILD_REF_NAME f5-openstack-hot-tests
- cp tempest/ f5-openstack-hot-tests/tempest/ -r
test-unit:
tags:
- os
stage: test
only:
- /^release-.*/
- /^develop*/
- /^gitlab*/
- triggers
variables:
GIT_STRATEGY: none
script:
- cd ~/src/f5-openstack-hot-tests
- echo '***======== Running Unit Tests - Experimental ========***'
- tox -e exp TemplateValid
- echo '***======== Running Unit Tests - Supported ========***'
- tox -e sup TemplateValid
after_script:
- cd ~/src/f5-openstack-hot-tests && shred -uz tempest/logs/tempest.log
test-integration-experimental:
tags:
- os
stage: test-exp
only:
- /^gitlab*/
- triggers
variables:
GIT_STRATEGY: none
script:
- cd ~/src/f5-openstack-hot-tests
- echo '***======== Running Integration Tests - Experimental ========***'
- tox -e exp Standalone
- tox -e exp Cluster
after_script:
- cd ~/src/f5-openstack-hot-tests && shred -uz tempest/logs/tempest.log
test-integration-supported:
tags:
- os
stage: test-sup
only:
- /^build-hash*/
- /^release-.*/
- /^develop*/
- /^gitlab*/
- triggers
variables:
GIT_STRATEGY: none
script:
- cd ~/src/f5-openstack-hot-tests
- echo '***======== Running Integration Tests - Supported ========***'
- tox -e sup Standalone
- tox -e sup Cluster
after_script:
- cd ~/src/f5-openstack-hot-tests && shred -uz tempest/logs/tempest.log
package:
tags:
- os
stage: package
only:
- /^build-hash*/
- /^release-.*/
- triggers
script:
- tar -zcvf dist/f5-openstack-hot-supported.tar.gz supported
- cd dist
- openssl dgst -sha512 f5-openstack-hot-supported.tar.gz | cut -d ' ' -f 2 >> hashes
artifacts:
name: f5-openstack-hot-supported-$CI_BUILD_REF
paths:
- dist/
cleanup:
stage: cleanup
script:
- rm ~/src/f5-openstack-hot -dfr
- rm ~/src/f5-openstack-hot-tests -dfr
when: always