From 2e5b6d78f0135f7c056f10c2f725970da2079f43 Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Thu, 29 Nov 2018 14:34:23 +0800 Subject: [PATCH] Use new stack macros from global-jjb csit-1node Consolidate our stack scripts to using the one provided by global-jjb. Issue: https://jira.linuxfoundation.org/browse/RELENG-238 Change-Id: Ifc57aac3c30c20af6e10a9f91a68ac17080931c0 Signed-off-by: Thanh Ha --- jjb/integration/integration-macros-heat.yaml | 51 +++++++++++++ jjb/integration/integration-templates.yaml | 77 +++++++++++++++----- 2 files changed, 111 insertions(+), 17 deletions(-) create mode 100644 jjb/integration/integration-macros-heat.yaml diff --git a/jjb/integration/integration-macros-heat.yaml b/jjb/integration/integration-macros-heat.yaml new file mode 100644 index 000000000..7a4f56cc3 --- /dev/null +++ b/jjb/integration/integration-macros-heat.yaml @@ -0,0 +1,51 @@ +--- +################ +# Stack 2 Type # +################ + +# The parameter and builder macros are meant to be used together. Job templates +# that want to use the Stack 2 Type must declare both the parameter and builder +# component. + +- parameter: + name: integration-stack-2-type + parameters: + - string: + name: VM_0_COUNT + default: '{vm_0_count}' + description: 'Number of systems to spawn for vm 0' + - string: + name: VM_0_FLAVOR + default: '{vm_0_flavor}' + description: 'VM flavor to use for vm 0' + - string: + name: VM_0_IMAGE + default: '{vm_0_image}' + description: 'VM image to use for vm 0' + - string: + name: VM_1_COUNT + default: '{vm_1_count}' + description: 'Number of systems to spawn for vm 1' + - string: + name: VM_1_FLAVOR + default: '{vm_1_flavor}' + description: 'VM flavor to use for vm 1' + - string: + name: VM_1_IMAGE + default: '{vm_1_image}' + description: 'VM image to use for vm 1' + +- builder: + name: integration-stack-2-type + builders: + - lf-stack-create: + openstack-cloud: '{openstack-cloud}' + openstack-heat-template: '{openstack-heat-template}' + openstack-heat-template-dir: '{openstack-heat-template-dir}' + openstack-heat-parameters: | + vm_0_count: '$VM_0_COUNT' + vm_0_flavor: '$VM_0_FLAVOR' + vm_0_image: '$VM_0_IMAGE' + vm_1_count: '$VM_1_COUNT' + vm_1_flavor: '$VM_1_FLAVOR' + vm_1_image: '$VM_1_IMAGE' diff --git a/jjb/integration/integration-templates.yaml b/jjb/integration/integration-templates.yaml index 6a54a6713..d776771b3 100644 --- a/jjb/integration/integration-templates.yaml +++ b/jjb/integration/integration-templates.yaml @@ -69,6 +69,24 @@ id: inttest-csit-verify-1node <<: *inttest_csit_common + ##################### + # Default variables # + ##################### + + openstack-cloud: vex + openstack-heat-template: csit-2-instance-type.yaml + openstack-heat-template-dir: openstack-hot + + odl_system_flavor: 'odl-highcpu-4' + odl_system_image: 'ZZCI - CentOS 7 - builder - x86_64 - 20181010-215635.956' + tools_system_count: 1 + tools_system_flavor: 'odl-highcpu-2' + tools_system_image: 'ZZCI - Ubuntu 16.04 - mininet-ovs-25 - 20181029-223449.514' + + ##################### + # Job configuration # + ##################### + parameters: - integration-csit-parameters: archive-artifacts: '{archive-artifacts}' @@ -83,6 +101,13 @@ debug-map: '{debug-map}' install-features: '{install-features}' use-features-boot: 'True' + - integration-stack-2-type: + vm_0_count: 1 + vm_0_flavor: '{odl_system_flavor}' + vm_0_image: '{odl_system_image}' + vm_1_count: '{tools_system_count}' + vm_1_flavor: '{tools_system_flavor}' + vm_1_image: '{tools_system_image}' - integration-distribution-branch: branch: '{verify-branch}' - integration-distribution-stream: @@ -115,14 +140,10 @@ builders: - lf-infra-pre-build - - integration-infra-stack: - stack-template: '{stack-template}' - vm_0_count: '1' - vm_0_flavor: '{odl_system_flavor}' - vm_0_image: '{odl_system_image}' - vm_1_count: '{tools_system_count}' - vm_1_flavor: '{tools_system_flavor}' - vm_1_image: '{tools_system_image}' + - integration-stack-2-type: + openstack-cloud: '{openstack-cloud}' + openstack-heat-template: '{openstack-heat-template}' + openstack-heat-template-dir: '{openstack-heat-template-dir}' - integration-install-robotframework - inject: properties-file: 'env.properties' @@ -142,6 +163,8 @@ robot_other_files: '' robot-pass-threshold: 100.0 robot-unstable-threshold: 0.0 + - lf-stack-delete: + openstack-cloud: '{openstack-cloud}' - lf-infra-publish @@ -156,7 +179,15 @@ # Default variables # ##################### - # TODO: Add default variables here. + openstack-cloud: vex + openstack-heat-template: csit-2-instance-type.yaml + openstack-heat-template-dir: openstack-hot + + odl_system_flavor: 'odl-highcpu-4' + odl_system_image: 'ZZCI - CentOS 7 - builder - x86_64 - 20181010-215635.956' + tools_system_count: 1 + tools_system_flavor: 'odl-highcpu-2' + tools_system_image: 'ZZCI - Ubuntu 16.04 - mininet-ovs-25 - 20181029-223449.514' ##################### # Job configuration # @@ -176,6 +207,13 @@ debug-map: '{debug-map}' install-features: '{install-features}' use-features-boot: 'True' + - integration-stack-2-type: + vm_0_count: 1 + vm_0_flavor: '{odl_system_flavor}' + vm_0_image: '{odl_system_image}' + vm_1_count: '{tools_system_count}' + vm_1_flavor: '{tools_system_flavor}' + vm_1_image: '{tools_system_image}' - integration-distribution-branch: branch: '{branch}' - integration-distribution-stream: @@ -210,14 +248,10 @@ builders: - lf-infra-pre-build - - integration-infra-stack: - stack-template: '{stack-template}' - vm_0_count: '1' - vm_0_flavor: '{odl_system_flavor}' - vm_0_image: '{odl_system_image}' - vm_1_count: '{tools_system_count}' - vm_1_flavor: '{tools_system_flavor}' - vm_1_image: '{tools_system_image}' + - integration-stack-2-type: + openstack-cloud: '{openstack-cloud}' + openstack-heat-template: '{openstack-heat-template}' + openstack-heat-template-dir: '{openstack-heat-template-dir}' - integration-install-robotframework - inject: properties-file: 'env.properties' @@ -378,6 +412,8 @@ robot_other_files: '' robot-pass-threshold: 100.0 robot-unstable-threshold: 0.0 + - lf-stack-delete: + openstack-cloud: '{openstack-cloud}' - lf-infra-publish - job-template: @@ -408,6 +444,13 @@ debug-map: '{debug-map}' install-features: '{install-features}' use-features-boot: 'True' + - integration-stack-2-type: + vm_0_count: 1 + vm_0_flavor: '{odl_system_flavor}' + vm_0_image: '{odl_system_image}' + vm_1_count: '{tools_system_count}' + vm_1_flavor: '{tools_system_flavor}' + vm_1_image: '{tools_system_image}' - integration-distribution-branch: branch: '{branch}' - integration-distribution-stream: -- 2.36.6