This commit is contained in:
Woosle Park 2019-04-11 01:59:50 -04:00
commit 4734881e03
4 changed files with 52 additions and 0 deletions

View File

@ -1,4 +1,8 @@
### [Official website](https://muchassemblyrequired.com)
[![CodeFactor](https://www.codefactor.io/repository/github/simon987/much-assembly-required/badge)](https://www.codefactor.io/repository/github/simon987/much-assembly-required)
[![Build Status](https://ci.simon987.net/buildStatus/icon?job=Much-Assembly-Required)](https://ci.simon987.net/job/Much-Assembly-Required/)
Program the 8086-like microprocessor of a robot in a grid-based multiplayer world. The game is web based so no installation is required.
In its current state, players can walk around the game universe and collect Biomass blobs & Iron/copper ore using the online code editor.

32
jenkins/Jenkinsfile vendored Normal file
View File

@ -0,0 +1,32 @@
def remote = [:]
remote.name = 'remote'
remote.host = env.DEPLOY_HOST
remote.user = env.DEPLOY_USER
remote.identityFile = '/var/lib/jenkins/.ssh/id_rsa'
remote.knownHosts = '/var/lib/jenkins/.ssh/known_hosts'
remote.allowAnyHosts = true
remote.retryCount = 3
remote.retryWaitSec = 3
logLevel = 'FINER'
pipeline {
agent any
stages {
stage('Build') {
steps {
sh './jenkins/build.sh'
//stash includes: 'target/', name: 'target'
}
}
stage('Deploy') {
steps {
//unstash 'target'
sshCommand remote: remote, command: 'rm -rf mar/target mar/deploy.sh'
sshPut remote: remote, from: 'target', into: 'mar'
sshPut remote: remote, from: 'jenkins/deploy.sh', into: 'mar/deploy.sh'
sshCommand remote: remote, command: 'chmod +x mar/deploy.sh && ./mar/deploy.sh'
}
}
}
}

3
jenkins/build.sh Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/env bash
mvn package

13
jenkins/deploy.sh Executable file
View File

@ -0,0 +1,13 @@
#!/usr/bin/env bash
export MARROOT="mar"
screen -S mar -X quit
echo "Starting MAR"
cp ${MARROOT}/marConfig.properties ${MARROOT}/target/config.properties
cp -r ${MARROOT}/marCerts/ ${MARROOT}/target/certificates
screen -S mar -d -m bash -c "cd ${MARROOT}/target && java -jar server-*.jar"
sleep 1
screen -list