Browse Source

Move legacy jobs to project

This patch implements first step in zuulv3 migration guide [1]:

Move jobs to mixmatch repo

[1] https://docs.openstack.org/infra/manual/zuulv3.html#legacy-job-migration-details

Change-Id: I6d97b4ec8f4c22785a1081dc711257c071637999
Duong Ha-Quang 1 year ago
parent
commit
23d5c2df9e

+ 17
- 0
.zuul.yaml View File

@@ -0,0 +1,17 @@
1
+- project:
2
+    name: openstack/mixmatch
3
+    check:
4
+      jobs:
5
+        - mixmatch-dsvm-functional:
6
+            voting: false
7
+
8
+- job:
9
+    name: mixmatch-dsvm-functional
10
+    parent: legacy-dsvm-base
11
+    run: playbooks/legacy/mixmatch-dsvm-functional/run
12
+    post-run: playbooks/legacy/mixmatch-dsvm-functional/post
13
+    timeout: 7800
14
+    required-projects:
15
+      - openstack-infra/devstack-gate
16
+      - openstack/mixmatch
17
+

+ 2
- 2
mixmatch/tests/functional/hooks/dsvm_hook.sh View File

@@ -35,8 +35,8 @@ if [ -d .testrepository ]; then
35 35
     sudo rm -r .testrepository
36 36
 fi
37 37
 
38
-sudo chown -R jenkins:stack $BASE/new/tempest
39
-sudo chown -R jenkins:stack /opt/stack/data/tempest
38
+sudo chown -R $USER:stack $BASE/new/tempest
39
+sudo chown -R $USER:stack /opt/stack/data/tempest
40 40
 
41 41
 ostestr -r '(^tempest.api.compute|^tempest.api.image|^tempest.api.volume|^tempest.api.network|^tempest.scenario)' \
42 42
     --blacklist-file $BASE/new/mixmatch/mixmatch/tests/functional/tempest_blacklist.txt

+ 15
- 0
playbooks/legacy/mixmatch-dsvm-functional/post.yaml View File

@@ -0,0 +1,15 @@
1
+- hosts: primary
2
+  tasks:
3
+
4
+    - name: Copy files from {{ ansible_user_dir }}/workspace/ on node
5
+      synchronize:
6
+        src: '{{ ansible_user_dir }}/workspace/'
7
+        dest: '{{ zuul.executor.log_root }}'
8
+        mode: pull
9
+        copy_links: true
10
+        verify_host: true
11
+        rsync_opts:
12
+          - --include=/logs/**
13
+          - --include=*/
14
+          - --exclude=*
15
+          - --prune-empty-dirs

+ 52
- 0
playbooks/legacy/mixmatch-dsvm-functional/run.yaml View File

@@ -0,0 +1,52 @@
1
+- hosts: all
2
+  name: Autoconverted job legacy-mixmatch-dsvm-functional from old job gate-mixmatch-dsvm-functional-ubuntu-xenial-nv
3
+  tasks:
4
+
5
+    - name: Ensure legacy workspace directory
6
+      file:
7
+        path: '{{ ansible_user_dir }}/workspace'
8
+        state: directory
9
+
10
+    - shell:
11
+        cmd: |
12
+          set -e
13
+          set -x
14
+          cat > clonemap.yaml << EOF
15
+          clonemap:
16
+            - name: openstack-infra/devstack-gate
17
+              dest: devstack-gate
18
+          EOF
19
+          /usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \
20
+              git://git.openstack.org \
21
+              openstack-infra/devstack-gate
22
+        executable: /bin/bash
23
+        chdir: '{{ ansible_user_dir }}/workspace'
24
+      environment: '{{ zuul | zuul_legacy_vars }}'
25
+
26
+    - shell:
27
+        cmd: |
28
+          set -e
29
+          set -x
30
+          export PYTHONUNBUFFERED=true
31
+          export BRANCH_OVERRIDE=default
32
+          export PROJECTS="openstack/mixmatch $PROJECTS"
33
+          if [ "$BRANCH_OVERRIDE" != "default" ] ; then
34
+              export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE
35
+          fi
36
+
37
+          export DEVSTACK_LOCAL_CONFIG="enable_plugin mixmatch git://git.openstack.org/openstack/mixmatch"
38
+
39
+          export DEVSTACK_GATE_TEMPEST=1
40
+          export DEVSTACK_GATE_TEMPEST_NOTESTS=1
41
+
42
+          function post_test_hook {
43
+              # Configure and run functional tests
44
+              $BASE/new/mixmatch/mixmatch/tests/functional/hooks/dsvm_hook.sh
45
+          }
46
+          export -f post_test_hook
47
+
48
+          cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh
49
+          ./safe-devstack-vm-gate-wrap.sh
50
+        executable: /bin/bash
51
+        chdir: '{{ ansible_user_dir }}/workspace'
52
+      environment: '{{ zuul | zuul_legacy_vars }}'

Loading…
Cancel
Save