This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
bc=${1} | |
[[ -z ${bc} ]] && { | |
echo "need a bc" | |
echo "$(oc get bc)" | |
exit 1 | |
} | |
[[ -n ${T} ]] && targetnamespace="-n $T" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pushd /usr/local/bin >/dev/null && \ | |
curl -s -L $(curl -L -s "https://api.github.com/repos/openshift/origin/releases/latest"|python -c "import sys, json;x=json.load(sys.stdin);print([ r['browser_download_url'] for r in x['assets'] if 'openshift-origin-client-tools' in r['name'] and 'linux-64bit' in r['name']][0])") -o /tmp/oc.tgz && \ | |
tar xz -f/tmp/oc.tgz --wildcards "*/oc" --strip-components=1 && \ | |
popd >/dev/null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PATH=$PATH:/usr/local/bin | |
set -ex | |
DOMAIN=openshift3.chmouel.com | |
VERSION=3.10.0 | |
OC_VERSION=oc-v${VERSION} | |
INSTALLPATH=/etc/origin | |

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# Author: Chmouel Boudjnah <[email protected]> | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); you may | |
# not use this file except in compliance with the License. You may obtain | |
# a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
from elasticsearch import Elasticsearch, Transport | |
def execute(command): | |
return subprocess.run( | |
['/bin/sh', '-c', f"{command}"], | |
stdout=subprocess.PIPE) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
set -x | |
set -e | |
LISTFILE=/tmp/list-of-repo-to-blank-archive.txt | |
base=/tmp/security | |
for i in $(cat ${LISTFILE});do | |
b=$(basename $i) | |
if [[ -e ${base}/${b} ]];then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
# using zsh cause quoting sucks on bash | |
AUTH_URL=http://auth-fabric8-build.devtools-dev.ext.devshift.net | |
ENV_URL=http://f8env-fabric8-build.devtools-dev.ext.devshift.net | |
TOKEN=$(curl -s -L ${AUTH_URL}/api/token/generate -H 'content-type: application/json' | jq -r '.[0].token.access_token') | |
SPACE_ID=$(uuidgen) | |
function createENV() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main // -*- mode:go;mode:go-playground -*- | |
// snippet of code @ 2018-11-09 14:01:15 | |
// === Go Playground === | |
// Execute the snippet with Ctl-Return | |
// Remove the snippet completely with its dir and all files M-x `go-playground-rm` | |
import ( | |
"fmt" | |
"log" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
set -e | |
set -x | |
# URL | |
WIT_SERVICE=f8wit-fabric8-build.devtools-dev.ext.devshift.net | |
AUTH_SERVICE=auth-fabric8-build.devtools-dev.ext.devshift.net | |
# BUILD_SERVICE="f8build-fabric8-build.devtools-dev.ext.devshift.net" | |
BUILD_SERVICE="localhost:8080" |