I hereby pledge that:
- There is no adverse effect outside the scope of PR ❌
- Every change is fully understood in PR ❌
@ECHO OFF | |
SET "dgFolder=%UserProfile%\.DataGrip2016.1" | |
SET "evilFile=%dgFolder%\config\eval\DataGrip2.evaluation.key" | |
SET "evilBakFile=%dgFolder%\config\eval\DataGrip2.evaluation.key.bak" | |
echo exorcising evil spirit in key | |
if exist "%evilFile%" ( | |
move /y "%evilFile%" "%evilBakFile%" | |
) else ( |
I hereby pledge that:
kubectl apply -f namespace.yaml |
gcloud beta iam service-accounts create [SA-NAME] \ | |
--description "[SA-DESCRIPTION]" \ | |
--display-name "[SA-DISPLAY-NAME]" |
pipeline { | |
agent any | |
stages { | |
stage("Deploy") { | |
steps { | |
withKubeConfig([credentialsId: '[CREDENTIAL_ID]', serverUrl: '[AUTHENTICATION_SERVER]']) { | |
script { | |
active = sh(returnStdout: true, script: "kubectl get vs [VIRTUAL_SERVICE] -o yaml | grep -B1 'weight: 100' | pcregrep -o1 'subset: (.*)'").trim() | |
echo "active: $active" |
gcloud iam service-accounts keys create ~/key.json \ | |
--iam-account [SA-NAME]@[PROJECT-ID].iam.gserviceaccount.com |
def switchToBlue() { | |
sh(returnStdout: true, script: "kubectl apply -f deploy/k8s/prod/switch/vs-blue.yaml") | |
} | |
def switchToGreen() { | |
sh(returnStdout: true, script: "kubectl apply -f deploy/k8s/prod/switch/vs-green.yaml") | |
} | |
pipeline { | |
agent any |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: [SERVICE] | |
labels: | |
app: [APP] | |
spec: | |
selector: | |
app: [APP] | |
ports: |
apiVersion: networking.istio.io/v1alpha3 | |
kind: VirtualService | |
metadata: | |
name: [APP_VS] | |
namespace: [APP] | |
spec: | |
gateways: | |
- default/default-gateway | |
hosts: | |
- [HOST] |
apiVersion: networking.istio.io/v1alpha3 | |
kind: VirtualService | |
metadata: | |
name: [APP_VS] | |
namespace: [APP] | |
spec: | |
gateways: | |
- default/default-gateway | |
hosts: | |
- [HOST] |