summaryrefslogtreecommitdiffstats
path: root/jjb/functest/xtesting-ci-vm.yaml
blob: 912d437937aab9dd652a40703c262793b162218b (plain)
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
---
- scm:
    name: xtesting-ci-vm-scm
    scm:
      - git:
          url: https://github.com/collivier/ansible-role-xtesting.git
          branches:
            - master
          git-config-name:
          git-config-email:

- scm:
    name: xtesting-vm-scm
    scm:
      - git:
          url: https://git.opnfv.org/functest-xtesting.git
          branches:
            - master
          git-config-name:
          git-config-email:

- scm:
    name: functest-vm-scm
    scm:
      - git:
          url: https://git.opnfv.org/functest.git
          branches:
            - master
          git-config-name:
          git-config-email:

- scm:
    name: functest-kubernetes-vm-scm
    scm:
      - git:
          url: https://git.opnfv.org/functest-kubernetes.git
          branches:
            - master
          git-config-name:
          git-config-email:

- builder:
    name: xtesting-ci-vm-builder
    builders:
      - shell: |
          curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
          echo "deb https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee \
            /etc/apt/sources.list.d/google-cloud-sdk.list
          sudo apt-get -o DPkg::Lock::Timeout=300 update && \
          DEBIAN_FRONTEND=noninteractive sudo apt-get \
            -o DPkg::Lock::Timeout=300 install python3-diskimage-builder -y
          export ELEMENTS_PATH=$(pwd)/elements
          export DIB_DEBIAN_COMPONENTS=main,contrib,non-free
          export DIB_DEV_USER_SHELL=/bin/bash
          export DIB_OPENSSH_SERVER_HARDENING=0
          export DIB_DEV_USER_PASSWORD=xtesting
          export DIB_DEV_USER_PWDLESS_SUDO=yes
          export DIB_CLOUD_INIT_ALLOW_SSH_PWAUTH=Yes
          export DIB_RELEASE=bookworm
          export DIB_DEV_USER_USERNAME=xtesting
          disk-image-create --image-size 20 -o xtestingci-4.1.0.qcow2 debian vm devuser openssh-server xtestingci
          gsutil cp xtestingci-4.1.0.qcow2 gs://artifacts.opnfv.org/xtestingci/xtestingci-4.1.0.qcow2


- builder:
    name: xtesting-vm-builder
    builders:
      - shell: |
          curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
          echo "deb https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee \
            /etc/apt/sources.list.d/google-cloud-sdk.list
          sudo apt-get -o DPkg::Lock::Timeout=300 update && \
          DEBIAN_FRONTEND=noninteractive sudo apt-get \
            -o DPkg::Lock::Timeout=300 install python3-diskimage-builder -y
          git clone https://github.com/collivier/ansible-role-xtesting.git
          export ELEMENTS_PATH=$(pwd)/elements:$(pwd)/ansible-role-xtesting/elements
          export DIB_DEBIAN_COMPONENTS=main,contrib,non-free
          export DIB_DEV_USER_SHELL=/bin/bash
          export DIB_OPENSSH_SERVER_HARDENING=0
          export DIB_DEV_USER_PASSWORD=xtesting
          export DIB_DEV_USER_PWDLESS_SUDO=yes
          export DIB_CLOUD_INIT_ALLOW_SSH_PWAUTH=Yes
          export DIB_RELEASE=bookworm
          export DIB_DEV_USER_USERNAME=xtesting
          disk-image-create --image-size 20 -o xtesting-latest.qcow2 debian vm devuser openssh-server xtesting
          gsutil cp xtesting-latest.qcow2 gs://artifacts.opnfv.org/xtesting/xtesting-latest.qcow2

- builder:
    name: functest-vm-builder
    builders:
      - shell: |
          curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
          echo "deb https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee \
            /etc/apt/sources.list.d/google-cloud-sdk.list
          sudo apt-get -o DPkg::Lock::Timeout=300 update && \
          DEBIAN_FRONTEND=noninteractive sudo apt-get \
            -o DPkg::Lock::Timeout=300 install python3-diskimage-builder -y
          git clone https://github.com/collivier/ansible-role-xtesting.git
          export ELEMENTS_PATH=$(pwd)/elements:$(pwd)/ansible-role-xtesting/elements
          export DIB_DEBIAN_COMPONENTS=main,contrib,non-free
          export DIB_DEV_USER_SHELL=/bin/bash
          export DIB_OPENSSH_SERVER_HARDENING=0
          export DIB_DEV_USER_PASSWORD=xtesting
          export DIB_DEV_USER_PWDLESS_SUDO=yes
          export DIB_CLOUD_INIT_ALLOW_SSH_PWAUTH=Yes
          export DIB_RELEASE=bookworm
          export DIB_DEV_USER_USERNAME=xtesting
          disk-image-create --image-size 20 -o functest-latest.qcow2 debian vm devuser openssh-server functest
          gsutil cp functest-latest.qcow2 gs://artifacts.opnfv.org/functest/functest-latest.qcow2

- builder:
    name: functest-kubernetes-vm-builder
    builders:
      - shell: |
          curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
          echo "deb https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee \
            /etc/apt/sources.list.d/google-cloud-sdk.list
          sudo apt-get -o DPkg::Lock::Timeout=300 update && \
          DEBIAN_FRONTEND=noninteractive sudo apt-get \
            -o DPkg::Lock::Timeout=300 install python3-diskimage-builder -y
          git clone https://github.com/collivier/ansible-role-xtesting.git
          export ELEMENTS_PATH=$(pwd)/elements:$(pwd)/ansible-role-xtesting/elements
          export DIB_DEBIAN_COMPONENTS=main,contrib,non-free
          export DIB_DEV_USER_SHELL=/bin/bash
          export DIB_OPENSSH_SERVER_HARDENING=0
          export DIB_DEV_USER_PASSWORD=xtesting
          export DIB_DEV_USER_PWDLESS_SUDO=yes
          export DIB_CLOUD_INIT_ALLOW_SSH_PWAUTH=Yes
          export DIB_RELEASE=bookworm
          export DIB_DEV_USER_USERNAME=xtesting
          disk-image-create --image-size 20 -o functest-kubernetes-latest.qcow2 \
            debian vm devuser openssh-server functest-kubernetes
          gsutil cp functest-kubernetes-latest.qcow2 \
            gs://artifacts.opnfv.org/functest-kubernetes/functest-kubernetes-latest.qcow2

- trigger:
    name: xtesting-ci-vm-trigger
    triggers:
      - timed: '@daily'

- parameter:
    name: xtesting-ci-vm-parameter
    parameters:
      - label:
          name: node
          default: 'opnfv-build'

- job-template:
    name: 'xtesting-ci-vm'
    scm:
      - xtesting-ci-vm-scm
    triggers:
      - xtesting-ci-vm-trigger
    parameters:
      - xtesting-ci-vm-parameter
    properties:
      - build-blocker:
          use-build-blocker: true
          blocking-level: 'NODE'
          blocking-jobs:
            - '^.*-vm$'
    builders:
      - xtesting-ci-vm-builder

- job-template:
    name: 'xtesting-vm'
    scm:
      - xtesting-vm-scm
    triggers:
      - xtesting-ci-vm-trigger
    parameters:
      - xtesting-ci-vm-parameter
    builders:
      - xtesting-vm-builder

- job-template:
    name: 'functest-vm'
    scm:
      - functest-vm-scm
    triggers:
      - xtesting-ci-vm-trigger
    parameters:
      - xtesting-ci-vm-parameter
    builders:
      - functest-vm-builder

- job-template:
    name: 'functest-kubernetes-vm'
    scm:
      - functest-kubernetes-vm-scm
    triggers:
      - xtesting-ci-vm-trigger
    parameters:
      - xtesting-ci-vm-parameter
    builders:
      - functest-kubernetes-vm-builder

- project:
    name: 'xtesting-ci-vm'
    jobs:
      - 'xtesting-ci-vm'
      - 'xtesting-vm'
      - 'functest-vm'
      - 'functest-kubernetes-vm'

- view:
    name: xtesting-ci-vm
    view-type: list
    columns:
      - status
      - weather
      - job
      - last-success
      - last-failure
      - last-duration
    regex: ^.*-vm$