Skip to content

Instantly share code, notes, and snippets.

apiVersion: tekton.dev/v1alpha1
kind: TriggerTemplate
metadata:
name: chatbot-template
spec:
params:
- name: repourl
description: The git repository url
- name: prurl
description: The url to the PR
apiVersion: tekton.dev/v1alpha1
kind: TriggerBinding
metadata:
name: chatbot-binding
spec:
params:
- name: prurl
value: $(body.issue.html_url)
- name: repourl
value: $(body.repository.html_url)
apiVersion: tekton.dev/v1alpha1
kind: EventListener
metadata:
name: listener-interceptor
spec:
serviceType: LoadBalancer
triggers:
- name: chatbot-trig
interceptor:
github:
$ cat taskrun.yaml
...
#!/bin/bash
uname -a
xcode-select -v
...
$ tkn taskrun logs orka-ping-pp7mt
...
[unnamed-0] Darwin Admins-iMac 19.0.0 Darwin Kernel Version 19.0.0: Thu Oct 17 16:17:15 PDT 2019; root:xnu-6153.41.3~29/RELEASE_X86_64 x86_64
apiVersion: v1
kind: ConfigMap
metadata:
name: ip-masq-agent
namespace: kube-system
data:
config: |+
nonMasqueradeCIDRs:
- 10.40.0.0/14
resyncInterval: 60s
apiVersion: tekton.dev/v1alpha1
kind: Task
metadata:
name: orka-script
spec:
inputs:
# This also requires a secret called "macstadium" to exist with the following keys:
# token: the orka API auth token. Can be obtained from the $HOME/./.config/configstore/orka-cli.json file
# after an `orka login`
# license: the orka API license. Can be obtained from your IP plan.
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"log"
"os"
"os/exec"
type RemoteRef struct {
Url string
Sha string
}
type InlineData []byte
type Content struct {
// oneOf RemoteRef|Data
RemoteRef RemoteRef
✗ Low severity vulnerability found in k8s.io/kubernetes
Description: Denial of Service (DoS)
Info: https://snyk.io/vuln/SNYK-GOLANG-K8SIOKUBERNETESSTAGINGSRCK8SIOCLIENTGOUTILJSONPATH-597671
Introduced through: k8s.io/[email protected]
From: k8s.io/[email protected]
Fixed in: 1.19.0-rc.4
✗ Medium severity vulnerability found in k8s.io/kubernetes
Description: Man-in-the-Middle (MitM)
Info: https://snyk.io/vuln/SNYK-GOLANG-K8SIOKUBERNETES-1048855
@dlorenc
dlorenc / archived
Last active December 23, 2020 00:17
#!/bin/bash
# This doesn't handle vanity imports.
repos=$(go list -mod=readonly -u -m all | cut -d' ' -f1 | grep github)
# Should probably use the API, but rate-limiting...
for r in $repos; do
if curl -L https://$r 2>/dev/null | grep "This repository has been archived";then
echo "$r is archived";
fi;