Update base-test to use new zuul-jobs roles
This exercises the new base roles in zuul-jobs. It drops openstack-zuul-roles from the base-test job, as well as the workspace root variable which should no longer be needed. It also uses the new zuul_return method of reporting the log URL. Change-Id: I93ce94c4e40b44a1f7a5cf6c5a8521ab71da5a5a Depends-On: I7ac8d2335518c06808461f2fb30ea896709f09ed
This commit is contained in:
parent
7ea50c55a0
commit
fc7a8c230f
32
playbooks/base-test/post-logs.yaml
Normal file
32
playbooks/base-test/post-logs.yaml
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
- hosts: localhost
|
||||||
|
tasks:
|
||||||
|
- name: Add log server ssh key
|
||||||
|
command: ssh-add /var/lib/zuul/ssh/static_id_rsa
|
||||||
|
|
||||||
|
- name: Add log server to inventory
|
||||||
|
add_host:
|
||||||
|
name: static.openstack.org
|
||||||
|
groups: zuul_logserver
|
||||||
|
ansible_user: jenkins
|
||||||
|
|
||||||
|
- name: Add log server to known hosts
|
||||||
|
known_hosts:
|
||||||
|
name: static.openstack.org
|
||||||
|
key: static.openstack.org,23.253.108.137,2001:4800:7817:104:be76:4eff:fe05:dbee ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDcvLuGLagUAZfc0BThLus8ufSPCrIhDtG0BdXvhblJjvIbkuELD3dRWRZVSYZAdzGZRY3t6vTAcguTrkbQg5ngXfdfF+OKPkaH8DiZwAX/1g/iRXhInkZTGBVqHo9pLAMeNNwviSy2JjpTqdD6fLEkHwW+uw4E2YZhYivctTSbOepMkzAtFV0w5cpyBzjAT/Hax2x5un6es8R0Iw3AAnUmtapn5e5NCrg2rPNpd0nve84wUavvbC2DeGDOZQdnIahwo60Sder5ZE/x6cG39bkSDdgFQArAzrNrH6BHmNGjfFPpnGmfc7P8gQwDPtMf02HvKapqATXpIxdbSGimWLL
|
||||||
|
|
||||||
|
- name: Copy inventory to logs dir
|
||||||
|
copy:
|
||||||
|
src: "{{ inventory_file }}"
|
||||||
|
dest: "{{ zuul.executor.log_root }}"
|
||||||
|
|
||||||
|
- hosts: zuul_logserver
|
||||||
|
roles:
|
||||||
|
- upload-logs
|
||||||
|
|
||||||
|
- hosts: localhost
|
||||||
|
tasks:
|
||||||
|
- name: Return log URL to Zuul
|
||||||
|
zuul_return:
|
||||||
|
data:
|
||||||
|
zuul:
|
||||||
|
log_url: "http://logs.openstack.org/{{ log_path }}"
|
3
playbooks/base-test/post-ssh.yaml
Normal file
3
playbooks/base-test/post-ssh.yaml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
- hosts: all
|
||||||
|
roles:
|
||||||
|
- remove-build-sshkey
|
@ -1,2 +0,0 @@
|
|||||||
- hosts: all
|
|
||||||
roles: []
|
|
@ -1,2 +1,8 @@
|
|||||||
- hosts: all
|
- hosts: all
|
||||||
roles: []
|
roles:
|
||||||
|
- add-build-sshkey
|
||||||
|
- prepare-workspace
|
||||||
|
- role: validate-host
|
||||||
|
# TODO(mordred) When we have site-local variables, these should go there
|
||||||
|
zuul_traceroute_host: git.openstack.org
|
||||||
|
zuul_image_manifest: /etc/dib-builddate.txt
|
||||||
|
11
zuul.yaml
11
zuul.yaml
@ -54,9 +54,16 @@
|
|||||||
description: |
|
description: |
|
||||||
A job to test changes to the base job without disturbing the
|
A job to test changes to the base job without disturbing the
|
||||||
main job in production. Not for general use.
|
main job in production. Not for general use.
|
||||||
parent: base
|
|
||||||
pre-run: playbooks/base-test/pre
|
pre-run: playbooks/base-test/pre
|
||||||
post-run: playbooks/base-test/post
|
post-run:
|
||||||
|
- playbooks/base-test/post-ssh
|
||||||
|
- playbooks/base-test/post-logs
|
||||||
|
roles:
|
||||||
|
- zuul: openstack-infra/zuul-jobs
|
||||||
|
timeout: 1800
|
||||||
|
nodes:
|
||||||
|
- name: ubuntu-xenial
|
||||||
|
label: ubuntu-xenial
|
||||||
|
|
||||||
- project:
|
- project:
|
||||||
name: openstack-infra/zuul-jobs
|
name: openstack-infra/zuul-jobs
|
||||||
|
Loading…
Reference in New Issue
Block a user