Created
August 28, 2015 21:28
-
-
Save halberom/09646a84842d11caf567 to your computer and use it in GitHub Desktop.
valid yaml
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
--- | |
- | |
job: | |
builders: | |
- | |
ssh-builder: | |
command: | | |
"sleep 60 | |
echo $sudopass | sudo -S docker pull myimage | |
echo $sudopass | sudo -S docker stop myimage | |
echo $sudopass | sudo -S docker rm myimage | |
echo $sudopass | sudo -S docker run --name image2 --restart=always | |
-h `hostname` -v /var/lib/deploy/tomcat/logs/:/usr/local/tomcat/logs | |
-v /var/lib/deploy/derbydb/.orderapi:/usr/local/tomcat/.orderapi | |
-e SPRING_PROFILES_ACTIVE="integration" -e TZ="America/Denver" | |
-e CATALINA_OPTS="$CATALINA_OPTS -Dorderapi.macaddress='`cat | |
/sys/class/net/eth0/address`' -Dderby.system.home=/usr/local/tomcat/.orderapi | |
-Dnewrelic.environment=development -Djava.rmi.server.hostname=`hostname`" | |
-p 8080:8080 -p 7091:7091 -d myimage3:$IMAGE_VERSION | |
" | |
ssh-user-ip: sshserver | |
- | |
shell: | | |
"sleep 30 | |
url=myserver.url.example.com | |
statusOutput=$(curl --insecure -w %{http_code} -o /dev/null $url) | |
if [[ "$statusOutput" == "000" || "$statusOutput" == 40* || \ "$statusOutput" == 50* ]]; then | |
echo "$url not reachable" | |
exit 1 | |
fi | |
echo "Check configuration OK" | |
" | |
description: "This job belongs to Fulfillment Group" | |
disabled: true | |
logrotate: | |
numToKeep: 5 | |
name: order-api-deploy-order-apidev02-DEV | |
parameters: | |
- | |
string: | |
default: latest | |
description: "Image version of order-api docker image to pull and deploy" | |
name: IMAGE_VERSION | |
properties: | |
- | |
priority-sorter: | |
priority: 100 | |
publishers: | |
- | |
ssh: | |
command: "echo $sudopass | sudo -S lbctl -d -f" | |
remove-prefix: docker/resources/tomcat/logs/ | |
site: order-apidev02 | |
source: docker/resources/tomcat/logs/logback.xml | |
target: tomcat/logs | |
- | |
email: | |
notify-every-unstable-build: true | |
recipients: maillist.com | |
send-to-individuals: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment