Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b353572ea6 | |||
| fa6dd0fa95 |
+1
-1
@@ -1 +1 @@
|
|||||||
1.0.8
|
1.1.1
|
||||||
|
|||||||
@@ -19,8 +19,17 @@ is_container_running() {
|
|||||||
|
|
||||||
|
|
||||||
if [ -z ${date_to_load} ] ; then
|
if [ -z ${date_to_load} ] ; then
|
||||||
echo "Yesterday data has priority. Running historical container will be killed"
|
echo "Yesterday data has priority. Running historical container will be stopped"
|
||||||
docker kill ${ContainerName}
|
Cmd="docker stop ${ContainerName}"
|
||||||
|
echo ${Cmd} && eval ${Cmd}
|
||||||
|
|
||||||
|
Cmd="docker ps"
|
||||||
|
echo ${Cmd} && eval ${Cmd}
|
||||||
|
|
||||||
|
if is_container_running "$ContainerName"; then
|
||||||
|
echo "Container ${ContainerName} is still running."
|
||||||
|
exit 3
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "Historical run ${date_to_load}"
|
echo "Historical run ${date_to_load}"
|
||||||
if is_container_running "$ContainerName"; then
|
if is_container_running "$ContainerName"; then
|
||||||
|
|||||||
@@ -7,10 +7,6 @@ git_repo_arr[cvttpy]=git@cloud21.cvtt.vpn:/opt/store/git/cvttpy.git
|
|||||||
git_repo_arr[ops]=git@cloud21.cvtt.vpn:/opt/store/git/ops.git
|
git_repo_arr[ops]=git@cloud21.cvtt.vpn:/opt/store/git/ops.git
|
||||||
git_repo_arr[research]=git@cloud21.cvtt.vpn:/opt/store/git/research.git
|
git_repo_arr[research]=git@cloud21.cvtt.vpn:/opt/store/git/research.git
|
||||||
|
|
||||||
default_project=cvttpy
|
|
||||||
default_branch=master
|
|
||||||
|
|
||||||
|
|
||||||
dist_root=/home/cvttdist/software/cvtt2
|
dist_root=/home/cvttdist/software/cvtt2
|
||||||
dist_user=cvttdist
|
dist_user=cvttdist
|
||||||
dist_host="cloud21.cvtt.vpn"
|
dist_host="cloud21.cvtt.vpn"
|
||||||
@@ -21,11 +17,40 @@ dist_locations="cloud21.cvtt.vpn:22 homestore.cvtt.vpn:22"
|
|||||||
interactive=Y
|
interactive=Y
|
||||||
|
|
||||||
# cmdline
|
# cmdline
|
||||||
prj=${1:-${default_project}}
|
prj=
|
||||||
brnch=${2:-${default_branch}}
|
brnch=master
|
||||||
if [ "${3}" == "D" ]; then
|
interactive=N
|
||||||
interactive=N
|
|
||||||
fi
|
usage() {
|
||||||
|
echo "Usage: $0 -p <project> [-b <branch (master)> -i (interactive)"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
while getopts ":p:b:i" opt; do
|
||||||
|
case ${opt} in
|
||||||
|
p )
|
||||||
|
prj=$OPTARG
|
||||||
|
;;
|
||||||
|
b )
|
||||||
|
brnch=$OPTARG
|
||||||
|
;;
|
||||||
|
i )
|
||||||
|
interactive=Y
|
||||||
|
;;
|
||||||
|
\? )
|
||||||
|
echo "Invalid option: -$OPTARG" >&2
|
||||||
|
usage
|
||||||
|
;;
|
||||||
|
: )
|
||||||
|
echo "Option -$OPTARG requires an argument." >&2
|
||||||
|
usage
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function confirm {
|
function confirm {
|
||||||
if [ "${interactive}" == "Y" ]; then
|
if [ "${interactive}" == "Y" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user