Last active
December 27, 2015 23:59
-
-
Save imesh/7410184 to your computer and use it in GitHub Desktop.
Copy Apache Stratos (incubating) binary packages to a local dist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ----------------------------------------------------------------- | |
# Licensed to the Apache Software Foundation (ASF) under one | |
# or more contributor license agreements. See the NOTICE file | |
# distributed with this work for additional information | |
# regarding copyright ownership. The ASF licenses this file | |
# to you under the Apache License, Version 2.0 (the | |
# "License"); you may not use this file except in compliance | |
# with the License. You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, | |
# software distributed under the License is distributed on an | |
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
# KIND, either express or implied. See the License for the | |
# specific language governing permissions and limitations | |
# under the License. | |
# ----------------------------------------------------------------- | |
# Copy Apache Stratos (incubating) packages to a local dist | |
# ----------------------------------------------------------------- | |
set -e | |
source_path=/home/imesh/dev/apache/stratos/trunk/incubator-stratos | |
stratos_version=4.0.0-SNAPSHOT | |
dist_path=/home/imesh/dev/apache/dist/$stratos_version/ | |
cc_pack=apache-stratos-cc-$stratos_version.zip | |
cc_path=$source_path/products/cloud-controller/modules/distribution/target/$cc_pack | |
as_pack=apache-stratos-autoscaler-$stratos_version.zip | |
as_path=$source_path/products/autoscaler/modules/distribution/target/$as_pack | |
sc_pack=apache-stratos-sc-$stratos_version.zip | |
sc_path=$source_path/products/stratos-controller/modules/distribution/target/$sc_pack | |
lb_pack=apache-stratos-load-balancer-$stratos_version.zip | |
lb_path=$source_path/products/load-balancer/modules/distribution/target/$lb_pack | |
ca_pack=apache-stratos-cartridge-agent-$stratos_version-bin.zip | |
ca_path=$source_path/products/cartridge-agent/modules/distribution/target/$ca_pack | |
ha_pack=apache-stratos-haproxy-extension-$stratos_version-bin.zip | |
ha_path=$source_path/extensions/load-balancer/haproxy-extension/target/$ha_pack | |
echo "Validating package files" | |
if [ ! -f $cc_path ]; then | |
echo "Package not found: $cc_path" | |
fi | |
if [ ! -f $as_path ]; then | |
echo "Package not found: $as_path" | |
fi | |
if [ ! -f $sc_path ]; then | |
echo "Package not found: $sc_path" | |
fi | |
if [ ! -f $lb_path ]; then | |
echo "Package not found: $lb_path" | |
fi | |
if [ ! -f $ca_path ]; then | |
echo "Package not found: $ca_path" | |
fi | |
if [ ! -f $ha_path ]; then | |
echo "Package not found: $ha_path" | |
fi | |
echo "Validation succeeded" | |
echo "Copying cloud controller" | |
cp -fv $cc_path $dist_path | |
echo "Cloud controller copied" | |
echo "Copying autoscaler" | |
cp -fv $as_path $dist_path | |
echo "Autoscaler com" | |
echo "Copying stratos controller" | |
cp -fv $sc_path $dist_path | |
echo "Stratos controller copied" | |
echo "Copying load balancer" | |
cp -fv $lb_path $dist_path | |
echo "Load balancer copied" | |
echo "Copying cartridge agent" | |
cp -fv $ca_path $dist_path | |
echo "Cartridge agent copied" | |
echo "Copying ha-proxy extension" | |
cp -fv $ha_path $dist_path | |
echo "ha-proxy extension copied" | |
echo "All packages copied" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment