45 lines
1.6 KiB
XML
45 lines
1.6 KiB
XML
<?xml version='1.0' encoding='UTF-8'?>
|
|
<project>
|
|
<description>Deploy job - deploys Habit Bot to Ubuntu server</description>
|
|
<keepDependencies>false</keepDependencies>
|
|
<properties/>
|
|
<scm class="hudson.plugins.git.GitSCM">
|
|
<userRemoteConfigs>
|
|
<hudson.plugins.git.UserRemoteConfig>
|
|
<url>https://gittea.cloud-handson.com/joungmin/openclaw-workspace.git</url>
|
|
<credentialsId>gitea-credentials</credentialsId>
|
|
</hudson.plugins.git.UserRemoteConfig>
|
|
</userRemoteConfigs>
|
|
<branches>
|
|
<hudson.plugins.git.BranchSpec>
|
|
<name>*/main</name>
|
|
</hudson.plugins.git.BranchSpec>
|
|
</branches>
|
|
<doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
|
|
<submoduleCfg class="list"/>
|
|
<extensions/>
|
|
</scm>
|
|
<assignedNode>built-in</assignedNode>
|
|
<builders>
|
|
<hudson.tasks.Shell>
|
|
<command># Stop existing bot
|
|
ssh joungmin@192.168.0.147 "pkill -f habit_bot.py || true"
|
|
|
|
# Copy files
|
|
scp habit_bot.py requirements.txt joungmin@192.168.0.147:/home/joungmin/habit_bot/
|
|
|
|
# Install dependencies
|
|
ssh joungmin@192.168.0.147 "cd /home/joungmin/habit_bot && source venv/bin/activate && pip install -q -r requirements.txt"
|
|
|
|
# Restart bot
|
|
ssh joungmin@192.168.0.147 "cd /home/joungmin/habit_bot && source venv/bin/activate && TELEGRAM_BOT_TOKEN=8325588419:AAGghb0nosWG8g6QtYeghqUs0RHug06uG74 nohup python habit_bot.py > bot.log 2>&1 &"
|
|
|
|
# Verify
|
|
sleep 3
|
|
ssh joungmin@192.168.0.147 "ps aux | grep habit_bot | grep -v grep"</command>
|
|
</hudson.tasks.Shell>
|
|
</builders>
|
|
<publishers/>
|
|
<buildWrappers/>
|
|
</project>
|