Browse Source

Import legacy job

Import legacy job from openstack-zuul-jobs.

Change-Id: I5c28ce42606dc96d7df179a46e55abe453f93fe8
Andreas Jaeger 7 months ago
parent
commit
6d65af2900

+ 12
- 1
.zuul.yaml View File

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

+ 80
- 0
playbooks/devstack-plugin-container-dsvm/post.yaml View File

@@ -0,0 +1,80 @@
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=**/*nose_results.html
13
+          - --include=*/
14
+          - --exclude=*
15
+          - --prune-empty-dirs
16
+
17
+    - name: Copy files from {{ ansible_user_dir }}/workspace/ on node
18
+      synchronize:
19
+        src: '{{ ansible_user_dir }}/workspace/'
20
+        dest: '{{ zuul.executor.log_root }}'
21
+        mode: pull
22
+        copy_links: true
23
+        verify_host: true
24
+        rsync_opts:
25
+          - --include=**/*testr_results.html.gz
26
+          - --include=*/
27
+          - --exclude=*
28
+          - --prune-empty-dirs
29
+
30
+    - name: Copy files from {{ ansible_user_dir }}/workspace/ on node
31
+      synchronize:
32
+        src: '{{ ansible_user_dir }}/workspace/'
33
+        dest: '{{ zuul.executor.log_root }}'
34
+        mode: pull
35
+        copy_links: true
36
+        verify_host: true
37
+        rsync_opts:
38
+          - --include=/.testrepository/tmp*
39
+          - --include=*/
40
+          - --exclude=*
41
+          - --prune-empty-dirs
42
+
43
+    - name: Copy files from {{ ansible_user_dir }}/workspace/ on node
44
+      synchronize:
45
+        src: '{{ ansible_user_dir }}/workspace/'
46
+        dest: '{{ zuul.executor.log_root }}'
47
+        mode: pull
48
+        copy_links: true
49
+        verify_host: true
50
+        rsync_opts:
51
+          - --include=**/*testrepository.subunit.gz
52
+          - --include=*/
53
+          - --exclude=*
54
+          - --prune-empty-dirs
55
+
56
+    - name: Copy files from {{ ansible_user_dir }}/workspace/ on node
57
+      synchronize:
58
+        src: '{{ ansible_user_dir }}/workspace/'
59
+        dest: '{{ zuul.executor.log_root }}/tox'
60
+        mode: pull
61
+        copy_links: true
62
+        verify_host: true
63
+        rsync_opts:
64
+          - --include=/.tox/*/log/*
65
+          - --include=*/
66
+          - --exclude=*
67
+          - --prune-empty-dirs
68
+
69
+    - name: Copy files from {{ ansible_user_dir }}/workspace/ on node
70
+      synchronize:
71
+        src: '{{ ansible_user_dir }}/workspace/'
72
+        dest: '{{ zuul.executor.log_root }}'
73
+        mode: pull
74
+        copy_links: true
75
+        verify_host: true
76
+        rsync_opts:
77
+          - --include=/logs/**
78
+          - --include=*/
79
+          - --exclude=*
80
+          - --prune-empty-dirs

+ 69
- 0
playbooks/devstack-plugin-container-dsvm/run.yaml View File

@@ -0,0 +1,69 @@
1
+- hosts: all
2
+  name: Autoconverted job legacy-devstack-plugin-container-dsvm from old job gate-devstack-plugin-container-dsvm-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
+          cat << 'EOF' >>"/tmp/dg-local.conf"
31
+          [[local|localrc]]
32
+          enable_plugin devstack-plugin-container git://git.openstack.org/openstack/devstack-plugin-container
33
+
34
+          EOF
35
+        executable: /bin/bash
36
+        chdir: '{{ ansible_user_dir }}/workspace'
37
+      environment: '{{ zuul | zuul_legacy_vars }}'
38
+
39
+    - shell:
40
+        cmd: |
41
+          set -e
42
+          set -x
43
+          export PYTHONUNBUFFERED=true
44
+          export DEVSTACK_GATE_TEMPEST=0
45
+
46
+          export BRANCH_OVERRIDE=default
47
+          if [ "$BRANCH_OVERRIDE" != "default" ] ; then
48
+              export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE
49
+          fi
50
+
51
+          export PROJECTS="openstack/devstack-plugin-container $PROJECTS"
52
+          # Keep localrc to be able to set some vars in post_test_hook
53
+          export KEEP_LOCALRC=1
54
+
55
+          function gate_hook {
56
+              bash -xe $BASE/new/devstack-plugin-container/contrib/gate_hook.sh
57
+          }
58
+          export -f gate_hook
59
+
60
+          function post_test_hook {
61
+              bash -xe $BASE/new/devstack-plugin-container/contrib/post_test_hook.sh fullstack
62
+          }
63
+          export -f post_test_hook
64
+
65
+          cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh
66
+          ./safe-devstack-vm-gate-wrap.sh
67
+        executable: /bin/bash
68
+        chdir: '{{ ansible_user_dir }}/workspace'
69
+      environment: '{{ zuul | zuul_legacy_vars }}'

Loading…
Cancel
Save