[ CI ] 更新CI流程
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
# 完整的更新Octopus Agent
|
||||
# 删除旧的Agent,
|
||||
@@ -8,8 +8,8 @@
|
||||
|
||||
RepoSourcePath=https://raw.githubusercontent.com/zeaslity/ProjectOctopus/main/source/src/main/java/io/wdd/source/shell
|
||||
|
||||
|
||||
CheckAndDownloadLatestVersion
|
||||
# 更新下载所有的内容
|
||||
DownloadAllFile
|
||||
|
||||
if [[ ! -f /octopus-agent/shell/agent-restart.sh ]]; then
|
||||
warn "agent-bootup.sh not exist! start to download !"
|
||||
|
||||
@@ -3,6 +3,15 @@
|
||||
. /octopus-agent/shell/lib/wdd-lib-log.sh
|
||||
|
||||
OctopusAgentUrl=https://happybirthday.107421.xyz/octopus-agent/
|
||||
OctopusAgentPath=/octopus-agent/shell
|
||||
|
||||
DependLibFiles=(
|
||||
wdd-lib-file.sh
|
||||
wdd-lib-log.sh
|
||||
wdd-lib-os.sh
|
||||
wdd-lib-env.sh
|
||||
wdd-lib-sys.sh
|
||||
)
|
||||
|
||||
CheckAndDownloadLatestVersion() {
|
||||
|
||||
@@ -25,3 +34,47 @@ CheckAndDownloadLatestVersion() {
|
||||
log "----------------------------------------------"
|
||||
|
||||
}
|
||||
|
||||
#######################################
|
||||
# description
|
||||
# Globals:
|
||||
# BLUE
|
||||
# DependLibFiles
|
||||
# OctopusAgentPath
|
||||
# RED
|
||||
# RepoSourcePath
|
||||
# libfile
|
||||
# Arguments:
|
||||
# None
|
||||
#######################################
|
||||
DownloadAllFile() {
|
||||
|
||||
FunctionStart
|
||||
|
||||
warn "[CLEAN_UP] clean the old octopus agent staff !"
|
||||
rm -rf $OctopusAgentPath/lib
|
||||
rm -rf $OctopusAgentPath/
|
||||
|
||||
mkdir -p $OctopusAgentPath
|
||||
mkdir -p $OctopusAgentPath/lib
|
||||
|
||||
echo "start to download all needed lib shell"
|
||||
for libfile in ${DependLibFiles[*]}; do
|
||||
|
||||
log "lib file is $libfile"
|
||||
wget "$RepoSourcePath/lib/$libfile" -qO $OctopusAgentPath/lib/$libfile
|
||||
FunctionSuccess
|
||||
|
||||
done
|
||||
|
||||
colorEcho $BLUE "start to download octopus agent !"
|
||||
|
||||
# check for latest version
|
||||
# download the lasted jar
|
||||
cd $OctopusAgentPath
|
||||
CheckAndDownloadLatestVersion
|
||||
|
||||
FunctionSuccess
|
||||
FunctionEnd
|
||||
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ wget https://raw.githubusercontent.com/zeaslity/ProjectOctopus/main/source/src/m
|
||||
|
||||
|
||||
echo "y
|
||||
" | gcloud compute instances delete tokyo-amd64-07 --project=compact-lacing-371804 --zone=asia-northeast1-b
|
||||
" | gcloud compute instances delete tokyo-amd64-13 --project=compact-lacing-371804 --zone=asia-northeast1-b
|
||||
|
||||
|
||||
apt-cache madison openjdk-11-jdk | head -n 1 | awk '{print$3}'
|
||||
|
||||
Reference in New Issue
Block a user