CommunityBot/BuildRun: Difference between revisions Discussion View history

No edit summary
No edit summary
Line 1: Line 1:
== Restart Bot ==
== Restart Bot ==
== Update Bot ==


  $ whoami
  $ whoami
Line 10: Line 8:
  $ sudo supervisorctl status communitybot-discord
  $ sudo supervisorctl status communitybot-discord
  communitybot-discord            RUNNING  pid 32690, uptime 0:00:27
  communitybot-discord            RUNNING  pid 32690, uptime 0:00:27
== Update Bot ==


=== Stop Bot ===
=== Stop Bot ===

Revision as of 15:12, 10 October 2017

Restart Bot

$ whoami
[your user account with sudo privileges]
$ sudo supervisorctl restart communitybot-discord
communitybot-discord: stopped
communitybot-discord: started
$ sudo supervisorctl status communitybot-discord
communitybot-discord             RUNNING   pid 32690, uptime 0:00:27

Update Bot

Stop Bot

$ whoami
[your user account with sudo privileges]
$ sudo supervisorctl stop communitybot-discord
$ sudo supervisorctl status communitybot-discord
communitybot-discord             STOPPED   Sep 26 07:32 PM

Download New Code

$ sudo su communitybot
$ whoami
communitybot
$ cd ~/CommunityBot
$ pwd
/home/communitybot/CommunityBot
$ git pull
remote: Counting objects: 10, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 10 (delta 5), reused 5 (delta 0)
Unpacking objects: 100% (10/10), done.
From gitlab.com:SixbucksSolutions/CommunityBot
  4319f99..fea7bf8  master     -> origin/master
Updating 4319f99..fea7bf8
Fast-forward
 src/WazeBotDiscord/Modules/ReloadModule.cs   |   5 ++-
 src/WazeBotDiscord/Modules/ScriptsModule.cs  |  85 +++++++++++++++++++++++++++++++++++++++
 src/WazeBotDiscord/Program.cs                |   6 ++-
 src/WazeBotDiscord/Scripts/ScriptsService.cs | 147 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 241 insertions(+), 2 deletions(-)
create mode 100644 src/WazeBotDiscord/Modules/ScriptsModule.cs
create mode 100644 src/WazeBotDiscord/Scripts/ScriptsService.cs

Build New Release Code

$ cd src/WazeBotDiscord
$ pwd
/home/communitybot/CommunityBot/src/WazeBotDiscord
$ dotnet build -c Release
Microsoft (R) Build Engine version 15.3.409.57025 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
WazeBotDiscord -> /home/communitybot/CommunityBot/src/WazeBotDiscord/bin/Release/netcoreapp2.0/WazeBotDiscord.dll
Build succeeded.
   0 Warning(s)
   0 Error(s)
 Time Elapsed 00:00:02.66

Publish New Release Code

publish creates a standalone directory where the build can be run from

$ dotnet publish -c Release
Microsoft (R) Build Engine version 15.3.409.57025 for .NET Core 
Copyright (C) Microsoft Corporation. All rights reserved.
 WazeBotDiscord -> /home/communitybot/CommunityBot/src/WazeBotDiscord/bin/Release/netcoreapp2.0/WazeBotDiscord.dll
 WazeBotDiscord -> /home/communitybot/CommunityBot/src/WazeBotDiscord/bin/Release/netcoreapp2.0/publish/

Start Bot

$ exit
$ whoami
[your user account with sudo privileges]
$ sudo supervisorctl start communitybot-discord
$ sudo supervisorctl status communitybot-discord
communitybot-discord             RUNNING   pid 24621, uptime 0:00:04