diff --git a/contrib/ci/pre_test_hook.sh b/contrib/ci/pre_test_hook.sh index 688b31dbb4..0079897358 100755 --- a/contrib/ci/pre_test_hook.sh +++ b/contrib/ci/pre_test_hook.sh @@ -162,6 +162,10 @@ elif [[ "$DRIVER" == "container"* ]]; then fi echo "MANILA_SERVICE_IMAGE_ENABLED=$MANILA_SERVICE_IMAGE_ENABLED" >> $localconf +if [[ "$MANILA_SERVICE_IMAGE_ENABLED" == True ]]; then + echo "MANILA_SERVICE_IMAGE_URL=$MANILA_SERVICE_IMAGE_URL" >> $localconf + echo "MANILA_SERVICE_IMAGE_NAME=$MANILA_SERVICE_IMAGE_NAME" >> $localconf +fi echo "MANILA_DEFAULT_SHARE_TYPE_EXTRA_SPECS=$DEFAULT_EXTRA_SPECS" >> $localconf # Enabling isolated metadata in Neutron is required because diff --git a/playbooks/legacy/manila-tempest-dsvm-container-scenario-custom-image/run.yaml b/playbooks/legacy/manila-tempest-dsvm-container-scenario-custom-image/run.yaml index 7d5d7978da..07d5abf08c 100644 --- a/playbooks/legacy/manila-tempest-dsvm-container-scenario-custom-image/run.yaml +++ b/playbooks/legacy/manila-tempest-dsvm-container-scenario-custom-image/run.yaml @@ -47,29 +47,25 @@ export DEVSTACK_PROJECT_FROM_GIT="python-manilaclient" # Install manila-image-elements project for building custom image - if [[ container_with_custom_image == *"_with_custom_image" ]]; then - export PROJECTS="openstack/manila-image-elements $PROJECTS" - fi + export PROJECTS="openstack/manila-image-elements $PROJECTS" + export ENABLED_SERVICES=tempest # Keep localrc to be able to set some vars in pre_test_hook export KEEP_LOCALRC=1 function pre_test_hook { - # Build custom image if needed - if [[ container_with_custom_image == *"_with_custom_image" ]]; then - current_dir=$(pwd) + current_dir=$(pwd) - # Go to 'manila-image-elements' dir, build image and get its name - cd /opt/stack/new/manila-image-elements - ./tools/gate/build-images container_with_custom_image True - image_name=$(git ls-files --others --exclude-standard) - export MANILA_SERVICE_IMAGE_URL="http://localhost:80/public_html/$image_name" - export MANILA_SERVICE_IMAGE_NAME=$(basename -s .tar.gz $(basename -s .qcow2 $image_name)) + # Go to 'manila-image-elements' dir, build image and get its name + cd /opt/stack/new/manila-image-elements + ./tools/gate/build-images container_with_custom_image + image_name=$(cat ./IMAGE_NAME) + export MANILA_SERVICE_IMAGE_URL="file://$(pwd)/$image_name" + export MANILA_SERVICE_IMAGE_NAME=$(basename -s .tar.gz $(basename -s .qcow2 $image_name)) - # Return back to execution dir - cd $current_dir - fi + # Return back to execution dir + cd $current_dir # 'dhss' - acronym for 'Driver Handles Share Servers', # defines mode of a share driver. Boolean-like. diff --git a/playbooks/legacy/manila-tempest-dsvm-generic-no-share-servers/run.yaml b/playbooks/legacy/manila-tempest-dsvm-generic-no-share-servers/run.yaml index 28ec904550..302a21c76b 100644 --- a/playbooks/legacy/manila-tempest-dsvm-generic-no-share-servers/run.yaml +++ b/playbooks/legacy/manila-tempest-dsvm-generic-no-share-servers/run.yaml @@ -46,31 +46,12 @@ export DEVSTACK_GATE_POSTGRES=0 export DEVSTACK_PROJECT_FROM_GIT="python-manilaclient" - # Install manila-image-elements project for building custom image - if [[ generic == *"_with_custom_image" ]]; then - export PROJECTS="openstack/manila-image-elements $PROJECTS" - fi export ENABLED_SERVICES=tempest # Keep localrc to be able to set some vars in pre_test_hook export KEEP_LOCALRC=1 function pre_test_hook { - # Build custom image if needed - if [[ generic == *"_with_custom_image" ]]; then - current_dir=$(pwd) - - # Go to 'manila-image-elements' dir, build image and get its name - cd /opt/stack/new/manila-image-elements - ./tools/gate/build-images generic True - image_name=$(git ls-files --others --exclude-standard) - export MANILA_SERVICE_IMAGE_URL="http://localhost:80/public_html/$image_name" - export MANILA_SERVICE_IMAGE_NAME=$(basename -s .tar.gz $(basename -s .qcow2 $image_name)) - - # Return back to execution dir - cd $current_dir - fi - # 'dhss' - acronym for 'Driver Handles Share Servers', # defines mode of a share driver. Boolean-like. # 'driver' - codename of a share driver to configure. diff --git a/playbooks/legacy/manila-tempest-dsvm-generic-scenario-custom-image/run.yaml b/playbooks/legacy/manila-tempest-dsvm-generic-scenario-custom-image/run.yaml index daa49cee9a..a748c4ac0b 100644 --- a/playbooks/legacy/manila-tempest-dsvm-generic-scenario-custom-image/run.yaml +++ b/playbooks/legacy/manila-tempest-dsvm-generic-scenario-custom-image/run.yaml @@ -47,29 +47,25 @@ export DEVSTACK_PROJECT_FROM_GIT="python-manilaclient" # Install manila-image-elements project for building custom image - if [[ generic_with_custom_image == *"_with_custom_image" ]]; then - export PROJECTS="openstack/manila-image-elements $PROJECTS" - fi + export PROJECTS="openstack/manila-image-elements $PROJECTS" + export ENABLED_SERVICES=tempest # Keep localrc to be able to set some vars in pre_test_hook export KEEP_LOCALRC=1 function pre_test_hook { - # Build custom image if needed - if [[ generic_with_custom_image == *"_with_custom_image" ]]; then - current_dir=$(pwd) + current_dir=$(pwd) - # Go to 'manila-image-elements' dir, build image and get its name - cd /opt/stack/new/manila-image-elements - ./tools/gate/build-images generic_with_custom_image True - image_name=$(git ls-files --others --exclude-standard) - export MANILA_SERVICE_IMAGE_URL="http://localhost:80/public_html/$image_name" - export MANILA_SERVICE_IMAGE_NAME=$(basename -s .tar.gz $(basename -s .qcow2 $image_name)) + # Go to 'manila-image-elements' dir, build image and get its name + cd /opt/stack/new/manila-image-elements + ./tools/gate/build-images generic_with_custom_image + image_name=$(cat ./IMAGE_NAME) + export MANILA_SERVICE_IMAGE_URL="file://$(pwd)/$image_name" + export MANILA_SERVICE_IMAGE_NAME=$(basename -s .tar.gz $(basename -s .qcow2 $image_name)) - # Return back to execution dir - cd $current_dir - fi + # Return back to execution dir + cd $current_dir # 'dhss' - acronym for 'Driver Handles Share Servers', # defines mode of a share driver. Boolean-like. diff --git a/playbooks/legacy/manila-tempest-dsvm-mysql-generic/run.yaml b/playbooks/legacy/manila-tempest-dsvm-mysql-generic/run.yaml index 83de354dd7..a8c7acd6c8 100644 --- a/playbooks/legacy/manila-tempest-dsvm-mysql-generic/run.yaml +++ b/playbooks/legacy/manila-tempest-dsvm-mysql-generic/run.yaml @@ -45,31 +45,12 @@ export DEVSTACK_GATE_POSTGRES=0 export DEVSTACK_PROJECT_FROM_GIT="python-manilaclient" - # Install manila-image-elements project for building custom image - if [[ generic == *"_with_custom_image" ]]; then - export PROJECTS="openstack/manila-image-elements $PROJECTS" - fi export ENABLED_SERVICES=tempest # Keep localrc to be able to set some vars in pre_test_hook export KEEP_LOCALRC=1 function pre_test_hook { - # Build custom image if needed - if [[ generic == *"_with_custom_image" ]]; then - current_dir=$(pwd) - - # Go to 'manila-image-elements' dir, build image and get its name - cd /opt/stack/new/manila-image-elements - ./tools/gate/build-images generic True - image_name=$(git ls-files --others --exclude-standard) - export MANILA_SERVICE_IMAGE_URL="http://localhost:80/public_html/$image_name" - export MANILA_SERVICE_IMAGE_NAME=$(basename -s .tar.gz $(basename -s .qcow2 $image_name)) - - # Return back to execution dir - cd $current_dir - fi - # 'dhss' - acronym for 'Driver Handles Share Servers', # defines mode of a share driver. Boolean-like. # 'driver' - codename of a share driver to configure. diff --git a/playbooks/legacy/manila-tempest-dsvm-postgres-container/run.yaml b/playbooks/legacy/manila-tempest-dsvm-postgres-container/run.yaml index eba61e68d6..f12b7dfbe6 100644 --- a/playbooks/legacy/manila-tempest-dsvm-postgres-container/run.yaml +++ b/playbooks/legacy/manila-tempest-dsvm-postgres-container/run.yaml @@ -46,31 +46,12 @@ export DEVSTACK_GATE_POSTGRES=1 export DEVSTACK_PROJECT_FROM_GIT="python-manilaclient" - # Install manila-image-elements project for building custom image - if [[ container == *"_with_custom_image" ]]; then - export PROJECTS="openstack/manila-image-elements $PROJECTS" - fi export ENABLED_SERVICES=tempest # Keep localrc to be able to set some vars in pre_test_hook export KEEP_LOCALRC=1 function pre_test_hook { - # Build custom image if needed - if [[ container == *"_with_custom_image" ]]; then - current_dir=$(pwd) - - # Go to 'manila-image-elements' dir, build image and get its name - cd /opt/stack/new/manila-image-elements - ./tools/gate/build-images container True - image_name=$(git ls-files --others --exclude-standard) - export MANILA_SERVICE_IMAGE_URL="http://localhost:80/public_html/$image_name" - export MANILA_SERVICE_IMAGE_NAME=$(basename -s .tar.gz $(basename -s .qcow2 $image_name)) - - # Return back to execution dir - cd $current_dir - fi - # 'dhss' - acronym for 'Driver Handles Share Servers', # defines mode of a share driver. Boolean-like. # 'driver' - codename of a share driver to configure. diff --git a/playbooks/legacy/manila-tempest-dsvm-postgres-generic-singlebackend/run.yaml b/playbooks/legacy/manila-tempest-dsvm-postgres-generic-singlebackend/run.yaml index 9310e03fd3..676e745bec 100644 --- a/playbooks/legacy/manila-tempest-dsvm-postgres-generic-singlebackend/run.yaml +++ b/playbooks/legacy/manila-tempest-dsvm-postgres-generic-singlebackend/run.yaml @@ -46,31 +46,12 @@ export DEVSTACK_GATE_POSTGRES=1 export DEVSTACK_PROJECT_FROM_GIT="python-manilaclient" - # Install manila-image-elements project for building custom image - if [[ generic == *"_with_custom_image" ]]; then - export PROJECTS="openstack/manila-image-elements $PROJECTS" - fi export ENABLED_SERVICES=tempest # Keep localrc to be able to set some vars in pre_test_hook export KEEP_LOCALRC=1 function pre_test_hook { - # Build custom image if needed - if [[ generic == *"_with_custom_image" ]]; then - current_dir=$(pwd) - - # Go to 'manila-image-elements' dir, build image and get its name - cd /opt/stack/new/manila-image-elements - ./tools/gate/build-images generic True - image_name=$(git ls-files --others --exclude-standard) - export MANILA_SERVICE_IMAGE_URL="http://localhost:80/public_html/$image_name" - export MANILA_SERVICE_IMAGE_NAME=$(basename -s .tar.gz $(basename -s .qcow2 $image_name)) - - # Return back to execution dir - cd $current_dir - fi - # 'dhss' - acronym for 'Driver Handles Share Servers', # defines mode of a share driver. Boolean-like. # 'driver' - codename of a share driver to configure. diff --git a/playbooks/legacy/manila-tempest-dsvm-postgres-zfsonlinux/run.yaml b/playbooks/legacy/manila-tempest-dsvm-postgres-zfsonlinux/run.yaml index c9f6c12e26..bb4f051104 100644 --- a/playbooks/legacy/manila-tempest-dsvm-postgres-zfsonlinux/run.yaml +++ b/playbooks/legacy/manila-tempest-dsvm-postgres-zfsonlinux/run.yaml @@ -46,31 +46,12 @@ export DEVSTACK_GATE_POSTGRES=1 export DEVSTACK_PROJECT_FROM_GIT="python-manilaclient" - # Install manila-image-elements project for building custom image - if [[ zfsonlinux == *"_with_custom_image" ]]; then - export PROJECTS="openstack/manila-image-elements $PROJECTS" - fi export ENABLED_SERVICES=tempest # Keep localrc to be able to set some vars in pre_test_hook export KEEP_LOCALRC=1 function pre_test_hook { - # Build custom image if needed - if [[ zfsonlinux == *"_with_custom_image" ]]; then - current_dir=$(pwd) - - # Go to 'manila-image-elements' dir, build image and get its name - cd /opt/stack/new/manila-image-elements - ./tools/gate/build-images zfsonlinux True - image_name=$(git ls-files --others --exclude-standard) - export MANILA_SERVICE_IMAGE_URL="http://localhost:80/public_html/$image_name" - export MANILA_SERVICE_IMAGE_NAME=$(basename -s .tar.gz $(basename -s .qcow2 $image_name)) - - # Return back to execution dir - cd $current_dir - fi - # 'dhss' - acronym for 'Driver Handles Share Servers', # defines mode of a share driver. Boolean-like. # 'driver' - codename of a share driver to configure. diff --git a/playbooks/legacy/manila-tempest-dsvm-scenario/run.yaml b/playbooks/legacy/manila-tempest-dsvm-scenario/run.yaml index a54560e260..fc614bcf1b 100644 --- a/playbooks/legacy/manila-tempest-dsvm-scenario/run.yaml +++ b/playbooks/legacy/manila-tempest-dsvm-scenario/run.yaml @@ -45,31 +45,12 @@ export DEVSTACK_GATE_POSTGRES=0 export DEVSTACK_PROJECT_FROM_GIT="python-manilaclient" - # Install manila-image-elements project for building custom image - if [[ generic == *"_with_custom_image" ]]; then - export PROJECTS="openstack/manila-image-elements $PROJECTS" - fi export ENABLED_SERVICES=tempest # Keep localrc to be able to set some vars in pre_test_hook export KEEP_LOCALRC=1 function pre_test_hook { - # Build custom image if needed - if [[ generic == *"_with_custom_image" ]]; then - current_dir=$(pwd) - - # Go to 'manila-image-elements' dir, build image and get its name - cd /opt/stack/new/manila-image-elements - ./tools/gate/build-images generic True - image_name=$(git ls-files --others --exclude-standard) - export MANILA_SERVICE_IMAGE_URL="http://localhost:80/public_html/$image_name" - export MANILA_SERVICE_IMAGE_NAME=$(basename -s .tar.gz $(basename -s .qcow2 $image_name)) - - # Return back to execution dir - cd $current_dir - fi - # 'dhss' - acronym for 'Driver Handles Share Servers', # defines mode of a share driver. Boolean-like. # 'driver' - codename of a share driver to configure.