mirror of https://github.com/codevalet/codevalet
Merge pull request #70 from rtyler/lolz
Bring some deployment fixes through
This commit is contained in:
commit
5609feb908
|
@ -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
|
|
@ -76,8 +76,9 @@ items:
|
|||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: 'jenkins'
|
||||
app: 'jenkins-@@USER@@'
|
||||
owner: '@@USER@@'
|
||||
kind: 'master'
|
||||
annotations:
|
||||
spec:
|
||||
securityContext:
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
exec kubectl rolling-update nginx --image=rtyler/codevalet-proxy:latest --image-pull-policy=Always --update-period=10s
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue