Skip to content

Instantly share code, notes, and snippets.

Chmouel Boudjnah chmouel

Block or report user

Report or block chmouel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@chmouel
chmouel / gbs.sh
Last active Jun 5, 2019
Choose branch with FZF including preview diff with bat
View gbs.sh
chosen=$(git branch --sort=-committerdate --format '%(refname:short)' -l|grep -v heads/|fzf --border --preview "git log --no-merges --patch-with-stat {}|bat --language=diff --color=always" --bind CTRL-P:preview-up,CTRL-N:preview-down,CTRL-SPACE:preview-page-down --preview-window=up:80%)
[[ $1 == -n ]] && { echo $chosen ; return ;}
git checkout ${chosen}
View *vc-diff*.diff
diff --git a/issue.md b/issue.md
index 4979654..ee0185d 100644
--- a/issue.md
+++ b/issue.md
@@ -4,17 +4,17 @@ Author: Vincent Demeester <vdemeest@redhat.com>
Date: June 6 2019
## Objective
-
-Propose to mark knative/build as deprecated and drive user to the Tekton project for building their image. This doc should be used as a forum for external comment and questions, to resolve any concerns before the Steering Committee decides whether to adopt the proposal.
View tekton-showlog.sh
#!/bin/bash
set -e
choosef() {
type="$1"
[[ -n $2 ]] && label="-ltekton.dev/${2}"
[[ -n $3 ]] && jqb=$3 || jqb='.items[].metadata.name'
kubectl get ${type} ${label} -o json|jq -r $jqb | fzf -1
}
PIPELINE=$(choosef pipeline)
View tkn-pr-status.sh
#!/bin/bash
set -e
SED=sed;type -p gsed >/dev/null 2>/dev/null && SED=gsed #osx blah
JOB_NAME=${1-pull-tekton-pipeline-integration-tests}
JOB_URL=$(hub ci-status -v| sed -n "/${JOB_NAME}/ { s/.*https/https/;p;}")
rm -f /tmp/.prjtlogs${JOB_NAME}.* # Cleanups
TMP=$(mktemp /tmp/.prjtlogs${JOB_NAME}.XXXXXX)
View *vc-diff*.diff
diff --git a/test/pipelinerun_test.go b/test/pipelinerun_test.go
index 97f170f1..df5963b3 100644
--- a/test/pipelinerun_test.go
+++ b/test/pipelinerun_test.go
@@ -27,6 +27,7 @@ import (
"github.com/tektoncd/pipeline/pkg/artifacts"
"k8s.io/apimachinery/pkg/api/errors"
+ "k8s.io/apimachinery/pkg/util/wait"
@chmouel
chmouel / tekton-pull-from-ci-push-to-release.bash
Last active May 4, 2019
docker pull image from openshift ci and push to quay openshift-pipeline
View tekton-pull-from-ci-push-to-release.bash
set -ex
v=${1}
[[ -z ${v} ]] && {
echo "You need a release number i.e: 0.3.1"
}
for p in bash controller creds-init entrypoint git-init kubeconfigwriter nop webhook;do
docker pull registry.svc.ci.openshift.org/openshift/knative:tektoncd-pipeline-${p}
docker tag registry.svc.ci.openshift.org/openshift/knative:tektoncd-pipeline-${p} quay.io/openshift-pipeline/tektoncd-pipeline-$p:v${v}
@chmouel
chmouel / yaml2json.sh
Created Apr 24, 2019
Convert yaml to json via the command line
View yaml2json.sh
#!/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 '.'
@chmouel
chmouel / os4-install.bash
Last active Apr 25, 2019
install openshift 4 in loop
View os4-install.bash
#!/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() {
View os4-download-binary.bash
#!/usr/bin/env bash
# Chmouel Boudjnah <chmouel@redhat.com>
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))
View pr-tektoncd-openshift.bash
#!/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}
You can’t perform that action at this time.