Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P54
(An Untitled Masterwork)
Active
Public
Actions
Authored by
stwalkerster
on Sep 27 2016, 11:16 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Tags
None
Referenced Files
F2373:
Sep 27 2016, 11:16 PM
2016-09-27 23:16:38 (UTC+0)
Subscribers
None
#!/usr/bin/env bash -ex
function
serverCommand
{
ssh -p
8022
jenkins@localhost
'echo '
"'"
$1
"'"
' > /mnt/minecraft/minecraft-'
$BUILD_WORLD_UNIX_NAME
'.fifo'
}
echo
"deb http://overviewer.org/debian ./"
|
sudo tee /etc/apt/sources.list.d/overviewer.list
wget -O - http://overviewer.org/debian/overviewer.gpg.asc
|
sudo apt-key add -
sudo apt-get update
sudo apt-get install minecraft-overviewer -qy
# open SSH tunnel to metapod
ssh -Nf -L
8022
:metapod:22 -o
ExitOnForwardFailure
=
yes -o
ControlPath
=
~/.ssh/fearow.lon.stwalkerster.net.ctl jenkins@fearow.lon.stwalkerster.net
mkdir -p /mnt/maps/
$BUILD_WORLD_UNIX_NAME
serverCommand
'tellraw @a {"text":"[Jenkins: Initiating new render job]","color":"gray","italic":true}'
serverCommand
'save-off'
serverCommand
'save-all force'
serverCommand
'tellraw @a {"text":"[Jenkins: Waiting for save to complete, then transferring world]","color":"gray","italic":true}'
sleep
5
echo
> ~/.ssh/minecraft.id_rsa
<<EEOOFF
-----BEGIN RSA PRIVATE KEY-----
MIGoAgEAAiEAmeInPXm1IRMZrrm52hZPFaBIf837ZI927od+9SoCs8cCASUCIBTL
iMMeSOjLOtJsIAi26Bd39tfhH9mBiauaNO5RESQVAhEA2129eLrW72Xpym8Ti10c
BQIRALOU6zm7RBSv265U/hONJlsCEFMA3+h+DCM7UYrd67gxEYUCEQClBWKIE92y
JQ8O5lFCZgeRAhAc4RcTmu62EbeoW+gODnGK
-----END RSA PRIVATE KEY-----
EEOOFF
chmod
go
=
~/.ssh/minecraft.id_rsa
rsync -avz -e
"ssh -i ~/.ssh/minecraft.id_rsa"
--exclude lost+found --exclude
'*.tar.bz'
--port
8022
minecraft@localhost:/mnt/minecraft/
$BUILD_WORLD_UNIX_NAME
/
$WORKSPACE
/server
serverCommand
'tellraw @a {"text":"[Jenkins: Transfer complete. Initiating render.]","color":"gray","italic":true}'
serverCommand
'save-on'
PYTHONPATH
=
`
pwd
`
overviewer.py --config
=
config.py --genpoi
PYTHONPATH
=
`
pwd
`
overviewer.py --config
=
config.py
serverCommand
'tellraw @a {"text":"[Jenkins: Render complete. ]","color":"gray","italic":true}'
serverCommand
'tellraw @a {"text":" http://'
$BUILD_WORLD_UNIX_NAME
'.mc.stwalkerster.co.uk/","italic":false,"color":"yellow","clickEvent":{"action":"open_url","value":"http://'
$BUILD_WORLD_UNIX_NAME
'.mc.stwalkerster.co.uk/"}}'
# close control connection
ssh -T -O
exit
fearow.lon.stwalkerster.net
Event Timeline
stwalkerster
created this paste.
Sep 27 2016, 11:16 PM
2016-09-27 23:16:38 (UTC+0)
•
import-bot
changed the edit policy from "All Users" to "
Community
(Project)".
Feb 3 2017, 3:03 PM
2017-02-03 15:03:39 (UTC+0)
Log In to Comment