Merge pull request #70 from rtyler/lolz

Bring some deployment fixes through
This commit is contained in:
R. Tyler Croy 2017-12-18 16:13:14 -08:00 committed by GitHub
commit 5609feb908
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 26 additions and 13 deletions

View File

@ -0,0 +1,9 @@
#!/usr/bin/env groovy
/*
* Set the global quiet period to zero to avoid any delays in provisioning
* infrastructure or executing Pipelines
*/
import jenkins.model.Jenkins
Jenkins.instance.quietPeriod = 0

View File

@ -76,8 +76,9 @@ items:
template:
metadata:
labels:
app: 'jenkins'
app: 'jenkins-@@USER@@'
owner: '@@USER@@'
kind: 'master'
annotations:
spec:
securityContext:

View File

@ -1,3 +1,9 @@
#!/bin/sh
exec kubectl rolling-update canary --image=rtyler/codevalet-canary:latest --image-pull-policy=Always --update-period=10s
NAMESPACE=canary
for pod in $(kubectl get pods --namespace=${NAMESPACE} -l app=canary -o name); do
echo ">> Terminating ${pod}"
kubectl delete --namespace=${NAMESPACE} ${pod}
# Sleep to allow Kubernetes to pull the latest image
sleep 5
done;

View File

@ -1,7 +1,6 @@
#!/bin/sh
REPO_DIR=$(realpath $(dirname $0)/../)
for monkey in $(cat $REPO_DIR/monkeys.txt); do
kubectl rolling-update jenkins-${monkey} --image=rtyler/codevalet-master:latest --image-pull-policy=Always --update-period=10s
for pod in $(kubectl get pods --all-namespaces -o name -l kind=master); do
echo $pod;
done;

View File

@ -1,3 +0,0 @@
#!/bin/sh
exec kubectl rolling-update nginx --image=rtyler/codevalet-proxy:latest --image-pull-policy=Always --update-period=10s

View File

@ -1,7 +1,8 @@
#!/bin/sh
POD=$(kubectl get pods --namespace=webapp -l app=webapp | tail -n 1 | awk '{ print $1 }')
echo ">> Killing ${POD}"
exec kubectl delete pod --namespace=webapp ${POD}
NAMESPACE=webapp
for pod in $(kubectl get pods --namespace=${NAMESPACE} -l app=webapp -o name); do
echo ">> Terminating ${pod}"
kubectl delete --namespace=${NAMESPACE} ${pod}
# Sleep to allow Kubernetes to pull the latest image
done;