Skip to content

Instantly share code, notes, and snippets.

View ahpook's full-sized avatar
:octocat:
OSPO @ Github

Eric Sorenson ahpook

:octocat:
OSPO @ Github
View GitHub Profile
@ahpook
ahpook / integration_loop.sh
Created June 15, 2020 21:06
Loop over all the repos in the integrations org and... do stuff
#!/usr/local/bin/zsh
set -x
# if we get above 60 repos this will need an update
if [[ ! -f repos.json ]]; then
curl -s 'https://api.github.com/organizations/62306501/repos?page=1' >! repos.json
curl -s 'https://api.github.com/organizations/62306501/repos?page=2' >> repos.json
fi
@ahpook
ahpook / edit_and_pr.sh
Last active April 17, 2020 22:27
relay-pr-script
#!/bin/bash
GITHUB_TOKEN=$(ni get -p {.github_token})
TAG=$(ni get -p {.tag})
SHA=$(ni get -p {.sha})
if [[ $GITHUB_TOKEN =~ .{25,} ]] && [[ $TAG =~ ^v ]] && [[ $SHA =~ .{63,} ]] ; then
git clone https://${GITHUB_TOKEN}@github.com/puppetlabs/homebrew-puppet
cd homebrew-puppet
git config user.name "Relay Autobot" && git config user.email "[email protected]"
PUBLISH_BRANCH=relay_${TAG}
git checkout -b ${PUBLISH_BRANCH}
@ahpook
ahpook / conditional-pipelinerun-tasks.yaml
Last active March 24, 2020 07:10
Conditional pipelinerun - example tasks
---
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: create-readme-file
spec:
resources:
outputs:
- name: workspace
type: git
@ahpook
ahpook / conditional-pipelinerun-pipelinerun.yaml
Last active March 24, 2020 18:27
Conditional pipelinerun - the actual run
---
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
name: condtional-pr
spec:
pipelineRef:
name: conditional-pipeline
serviceAccountName: 'default'
resources:
@ahpook
ahpook / conditional-pipelinerun-pipeline.yaml
Created March 24, 2020 06:57
Conditional pipelinerun - Pipeline definition
---
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
name: conditional-pipeline
spec:
resources:
- name: source-repo
type: git
params:
@ahpook
ahpook / conditional-pipelinerun-condition.yaml
Last active March 24, 2020 06:59
Conditional pipelinerun - condition definition
apiVersion: tekton.dev/v1alpha1
kind: Condition
metadata:
name: file-exists
spec:
params:
- name: "path"
resources:
- name: workspace
type: git
{
"workflow": {
"kind": "Workflow",
"steps": [
{
"name": "Step-1-Provision-K8s-cluster",
"input": [
"echo \"Hello world. I am Step 1\"",
"sleep 5"
],
&{0xc000010010 0 5 3 [32 32 32 32 32 32 32 32] 16 [] 0 {0 0 false} 0 [[]] []}
&{
{TaskRunList tekton.dev/v1alpha1}
{/apis/tekton.dev/v1alpha1/namespaces/default/taskruns 19052850 }
[{{TaskRun tekton.dev/v1alpha1}
{echo-hello-world-task-run
default
/apis/tekton.dev/v1alpha1/namespaces/default/taskruns/echo-hello-world-task-run
6c8b4d24-9865-11e9-b2a7-fa163e77a488
16591574
✘ eric@recury  ~/Sandbox/go/src/github.com/lyraproj/lyra   tags/v0.2.0 ± build/bin/lyra apply --debug helm | gist
2019-05-21T00:57:09.186-0700 [DEBUG] lyra: configuring scope
2019-05-21T00:57:09.186-0700 [DEBUG] lyra: applying: stepID=helm
2019-05-21T00:57:09.187-0700 [DEBUG] lyra: starting plugin: path=build/goplugins/identity args=[build/goplugins/identity]
2019-05-21T00:57:09.189-0700 [DEBUG] lyra: plugin started: path=build/goplugins/identity pid=57555
2019-05-21T00:57:09.190-0700 [DEBUG] lyra: waiting for RPC address: path=build/goplugins/identity
2019-05-21T00:57:09.228-0700 [DEBUG] lyra.identity: Starting to serve: @module=Identity name=Identity timestamp=2019-05-21T00:57:09.227-0700
2019-05-21T00:57:09.229-0700 [DEBUG] lyra: using plugin: version=1
2019-05-21T00:57:09.230-0700 [DEBUG] lyra.identity: plugin address: @module=Identity address=/var/folders/mt/wmmzm56n74x31hc23qb4pw4m0000gn/T/plugin859061638 network=unix timestamp=2019-05-21T00:57:09.229-0700
2019-05-21T00:57:09.233-0700 [DEBUG] lyra
2019-02-06T03:36:04.241-0800 [DEBUG] lyra.loader: reading embedded plugins
2019-02-06T03:36:04.241-0800 [DEBUG] lyra.loader: found embedded plugins: count=8
2019-02-06T03:36:04.241-0800 [DEBUG] lyra: starting plugin: path=./build/lyra args=[./build/lyra, --debug, plugin, aws]
2019-02-06T03:36:04.245-0800 [DEBUG] lyra: plugin started: path=./build/lyra pid=77426
2019-02-06T03:36:04.245-0800 [DEBUG] lyra: waiting for RPC address: path=./build/lyra
2019-02-06T03:36:04.320-0800 [DEBUG] lyra.lyra: Starting to serve TypedName('namespace' => 'service', 'name' => 'Aws')
2019-02-06T03:36:04.321-0800 [DEBUG] lyra.lyra: 2019-02-06T03:36:04.321-0800 [DEBUG] lyra: plugin address: network=unix address=/var/folders/mt/wmmzm56n74x31hc23qb4pw4m0000gn/T/plugin141130345
2019-02-06T03:36:04.321-0800 [DEBUG] lyra: using plugin: version=1
2019-02-06T03:36:04.324-0800 [DEBUG] lyra.loader: loading metadata: plugin=./build/lyra
2019-02-06T03:36:04.417-0800 [DEBUG] lyra.loader: registered service: serviceID=http://puppet.com/2016.1/ru