This gist gives instructions to setup a Validating Admission Webhook or Mutating Admission Webhook in Kubernetes.
Heavy credits to
This gist gives instructions to setup a Validating Admission Webhook or Mutating Admission Webhook in Kubernetes.
Heavy credits to
################## | |
### config.yml ### | |
################## | |
version: 2 | |
jobs: | |
build: | |
docker: | |
- image: circleci/python:3.6 | |
steps: |
steps: | |
- name: 'gcr.io/cloud-builders/npm' | |
args: ['install'] | |
- name: 'gcr.io/cloud-builders/npm' | |
args: ['test'] | |
- name: 'gcr.io/cloud-builders/docker' | |
args: ["build", "-t", "gcr.io/$PROJECT_ID/frontend:$REVISION_ID", "."] | |
- name: 'gcr.io/cloud-builders/docker' | |
args: ["push", "gcr.io/$PROJECT_ID/frontend:$REVISION_ID"] | |
- name: 'gcr.io/cloud-builders/gcloud' |
#!groovy | |
import groovy.json.JsonOutput | |
import groovy.json.JsonSlurper | |
def label = "mypod-${UUID.randomUUID().toString()}" | |
podTemplate(label: label, yaml: """ | |
spec: | |
containers: | |
- name: mvn | |
image: maven:3.3.9-jdk-8 |
My collection of useful hints and snippets for the Jenkins Pipeline Plugin
node { | |
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1' | |
echo 'No quotes, pipeline command in single quotes' | |
sh 'echo $BUILD_NUMBER' // 1 | |
echo 'Double quotes are silently dropped' | |
sh 'echo "$BUILD_NUMBER"' // 1 | |
echo 'Even escaped with a single backslash they are dropped' | |
sh 'echo \"$BUILD_NUMBER\"' // 1 | |
echo 'Using two backslashes, the quotes are preserved' | |
sh 'echo \\"$BUILD_NUMBER\\"' // "1" |
This script creates a Container VM on Google Compute Engine running a NFS V4 server exposed on Port 2049 with the /exports directory mounted to a persistent disk. This means:
To run:
gcloud container clusters create cluster-1 \ | |
--num-nodes 1 \ | |
--disk-size 10 \ | |
--machine-type f1-micro \ | |
--no-enable-cloud-logging \ | |
--no-enable-cloud-monitoring | |
# When it's done, your kubectl command should work | |
kubectl cluster-info |
curl --header 'Authorization: token INSERTACCESSTOKENHERE' \ | |
--header 'Accept: application/vnd.github.v3.raw' \ | |
--remote-name \ | |
--location https://api.github.com/repos/owner/repo/contents/path | |
# Example... | |
TOKEN="INSERTACCESSTOKENHERE" | |
OWNER="BBC-News" | |
REPO="responsive-news" |