Clean up image build script.
With the dependent changes, we no longer attempt to use a local webserver to hand off newly created manila service images. So simplify this script to remove the branch that sets up this local webserver. Depends-on: https://review.openstack.org/#/c/623551/ Depends-on: https://review.openstack.org/#/c/623330 Change-Id: I5795928d6de64ea6602141f494252d7b75fdfbe9
This commit is contained in:
parent
f0fbd9e365
commit
3d78b1e2a7
@ -1,12 +1,9 @@
|
|||||||
#!/bin/bash -xe
|
#!/bin/bash -xe
|
||||||
|
|
||||||
# 1 - First argument is expected to be type of image - either 'generic' or
|
# Argument is expected to be type of image - either 'generic' or
|
||||||
# 'docker'.
|
# 'docker'.
|
||||||
# 2 - Second argument is expected to be boolean value that defines whether we
|
|
||||||
# should put newly built image to local webserver or not.
|
|
||||||
|
|
||||||
IMAGE=$1
|
IMAGE=$1
|
||||||
PUT_IMAGE_TO_LOCAL_WEBSERVER=${2:-"False"}
|
|
||||||
|
|
||||||
if [[ "$IMAGE" == "generic"* ]]; then
|
if [[ "$IMAGE" == "generic"* ]]; then
|
||||||
tox -v -e buildimage
|
tox -v -e buildimage
|
||||||
@ -16,14 +13,4 @@ elif [[ "$IMAGE" == @(docker|container)* ]]; then
|
|||||||
image_name="manila-docker-container.tar.gz"
|
image_name="manila-docker-container.tar.gz"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $PUT_IMAGE_TO_LOCAL_WEBSERVER != [Ff][Aa][Ll][Ss][Ee] ]]; then
|
|
||||||
source_path="$(pwd)/$image_name"
|
|
||||||
destination_dir="/var/www/public_html"
|
|
||||||
destination_path="$destination_dir/$image_name"
|
|
||||||
sudo mkdir -p $destination_dir
|
|
||||||
sudo ln -s $source_path $destination_path
|
|
||||||
echo "Image with name '$image_name' is available now at \
|
|
||||||
http://localhost:80/public_html/$image_name"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo $image_name > ./IMAGE_NAME
|
echo $image_name > ./IMAGE_NAME
|
||||||
|
Loading…
x
Reference in New Issue
Block a user