brew install cmake
brew install python
sudo easy_install pip
Add powerline bin to your path. In your zshrc file (or the paths files sourced in zshrc) add the following line
PATH="/usr/local/share/python/:$PATH"
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" |
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 |
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:
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" |
My collection of useful hints and snippets for the Jenkins Pipeline Plugin
#!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 |
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' |
################## | |
### config.yml ### | |
################## | |
version: 2 | |
jobs: | |
build: | |
docker: | |
- image: circleci/python:3.6 | |
steps: |