forked from microsoft/PartsUnlimitedMRP
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathupload2blob.sh
62 lines (57 loc) · 2.23 KB
/
upload2blob.sh
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
while [[ ${1} ]]
do
case "${1}" in
-a|--storage-account)
STORAGEACCOUNT="$2"
shift # past argument
;;
-k|--storage-key)
STORAGEKEY="$2"
shift # past argument
;;
-d|--drop-folder)
DROPFOLDER="$2"
shift # past argument
;;
-s|--sources-folder)
SOURCESFOLDER="$2"
shift # past argument
;;
-c|--container)
CONTAINER="$2"
shift # past argument
;;
-p|--tomcatpwd)
TOMPWD="$2"
shift # past argument
;;
-m|--virtual-machine)
VIRTUALMACHINE="$2"
shift # past argument
;;
*)
#unknown option
;;
esac
shift #past argument or value
done
echo STORAGE ACCOUNT = "${STORAGEACCOUNT}"
echo STORAGE KEY = "${STORAGEKEY}"
echo CONTAINER = "${CONTAINER}"
echo DROP FOLDER = "${DROPFOLDER}"
echo SOURCES FOLDER = "${SOURCESFOLDER}"
echo VIRTUAL MACHINE = "${VIRTUALMACHINE}"
#echo PWD = "${TOMPWD}"
# Delete previous blobs Usage: storage blob delete [options] [container] [blob]
#azure storage blob delete -q -a "${STORAGEACCOUNT}" -k "${STORAGEKEY}" "${CONTAINER}" "integration-service-0.1.0.jar"
#azure storage blob delete -q -a "${STORAGEACCOUNT}" -k "${STORAGEKEY}" "${CONTAINER}" "ordering-service-0.1.0.jar"
#azure storage blob delete -q -a "${STORAGEACCOUNT}" -k "${STORAGEKEY}" "${CONTAINER}" "mrp.war"
#azure storage blob delete -q -a "${STORAGEACCOUNT}" -k "${STORAGEKEY}" "${CONTAINER}" "MongoRecords.js"
#azure storage blob delete -q -a "${STORAGEACCOUNT}" -k "${STORAGEKEY}" "${CONTAINER}" "Install-MRP-app.sh"
#echo "Deleted prior artifact version from " "${CONTAINER}"
# Upload necessary files to blob storage
azure storage blob upload -q -a "${STORAGEACCOUNT}" -k "${STORAGEKEY}" "${DROPFOLDER}/drop/Backend/IntegrationService/build/libs/integration-service-0.1.0.jar" "${CONTAINER}"
azure storage blob upload -q -a "${STORAGEACCOUNT}" -k "${STORAGEKEY}" "${DROPFOLDER}/drop/Backend/OrderService/build/libs/ordering-service-0.1.0.jar" "${CONTAINER}"
azure storage blob upload -q -a "${STORAGEACCOUNT}" -k "${STORAGEKEY}" "${DROPFOLDER}/drop/Clients/build/libs/mrp.war" "${CONTAINER}"
azure storage blob upload -q -a "${STORAGEACCOUNT}" -k "${STORAGEKEY}" "${SOURCESFOLDER}/deploy/MongoRecords.js" "${CONTAINER}"
azure storage blob upload -q -a "${STORAGEACCOUNT}" -k "${STORAGEKEY}" "${SOURCESFOLDER}/deploy/Install-MRP-app.sh" "${CONTAINER}"