You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
952 B
33 lines
952 B
|
3 years ago
|
#!/bin/bash
|
||
|
|
log_file=/data/apps/jenkins/shells/deploywwwlog.log
|
||
|
|
#sh /data/apps/jenkins/shells/deploy_hly_www.sh $JOB_BASE_NAME $BUILD_NUMBER $JOB_BASE_NAME $profile $JOB_NAME
|
||
|
|
echo $1 >>$log_file
|
||
|
|
echo $5 >>$log_file
|
||
|
|
|
||
|
|
target=$1
|
||
|
|
deployFile=''
|
||
|
|
profile=$4
|
||
|
|
|
||
|
|
cd /data/apps/jenkins/workspace/workspace/$5/
|
||
|
|
rm -rf $target-release.tar.gz;
|
||
|
|
mv dist $target
|
||
|
|
tar -zcvf $target-release.tar.gz ./$target
|
||
|
|
deployFile=/data/apps/jenkins/workspace/workspace/$5/$target-release.tar.gz
|
||
|
|
|
||
|
|
echo "deployFile:$deployFile target:$target profile:$profile"
|
||
|
|
|
||
|
|
if [ "$profile" == "test" ];then
|
||
|
|
cp $deployFile /data/deploy/hltestweb/
|
||
|
|
sh /data/deploy/bin/$profile/deployweb.sh $target
|
||
|
|
#ssh webadmin@172.29.231.40 "sh /data/deploy/bin/$profile/deployweb.sh $target"
|
||
|
|
fi
|
||
|
|
|
||
|
|
if [ "$profile" == "pro" ];then
|
||
|
|
echo "deployFile:$deployFile"
|
||
|
|
scp $deployFile webadmin@116.62.238.73:/data/deploy_files/webapp
|
||
|
|
|
||
|
|
ssh webadmin@116.62.238.73 "sh /data/deploy_files/bin/copyweb.sh $target"
|
||
|
|
fi
|
||
|
|
|
||
|
|
|