The script gate_hook.sh was removed at Zun side [1] as part of the effort for migrating to zuul v3 native job. However, zunclient still need this script and the removal causes the failure of the CI. This patch re-introduce the script at zunclient as a temporary fix. The long-term fix is to migrate the job to zuul v3 native as well. [1] https://review.openstack.org/#/c/512209/ Change-Id: I93a4ec8804e74e17c478f2ee2ecf9b3402fcbd3f
		
			
				
	
	
		
			77 lines
		
	
	
		
			2.4 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			77 lines
		
	
	
		
			2.4 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
- hosts: all
 | 
						|
  name: Job zunclient-devstack-docker-sql
 | 
						|
  tasks:
 | 
						|
 | 
						|
    - name: Ensure workspace directory
 | 
						|
      file:
 | 
						|
        path: '{{ ansible_user_dir }}/workspace'
 | 
						|
        state: directory
 | 
						|
 | 
						|
    - 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 zun git://git.openstack.org/openstack/zun
 | 
						|
 | 
						|
          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_TEMPEST=0
 | 
						|
          export DEVSTACK_GATE_NEUTRON=1
 | 
						|
 | 
						|
          # Enable tempest for tempest plugin
 | 
						|
          export ENABLED_SERVICES=tempest
 | 
						|
 | 
						|
          export PROJECTS="openstack/zun $PROJECTS"
 | 
						|
          export PROJECTS="openstack/python-zunclient $PROJECTS"
 | 
						|
          export PROJECTS="openstack/kuryr-libnetwork $PROJECTS"
 | 
						|
          export PROJECTS="openstack/devstack-plugin-container $PROJECTS"
 | 
						|
          export PROJECTS="openstack/zun-tempest-plugin $PROJECTS"
 | 
						|
 | 
						|
          # Keep localrc to be able to set some vars in post_test_hook
 | 
						|
          export KEEP_LOCALRC=1
 | 
						|
 | 
						|
          function gate_hook {
 | 
						|
              cd /opt/stack/new/python-zunclient/
 | 
						|
              ./zunclient/tests/functional/hooks/gate_hook.sh docker sql
 | 
						|
          }
 | 
						|
          export -f gate_hook
 | 
						|
 | 
						|
          function post_test_hook {
 | 
						|
              source $BASE/new/devstack/accrc/admin/admin
 | 
						|
              cd /opt/stack/new/python-zunclient/
 | 
						|
              ./zunclient/tests/functional/hooks/post_test_hook.sh docker
 | 
						|
          }
 | 
						|
          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 }}'
 |