Skip to content

Instantly share code, notes, and snippets.

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 beta iam service-accounts create [SA-NAME] \
--description "[SA-DESCRIPTION]" \
--display-name "[SA-DISPLAY-NAME]"
kubectl apply -f namespace.yaml
@giang-pham
giang-pham / PULL_REQUEST_TEMPLATE.md
Last active April 5, 2019 07:27
SPEEDA ASIA PR template

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 (