Browse Source

Import legacy job

Import legacy job legacy-manila-test-image-build and rename it according
to Zuul v3 naming conventions.

Change-Id: I9bb1dd0acb8a55d658330ea4be95bcc65691f76d
changes/56/600956/2
Andreas Jaeger 8 months ago
parent
commit
855f132414
2 changed files with 56 additions and 1 deletions
  1. 7
    1
      .zuul.yaml
  2. 49
    0
      playbooks/manila-test-image-build/run.yaml

+ 7
- 1
.zuul.yaml View File

@@ -1,3 +1,9 @@
1
+- job:
2
+    name: manila-test-image-build
3
+    parent: legacy-base
4
+    run: playbooks/manila-test-image-build/run.yaml
5
+    timeout: 3600
6
+
1 7
 - project:
2 8
     check:
3 9
       jobs:
@@ -7,4 +13,4 @@
7 13
         - openstack-tox-bashate
8 14
     experimental:
9 15
       jobs:
10
-        - legacy-manila-test-image-build
16
+        - manila-test-image-build

+ 49
- 0
playbooks/manila-test-image-build/run.yaml View File

@@ -0,0 +1,49 @@
1
+- hosts: all
2
+  name: Autoconverted job legacy-manila-test-image-build from old job gate-manila-test-image-build
3
+  roles:
4
+    - bindep
5
+
6
+  tasks:
7
+
8
+    - name: Ensure legacy workspace directory
9
+      file:
10
+        path: '{{ ansible_user_dir }}/workspace'
11
+        state: directory
12
+
13
+    - shell:
14
+        cmd: |
15
+          set -e
16
+          set -x
17
+          CLONEMAP=`mktemp`
18
+          function cleanup {
19
+              # In cases where zuul-cloner is aborted during a git
20
+              # clone operation, git will remove the git work tree in
21
+              # its cleanup. The work tree in these jobs is the
22
+              # workspace directory, which means that subsequent
23
+              # jenkins post-build actions can not run because the
24
+              # workspace has been removed.
25
+              # To reduce the likelihood of this having an impact,
26
+              # recreate the workspace directory if needed
27
+              mkdir -p $WORKSPACE
28
+              rm -f $CLONEMAP
29
+          }
30
+          trap cleanup EXIT
31
+          cat > $CLONEMAP << EOF
32
+          clonemap:
33
+            - name: $ZUUL_PROJECT
34
+              dest: .
35
+          EOF
36
+          /usr/zuul-env/bin/zuul-cloner -m $CLONEMAP --cache-dir /opt/git \
37
+              git://git.openstack.org $ZUUL_PROJECT
38
+        executable: /bin/bash
39
+        chdir: '{{ ansible_user_dir }}/workspace'
40
+      environment: '{{ zuul | zuul_legacy_vars }}'
41
+
42
+    - shell:
43
+        cmd: |
44
+          set -e
45
+          set -x
46
+          ./run-buildroot.sh
47
+        executable: /bin/bash
48
+        chdir: '{{ ansible_user_dir }}/workspace'
49
+      environment: '{{ zuul | zuul_legacy_vars }}'

Loading…
Cancel
Save