summaryrefslogtreecommitdiff
path: root/playbooks/legacy/ironic-dsvm-standalone/run.yaml
blob: d54e0c2e9bd624425bb8dd8a5f6694cee11ef4d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
- hosts: all
  name: Autoconverted job legacy-ironic-dsvm-standalone from old job gate-ironic-dsvm-standalone-ubuntu-xenial
  tasks:

    - name: Ensure legacy 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 \
              https://git.openstack.org \
              openstack-infra/devstack-gate
        executable: /bin/bash
        chdir: '{{ ansible_user_dir }}/workspace'
      environment: '{{ zuul | zuul_legacy_vars }}'

    - shell:
        cmd: |
          cat << 'EOF' >> ironic-vars-early
            # use tempest plugin
            export DEVSTACK_LOCAL_CONFIG+=$'\n'"TEMPEST_PLUGINS+=' /opt/stack/new/ironic-tempest-plugin'"
            export TEMPEST_CONCURRENCY=4
          EOF
        chdir: '{{ ansible_user_dir }}/workspace'
      environment: '{{ zuul | zuul_legacy_vars }}'

    - shell:
        cmd: |
          cat << 'EOF' >> ironic-extra-vars
            export DEVSTACK_GATE_TEMPEST_REGEX="ironic_standalone"

          EOF
        chdir: '{{ ansible_user_dir }}/workspace'
      environment: '{{ zuul | zuul_legacy_vars }}'

    - shell:
        cmd: |
          set -e
          set -x
          export PROJECTS="openstack/ironic $PROJECTS"
          export PROJECTS="openstack/ironic-lib $PROJECTS"
          export PROJECTS="openstack/ironic-python-agent $PROJECTS"
          export PROJECTS="openstack/ironic-tempest-plugin $PROJECTS"
          export PROJECTS="openstack/python-ironicclient $PROJECTS"
          export PYTHONUNBUFFERED=true
          export DEVSTACK_GATE_TEMPEST=1
          export DEVSTACK_GATE_IRONIC=1
          export DEVSTACK_GATE_NEUTRON=1
          export DEVSTACK_GATE_IRONIC_BUILD_RAMDISK=0
          export DEVSTACK_GATE_VIRT_DRIVER=ironic
          export DEVSTACK_GATE_IRONIC_DRIVER=ipmi
          export OVERRIDE_ENABLED_SERVICES="g-api,g-reg,q-agt,q-dhcp,q-l3,q-svc,key,mysql,rabbit,ir-api,ir-cond,s-account,s-container,s-object,s-proxy,tempest"

          export BRANCH_OVERRIDE="{{ zuul.override_checkout | default('default') }}"
          if [ "$BRANCH_OVERRIDE" != "default" ] ; then
              export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE
          fi

          export DEVSTACK_LOCAL_CONFIG="enable_plugin ironic https://git.openstack.org/openstack/ironic"
          export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_COUNT=6"
          export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_DEPLOY_DRIVER=ipmi"
          export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_DEFAULT_DEPLOY_INTERFACE=direct"
          export DEVSTACK_LOCAL_CONFIG+=$'\n'"SWIFT_ENABLE_TEMPURLS=True"
          export DEVSTACK_LOCAL_CONFIG+=$'\n'"SWIFT_TEMPURL_KEY=secretkey"
          # keep classic drivers enabled here until we remove them, as
          # standalone tests cover both types of drivers.
          export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_ENABLED_DRIVERS=fake,agent_ipmitool,pxe_ipmitool"
          export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_AUTOMATED_CLEAN_ENABLED=False"
          export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_USE_MOD_WSGI=True"

          # NOTE(pas-ha) ansible deploy is new in Queens,
          # and this job does not exist in Newton/Ocata.
          # Do not enable ansible deploy for Pike so that stable/pike job on
          # branch-less ironic-tempest-plugin passes using zuul.override_checkout.
          if [[ "$ZUUL_BRANCH" != "stable/pike" && "$BRANCH_OVERRIDE" != "stable/pike" ]]; then
            export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_ENABLED_DEPLOY_INTERFACES=iscsi,direct,ansible"
          fi

          # Ensure the ironic-vars-EARLY file exists
          touch ironic-vars-early
          # Pull in the EARLY variables injected by the optional builders
          source ironic-vars-early

          # Ensure the ironic-EXTRA-vars file exists
          touch ironic-extra-vars
          # Pull in the EXTRA variables injected by the optional builders
          source ironic-extra-vars

          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 }}'