forked from bigbluebutton/greenlight
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added helper scripts * Added commit tag to version tag to builds from master * Restored script for Travis * Restored script for Jenkins * Restored script for Jenkins * Restored script for Jenkins
- Loading branch information
Showing
6 changed files
with
50 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,7 @@ vendor/bundle | |
|
||
# Ignore environment configuration. | ||
.env | ||
env | ||
|
||
# IDEs | ||
.idea | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Helpers | ||
|
||
## Running automatic updates | ||
|
||
``` | ||
sudo ln -s /root/greenlight/scripts/deploy.sh /usr/local/bin/greenlight-deploy | ||
sudo cp /root/greenlight/scripts/greenlight-auto-deployer.service /etc/systemd/system/greenlight-auto-deployer.service | ||
sudo cp /root/greenlight/scripts/greenlight-auto-deployer.timer /etc/systemd/system/greenlight-auto-deployer.timer | ||
sudo systemctl daemon-reload | ||
sudo systemctl enable greenlight-auto-deployer.service | ||
sudo systemctl enable greenlight-auto-deployer.timer | ||
sudo systemctl start greenlight-auto-deployer.timer | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
STATUS="Status: Downloaded newer image for bigbluebutton/greenlight:v2" | ||
|
||
new_status=$(sudo docker pull bigbluebutton/greenlight:v2 | grep Status:) | ||
|
||
echo $new_status | ||
|
||
if [ "$STATUS" == "$new_status" ] | ||
then | ||
cd /home/ubuntu/greenlight | ||
sudo docker-compose down | ||
sudo docker rmi $(sudo docker images -f dangling=true -q) | ||
sudo docker-compose up -d | ||
fi | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[Unit] | ||
Description=Greenlight Auto Deployer | ||
|
||
[Service] | ||
ExecStart=/bin/bash /usr/local/bin/greenlight-deploy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[Unit] | ||
Description=Runs greenlight-deploy every minute | ||
|
||
[Timer] | ||
# Time to wait after booting before we run first time | ||
OnBootSec=1min | ||
# Time between running each consecutive time | ||
OnUnitActiveSec=1m | ||
Unit=greenlight-auto-deployer.service | ||
|
||
[Install] | ||
WantedBy=multi-user.target |