Move legacy jobs to project

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

Move jobs to murano-apps repo

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

Co-Authored-By: Nam Nguyen Hoai <namnh@vn.fujitsu.com>
Co-Authored-By: zhurong <aaronzhu1121@gmail.com>

Needed-By: I739c2fabf5af43f2a3644c7d8ca57460780b5c2b
Change-Id: I54feb37de05ea58f0b26c0206fce658ef54d9325
This commit is contained in:
Duong Ha-Quang 2017-10-05 16:02:40 +07:00 committed by zhurong
parent fcbf3c81d5
commit 9e29f9decb
3 changed files with 193 additions and 0 deletions

22
.zuul.yaml Normal file
View File

@ -0,0 +1,22 @@
- project:
name: openstack/murano-apps
check:
jobs:
- murano-apps-refstackclient-unittest
- job:
name: murano-apps-refstackclient-unittest
parent: legacy-dsvm-base
run: playbooks/legacy/murano-apps-refstackclient-unittest/run.yaml
post-run: playbooks/legacy/murano-apps-refstackclient-unittest/post.yaml
timeout: 7800
required-projects:
- openstack-infra/devstack-gate
- openstack/murano
- openstack/murano-apps
- openstack/murano-dashboard
- openstack/python-muranoclient
- openstack/refstack
voting: false
files:
- RefStackClient/.*

View File

@ -0,0 +1,80 @@
- hosts: primary
tasks:
- name: Copy files from {{ ansible_user_dir }}/workspace/ on node
synchronize:
src: '{{ ansible_user_dir }}/workspace/'
dest: '{{ zuul.executor.log_root }}'
mode: pull
copy_links: true
verify_host: true
rsync_opts:
- --include=**/*nose_results.html
- --include=*/
- --exclude=*
- --prune-empty-dirs
- name: Copy files from {{ ansible_user_dir }}/workspace/ on node
synchronize:
src: '{{ ansible_user_dir }}/workspace/'
dest: '{{ zuul.executor.log_root }}'
mode: pull
copy_links: true
verify_host: true
rsync_opts:
- --include=**/*testr_results.html.gz
- --include=*/
- --exclude=*
- --prune-empty-dirs
- name: Copy files from {{ ansible_user_dir }}/workspace/ on node
synchronize:
src: '{{ ansible_user_dir }}/workspace/'
dest: '{{ zuul.executor.log_root }}'
mode: pull
copy_links: true
verify_host: true
rsync_opts:
- --include=/.testrepository/tmp*
- --include=*/
- --exclude=*
- --prune-empty-dirs
- name: Copy files from {{ ansible_user_dir }}/workspace/ on node
synchronize:
src: '{{ ansible_user_dir }}/workspace/'
dest: '{{ zuul.executor.log_root }}'
mode: pull
copy_links: true
verify_host: true
rsync_opts:
- --include=**/*testrepository.subunit.gz
- --include=*/
- --exclude=*
- --prune-empty-dirs
- name: Copy files from {{ ansible_user_dir }}/workspace/ on node
synchronize:
src: '{{ ansible_user_dir }}/workspace/'
dest: '{{ zuul.executor.log_root }}/tox'
mode: pull
copy_links: true
verify_host: true
rsync_opts:
- --include=/.tox/*/log/*
- --include=*/
- --exclude=*
- --prune-empty-dirs
- name: Copy files from {{ ansible_user_dir }}/workspace/ on node
synchronize:
src: '{{ ansible_user_dir }}/workspace/'
dest: '{{ zuul.executor.log_root }}'
mode: pull
copy_links: true
verify_host: true
rsync_opts:
- --include=/logs/**
- --include=*/
- --exclude=*
- --prune-empty-dirs

View File

@ -0,0 +1,91 @@
- hosts: all
name: Autoconverted job legacy-murano-apps-refstackclient-unittest from old
job gate-dsvm-murano-apps-refstackclient-unittest-ubuntu-xenial-nv
tasks:
- name: Ensure legacy workspace directory
file:
path: '{{ ansible_user_dir }}/workspace'
state: directory
- shell:
cmd: |
set -e
set -x
CLONEMAP=`mktemp`
function cleanup {
# In cases where zuul-cloner is aborted during a git
# clone operation, git will remove the git work tree in
# its cleanup. The work tree in these jobs is the
# workspace directory, which means that subsequent
# jenkins post-build actions can not run because the
# workspace has been removed.
# To reduce the likelihood of this having an impact,
# recreate the workspace directory if needed
mkdir -p $WORKSPACE
rm -f $CLONEMAP
}
trap cleanup EXIT
cat > $CLONEMAP << EOF
clonemap:
- name: $ZUUL_PROJECT
dest: .
EOF
/usr/zuul-env/bin/zuul-cloner -m $CLONEMAP --cache-dir /opt/git \
git://git.openstack.org $ZUUL_PROJECT
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
set -e
set -x
cat > clonemap.yaml << EOF
clonemap:
- name: openstack-infra/devstack-gate
dest: devstack-gate
EOF
/usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \
git://git.openstack.org \
openstack-infra/devstack-gate
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
set -e
set -x
cat << 'EOF' >>"/tmp/dg-local.conf"
[[local|localrc]]
enable_plugin murano git://git.openstack.org/openstack/murano
disable_service heat h-api h-api-cfn h-api-cw h-eng
EOF
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
set -e
set -x
export PYTHONUNBUFFERED=true
export DEVSTACK_GATE_NEUTRON=1
# Allow tempest to use site-packages with plugins
export PROJECTS="openstack/murano $PROJECTS"
export PROJECTS="openstack/python-muranoclient $PROJECTS"
export PROJECTS="openstack/murano-dashboard $PROJECTS"
function post_test_hook {
# Configure and run functional tests
. /opt/stack/new/devstack/openrc admin admin
cd ${WORKSPACE}
tox -ve refstackclient-unittest
}
export -f post_test_hook
cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh
./safe-devstack-vm-gate-wrap.sh
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'