[ agent ] [ agent ] - agent bootup optimize - 2
This commit is contained in:
1
.github/workflows/build-push-docker.yml
vendored
1
.github/workflows/build-push-docker.yml
vendored
@@ -131,6 +131,7 @@ jobs:
|
|||||||
echo "start to change timezone to Asia/Shanghai"
|
echo "start to change timezone to Asia/Shanghai"
|
||||||
timedatectl set-timezone Asia/Shanghai && timedatectl set-ntp true
|
timedatectl set-timezone Asia/Shanghai && timedatectl set-ntp true
|
||||||
echo "current time is $(date --rfc-3339=seconds | cut -d"+" -f1 | sed "s/ /-/g" | sed "s/:/-/g")"
|
echo "current time is $(date --rfc-3339=seconds | cut -d"+" -f1 | sed "s/ /-/g" | sed "s/:/-/g")"
|
||||||
|
echo "current time is $(date)"
|
||||||
echo "start to copy target jar"
|
echo "start to copy target jar"
|
||||||
cp ./agent-*.jar ./octopus-agent-$(date --rfc-3339=seconds | cut -d"+" -f1 | sed "s/ /-/g" | sed "s/:/-/g").jar
|
cp ./agent-*.jar ./octopus-agent-$(date --rfc-3339=seconds | cut -d"+" -f1 | sed "s/ /-/g" | sed "s/:/-/g").jar
|
||||||
cd /home/runner/work/ProjectOctopus/ProjectOctopus
|
cd /home/runner/work/ProjectOctopus/ProjectOctopus
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ public class CommandExecutor {
|
|||||||
// start to send the result log
|
// start to send the result log
|
||||||
streamSender.startToWaitLog(streamKey);
|
streamSender.startToWaitLog(streamKey);
|
||||||
|
|
||||||
|
// todo this will stuck the process and rabbitmq message will reentry the queue
|
||||||
// get the command result must also be a timeout smaller than the process
|
// get the command result must also be a timeout smaller than the process
|
||||||
boolean waitFor = process.waitFor(50, TimeUnit.SECONDS);
|
boolean waitFor = process.waitFor(50, TimeUnit.SECONDS);
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ CheckAndDownloadLatestVersion
|
|||||||
if [[ ! -f /octopus-agent/shell/agent-restart.sh ]]; then
|
if [[ ! -f /octopus-agent/shell/agent-restart.sh ]]; then
|
||||||
warn "agent-bootup.sh not exist! start to download !"
|
warn "agent-bootup.sh not exist! start to download !"
|
||||||
cd /octopus-agent/shell
|
cd /octopus-agent/shell
|
||||||
wget $RepoSourcePath/agent-restart.sh
|
wget -q $RepoSourcePath/agent-restart.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user