Skip to content

Instantly share code, notes, and snippets.

steps:
- name: 'gcr.io/cloud-builders/go'
args: ['install', '.']
resources:
- slack
channel: foo
secret: $FOO
- email
apiVersion: tekton.dev/v1alpha1
kind: Task
metadata:
name: kustomize-build
spec:
resources:
- name: workspace
type: fileset
mode: ro
- name: inflated
apiVersion: tekton.dev/v1alpha1
kind: PipelineResourceType
metadata:
name: git
spec:
implementations:
- modes: [ro]
params:
- name: url
type: string
@dlorenc
dlorenc / FileSet.md
Last active September 5, 2019 14:11

FileSet Pipeline Resource

Today in Tekton, tasks that consume files must operate on a typed Input resource, usually of Type Git or Storage. This leads to a few problems:

  • Tasks must choose which to support, when both should be equivalent
  • Pipelines of Tasks that operate on specific files must invent out-of-band mechanisms to specify which files to operate on

Ideally, Tasks that operate on Files would have a more generic type of resource that can be populated from various sources, and Tasks should not need to communicate about file paths or names out-of-band.

This proposal details a FileSet Pipeline Resource designed to achieve these goals.

var severityName = []string{
infoLog: "INFO",
warningLog: "WARNING",
errorLog: "ERROR",
fatalLog: "FATAL",
}
apiVersion: tekton.dev/v1alpha1
kind: EventBinding
spec:
# Reference to the knative/eventing Source
sourceRef:
name: myGithubRepo
# PipelineResources to create/delete based on data in the event source
# This assumes the event data looks something like:
package main
import (
"fmt"
"log"
"net/http"
"./backend"
)
Release new nodejs runtime image
-----Apt-----
Packages found only in gcr.io/google-appengine/nodejs@sha256:483f3ac46c4814ab524c42c9fd0efdfbdb81f848e14a1c06ee6b74aabb30021d: None
Packages found only in gcr.io/google-appengine/nodejs@sha256:bba33929fbb12866054eb9acea7efe0e824ee15c22942649f300ac97dec25821: None
Version differences:
PACKAGE IMAGE1 (gcr.io/google-appengine/nodejs@sha256:483f3ac46c4814ab524c42c9fd0efdfbdb81f848e14a1c06ee6b74aabb30021d) IMAGE2 (gcr.io/google-appengine/nodejs@sha256:bba33929fbb12866054eb9acea7efe0e824ee15c22942649f300ac97dec25821)
# Gopkg.toml example
#
# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
# name = "github.com/user/project"
package main
import (
"bufio"
"fmt"
"io"
"log"
"strings"
"k8s.io/apimachinery/pkg/util/yaml"