Skip to content

Instantly share code, notes, and snippets.

View csrwng's full-sized avatar

Cesar Wong csrwng

  • Red Hat
  • Raleigh, NC
View GitHub Profile
#!/bin/bash
oc cluster down
docker rm -f bindmountproxy
apiVersion: v1
kind: Template
labels:
template: application-template-sample-pipeline
message: A Jenkins server will be automatically instantiated in this project to manage
the Pipeline BuildConfig created by this template. You will be able to log in to
it using your OpenShift user credentials.
metadata:
annotations:
description: This example showcases the new Jenkins Pipeline integration in OpenShift,
apiVersion: v1
kind: Template
metadata:
name: oc-cli
objects:
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: cli-store
spec:
@csrwng
csrwng / inline-jenkinsfile.yaml
Last active May 22, 2021 19:41
Inline Jenkinsfile
apiVersion: v1
kind: Template
labels:
template: inline-jenkinsfile
metadata:
name: inline-jenkinsfile
parameters:
- name: NAME
description: The name of the build to create
displayName: Build Name
@csrwng
csrwng / build-client.sh
Last active March 8, 2017 15:01
Build oc client using an OpenShift Cluster
#/bin/bash
# NOTE: Create a separate project for each platform/branch you're building
# For a Mac client (substitute SOURCE_URL and SOURCE_REF to build a specific PR or fork):
oc new-app -f https://raw.githubusercontent.com/csrwng/build-origin/master/origin-builder.yaml \
-p SOURCE_URL=https://github.com/openshift/origin.git \
-p SOURCE_REF=master \
-p PLATFORM=darwin/amd64
@csrwng
csrwng / jenkins-sync-plugin.yaml
Created September 14, 2017 15:54
jenkins sync plugin builder
apiVersion: v1
kind: Template
metadata:
name: jenkins-sync-plugin
parameters:
- name: SOURCE_URL
required: true
value: https://github.com/openshift/jenkins-sync-plugin.git
- name: SOURCE_REF
required: true
#!/bin/bash
oc login -u system:admin
oc adm policy add-cluster-role-to-user cluster-admin developer
oc login -u developer
#!/bin/bash
decode="-d"
if [ "$(uname)" == "Darwin" ]; then
decode="-D"
fi
curl --cacert <(kubectl config view --flatten -o jsonpath='{ .clusters[0].cluster.certificate-authority-data }' | base64 ${decode}) \
--cert <(kubectl config view --flatten -o jsonpath='{ .users[0].user.client-certificate-data }' | base64 ${decode}) \
--key <(kubectl config view --flatten -o jsonpath='{ .users[0].user.client-key-data }' | base64 ${decode}) "$@"
#!/bin/bash
export GCP_SHARED_CREDENTIALS_FILE=/tmp/cluster/gce.json
export CLUSTER_TYPE=gcp
export HOME=/tmp/home
export ARTIFACT_DIR=/tmp/artifacts
export GCP_PROJECT=openshift-dev-installer
export ENABLE_FIPS=false
set -euo pipefail
- apiVersion: hive.openshift.io/v1
kind: ClusterDeployment
metadata:
creationTimestamp: null
labels:
hive.openshift.io/hiveutil-created: "true"
name: test
spec:
baseDomain: new-installer.openshift.com
certificateBundles: