summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-01-25 20:40:38 +0000
committerGerrit Code Review <review@openstack.org>2018-01-25 20:40:38 +0000
commita07d5229704841d5a8a6333b375ece4b6e0f9269 (patch)
tree2f946379354a6d11440ba1e981ddb05def676d1c
parent81e708281f6bdeea2dba12eb08cf9c33265e7050 (diff)
parentcbe8ef893b98f01a03fe17f842e5c4c81b495586 (diff)
Merge "Use native Zuul v3 tox job"6.0.0.0b3
-rw-r--r--.zuul.yaml14
-rw-r--r--playbooks/legacy/manila-tox-genconfig/post.yaml67
-rw-r--r--playbooks/legacy/manila-tox-genconfig/run.yaml86
3 files changed, 7 insertions, 160 deletions
diff --git a/.zuul.yaml b/.zuul.yaml
index 038c0f2..d96131f 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -1,5 +1,4 @@
1- project: 1- project:
2 name: openstack/manila
3 check: 2 check:
4 jobs: 3 jobs:
5 - manila-tox-genconfig 4 - manila-tox-genconfig
@@ -355,12 +354,13 @@
355 354
356- job: 355- job:
357 name: manila-tox-genconfig 356 name: manila-tox-genconfig
358 parent: legacy-base 357 parent: openstack-tox
359 run: playbooks/legacy/manila-tox-genconfig/run.yaml 358 description: |
360 post-run: playbooks/legacy/manila-tox-genconfig/post.yaml 359 Run tests for manila project.
361 timeout: 2400 360
362 required-projects: 361 Uses tox with the ``genconfig`` environment.
363 - openstack/requirements 362 vars:
363 tox_envlist: genconfig
364 364
365- job: 365- job:
366 name: rally-dsvm-manila-multibackend 366 name: rally-dsvm-manila-multibackend
diff --git a/playbooks/legacy/manila-tox-genconfig/post.yaml b/playbooks/legacy/manila-tox-genconfig/post.yaml
deleted file mode 100644
index 68fbdf8..0000000
--- a/playbooks/legacy/manila-tox-genconfig/post.yaml
+++ /dev/null
@@ -1,67 +0,0 @@
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
diff --git a/playbooks/legacy/manila-tox-genconfig/run.yaml b/playbooks/legacy/manila-tox-genconfig/run.yaml
deleted file mode 100644
index c602bac..0000000
--- a/playbooks/legacy/manila-tox-genconfig/run.yaml
+++ /dev/null
@@ -1,86 +0,0 @@
1- hosts: all
2 name: Autoconverted job legacy-manila-tox-genconfig from old job gate-manila-tox-genconfig-ubuntu-xenial
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 CLONEMAP=`mktemp`
15 REQS_DIR=`mktemp -d`
16 function cleanup {
17 mkdir -p $WORKSPACE
18 rm -rf $CLONEMAP $REQS_DIR
19 }
20 trap cleanup EXIT
21 cat > $CLONEMAP << EOF
22 clonemap:
23 - name: $ZUUL_PROJECT
24 dest: .
25 EOF
26 # zuul cloner works poorly if there are 2 names that are the
27 # same in here.
28 if [[ "$ZUUL_PROJECT" != "openstack/requirements" ]]; then
29 cat >> $CLONEMAP << EOF
30 - name: openstack/requirements
31 dest: $REQS_DIR
32 EOF
33 fi
34 /usr/zuul-env/bin/zuul-cloner -m $CLONEMAP --cache-dir /opt/git \
35 git://git.openstack.org $ZUUL_PROJECT openstack/requirements
36 # REQS_DIR is not set for openstack/requirements and there is also
37 # no need to copy in this case.
38 if [[ "$ZUUL_PROJECT" != "openstack/requirements" ]]; then
39 cp $REQS_DIR/upper-constraints.txt ./
40 fi
41 executable: /bin/bash
42 chdir: '{{ ansible_user_dir }}/workspace'
43 environment: '{{ zuul | zuul_legacy_vars }}'
44
45 - shell:
46 cmd: /usr/local/jenkins/slave_scripts/install-distro-packages.sh
47 chdir: '{{ ansible_user_dir }}/workspace'
48 environment: '{{ zuul | zuul_legacy_vars }}'
49
50 - shell:
51 cmd: |
52 if [ -x tools/test-setup.sh ] ; then
53 tools/test-setup.sh
54 fi
55 chdir: '{{ ansible_user_dir }}/workspace'
56 environment: '{{ zuul | zuul_legacy_vars }}'
57
58 - shell:
59 cmd: |
60 set -x
61 sudo rm -f /etc/sudoers.d/zuul
62 # Prove that general sudo access is actually revoked
63 ! sudo -n true
64 executable: /bin/bash
65 chdir: '{{ ansible_user_dir }}/workspace'
66 environment: '{{ zuul | zuul_legacy_vars }}'
67
68 - shell:
69 cmd: /usr/local/jenkins/slave_scripts/run-tox.sh genconfig
70 chdir: '{{ ansible_user_dir }}/workspace'
71 environment: '{{ zuul | zuul_legacy_vars }}'
72
73 - shell:
74 cmd: |
75 OUT=`git ls-files --other --exclude-standard --directory`
76 if [ -z "$OUT" ]; then
77 echo "No extra files created during test."
78 exit 0
79 else
80 echo "The following un-ignored files were created during the test:"
81 echo "$OUT"
82 exit 0 # TODO: change to 1 to fail tests.
83 fi
84 executable: /bin/bash
85 chdir: '{{ ansible_user_dir }}/workspace'
86 environment: '{{ zuul | zuul_legacy_vars }}'