Switch libraries jobs to Zuul v3

Change-Id: I9f4bb7c93a31b64285ab1342e8ade20320ed172a
This commit is contained in:
ZhongShengping 2018-02-12 14:42:55 +08:00
parent 4e02db3815
commit cb96f9f51a
6 changed files with 152 additions and 3 deletions

View File

@ -27,10 +27,12 @@
- openstack/puppet-manila
- openstack/puppet-mistral
- openstack/puppet-monasca
- openstack/puppet-modulesync-configs
- openstack/puppet-murano
- openstack/puppet-neutron
- openstack/puppet-nova
- openstack/puppet-octavia
- openstack/puppet-openstack-cookiecutter
- openstack/puppet-openstack-integration
- openstack/puppet-openstack_extras
- openstack/puppet-openstacklib
@ -436,3 +438,91 @@
jobs:
- puppet-openstack-beaker-centos-7
- puppet-openstack-beaker-xenial
- job:
name: puppet-openstack-libraries-puppet-beaker-rspec-centos-7
parent: puppet-openstack-integration-base
pre-run: playbooks/prepare-node-beaker.yaml
post-run: playbooks/upload-logs.yaml
run: playbooks/run-libraries-beaker-tests.yaml
timeout: 3600
nodeset: centos-7
irrelevant-files:
- ^.*\.md$
- ^.*\.rst$
- ^doc/.*$
- ^etc/.*$
- ^metadata.json$
- ^releasenotes/.*$
- ^test-requirements.txt$
- job:
name: puppet-openstack-libraries-puppet-lint-centos-7
parent: puppet-openstack-integration-base
run: playbooks/run-libraries-lint-tests.yaml
pre-run: playbooks/prepare-node-unit.yaml
timeout: 3600
nodeset: centos-7
- job:
name: puppet-openstack-libraries-puppet-syntax
parent: puppet-openstack-integration-base
run: playbooks/run-libraries-syntax-tests.yaml
pre-run: playbooks/prepare-node-unit.yaml
timeout: 3600
irrelevant-files:
- ^.*\.md$
- ^.*\.rst$
- ^doc/.*$
- ^etc/.*$
- ^metadata.json$
- ^releasenotes/.*$
- ^test-requirements.txt$
- job:
name: puppet-openstack-libraries-puppet-syntax-3-centos-7
parent: puppet-openstack-libraries-puppet-syntax
nodeset: centos-7
branches: ^(stable/(newton|ocata)).*$
vars:
puppet: 3
- job:
name: puppet-openstack-libraries-puppet-syntax-4-centos-7
parent: puppet-openstack-libraries-puppet-syntax
nodeset: centos-7
vars:
puppet: 4
- job:
name: puppet-openstack-libraries-puppet-unit-centos-7
parent: puppet-openstack-integration-base
run: playbooks/run-libraries-unit-tests.yaml
pre-run: playbooks/prepare-node-unit.yaml
timeout: 3600
nodeset: centos-7
irrelevant-files:
- ^.*\.md$
- ^.*\.rst$
- ^doc/.*$
- ^etc/.*$
- ^metadata.json$
- ^releasenotes/.*$
- ^test-requirements.txt$
- project-template:
name: puppet-openstack-library-jobs
check:
jobs:
- puppet-openstack-libraries-puppet-lint-centos-7
- puppet-openstack-libraries-puppet-syntax-3-centos-7
- puppet-openstack-libraries-puppet-syntax-4-centos-7
- puppet-openstack-libraries-puppet-unit-centos-7
- puppet-openstack-libraries-puppet-beaker-rspec-centos-7
gate:
jobs:
- puppet-openstack-libraries-puppet-lint-centos-7
- puppet-openstack-libraries-puppet-syntax-3-centos-7
- puppet-openstack-libraries-puppet-syntax-4-centos-7
- puppet-openstack-libraries-puppet-unit-centos-7
- puppet-openstack-libraries-puppet-beaker-rspec-centos-7

View File

@ -31,6 +31,3 @@
- include_role:
name: bindep
- include_role:
name: revoke-sudo

View File

@ -0,0 +1,31 @@
- hosts: all
tasks:
- shell:
cmd: |
echo "" | sudo tee -a /etc/ssh/sshd_config
echo "Match address 127.0.0.1" | sudo tee -a /etc/ssh/sshd_config
echo " PermitRootLogin without-password" | sudo tee -a /etc/ssh/sshd_config
echo "" | sudo tee -a /etc/ssh/sshd_config
echo "Match address ::1" | sudo tee -a /etc/ssh/sshd_config
echo " PermitRootLogin without-password" | sudo tee -a /etc/ssh/sshd_config
mkdir -p .ssh
ssh-keygen -f ~/.ssh/id_rsa -b 2048 -P ""
sudo mkdir -p /root/.ssh
cat ~/.ssh/id_rsa.pub | sudo tee -a /root/.ssh/authorized_keys
if [ -f /usr/bin/yum ]; then
sudo systemctl reload sshd
elif [ -f /usr/bin/apt-get ]; then
sudo service ssh restart
fi
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
set -e
set -x
trap "{{ ansible_user_dir }}/workspace/openstack/puppet-openstack-integration/copy_logs.sh" EXIT
./run_beaker_tests.sh
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'

View File

@ -0,0 +1,10 @@
- hosts: all
tasks:
- shell:
cmd: |
set -e
set -x
./run_lint_tests.sh
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'

View File

@ -0,0 +1,11 @@
- hosts: all
tasks:
- shell:
cmd: |
set -e
set -x
export PUPPET_VERSION="{{ puppet }}"
./run_syntax_tests.sh
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'

View File

@ -0,0 +1,10 @@
- hosts: all
tasks:
- shell:
cmd: |
set -e
set -x
./run_unit_tests.sh
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'