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 | |
# URL | |
WIT_SERVICE=f8wit-build.devtools-dev.ext.devshift.net | |
AUTH_SERVICE=auth-build.devtools-dev.ext.devshift.net | |
# This can't be a git@github* thing, because with does some conversion | |
CODE_BASE=https://github.com/chmouel/fabric8-build4.git | |
randomword () { |
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
func newPodForCR(cr *jrv1alpha1.JenkinsFileRunner) *corev1.Pod { | |
branch := cr.Spec.RepoBranch | |
if branch == "" { | |
branch = "master" | |
} | |
rev := cr.Spec.RepoRev | |
if rev == "" { | |
rev = "origin/master" | |
} |
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
clusters: | |
- cluster: | |
certificate-authority-data: a | |
server: https://chmouel-api.devcluster.openshift.com:6443 | |
name: chmouel | |
contexts: | |
- context: | |
cluster: chmouel | |
user: admin | |
name: admin |
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 bash | |
set -e | |
# set -x | |
# You can change this manually if you like (ie windows) | |
PLATFORM=$(uname -s) | |
PLATFORM=${PLATFORM,,} # Lowercase it | |
# Change this if you like | |
INSTALLPATH=/usr/local/bin/minikube |
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
T=taskrun | |
RUN=$(oc get ${T} -o json | jq -r '.items[].metadata.name' | fzf -1) | |
podname=$(oc get ${T} ${RUN} -o json | jq -r '.status.podName') | |
containerStatuses=$(oc get pod ${podname} -o json | jq -r '.status.containerStatuses[] | (.name + "|" + .state.terminated.reason)') | |
for cont in ${containerStatuses}; do | |
[[ $cont == *Error ]] && { | |
buildstep=${cont/|Error/} | |
echo "Showing failed step: ${buildstep}" |
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 | |
import ( | |
"fmt" | |
"log" | |
"os/user" | |
) | |
func main() { | |
userc, err := user.Current() |
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 | |
PERSONAL_GIT_REMOTE=chmouel # usually your github username | |
RELEASE_VERSION=${1:-v0.2.0} # Tekton latest release from where you are going to release from | |
# detect current branch | |
currentb=$(git rev-parse --abbrev-ref HEAD) | |
# Push current branch to your user | |
git push ${PERSONAL_GIT_REMOTE} -u ${currentb} |
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 bash | |
# Chmouel Boudjnah <[email protected]> | |
RELEASETYPE=4.0.0-0.ci | |
LATEST=https://openshift-release.svc.ci.openshift.org/releasestream/${RELEASETYPE}/latest/download | |
set -e | |
READLINK=readlink;type -p greadlink >/dev/null 2>/dev/null && READLINK=greadlink #osx brew readlink detection | |
SED=sed;type -p gsed >/dev/null 2>/dev/null && SED=gsed #osx brew sed detection | |
SD=$($READLINK -f $(dirname $0)) |
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 bash | |
# set -x | |
set -e | |
SD=$(readlink -f $(dirname $0)) | |
IC=$(readlink -f $(dirname $0)/install-config.yaml ) | |
DIR=${SD}/os4 | |
function recreate() { |
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 bash | |
[[ -n $1 ]] && from=$1 || from=/dev/stdin | |
python3 -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout, indent=4);print()' < ${from} | jq '.' |