Skip to content

Instantly share code, notes, and snippets.

👶
Parental leave

Jason Hall ImJasonH

👶
Parental leave
Block or report user

Report or block ImJasonH

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
@ImJasonH
ImJasonH / git_resource.go
Created Jan 28, 2020
Sketch of change to migrate `git-init` to script mode (https://github.com/tektoncd/pipeline/issues/1961)
View git_resource.go
// GetInputTaskModifier returns the TaskModifier to be used when this resource is an input.
func (s *GitResource) GetInputTaskModifier(_ *TaskSpec, path string) (TaskModifier, error) {
return &InternalTaskModifier{
StepsToPrepend: []Step{{
Container: corev1.Container{
Name: names.SimpleNameGenerator.RestrictLengthWithRandomSuffix(gitSource + "-" + s.Name),
Image: s.GitImage,
WorkingDir: pipeline.WorkspaceDir,
// This is used to populate the ResourceResult status.
Env: []corev1.EnvVar{{
View go.mod
module example.com/foo/bar
go 1.13
View gist:e28498d52e8ee9ded05e92ce679a6d3a
gcloud
inputs:
* gcloud-image (default: foo)
* args (default: ["help"])
outputs:
* image (type: image)
@ImJasonH
ImJasonH / main.go
Created Dec 17, 2019
Example of parsing a YAML file into a Tekton Task
View main.go
import (
"flag"
"io/ioutil"
"log"
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1"
"github.com/tektoncd/pipeline/pkg/client/clientset/versioned/scheme"
)
var (
View Dockerfile
FROM ubuntu
ADD doll.sh /
ENTRYPOINT ["/doll.sh"]
View whiteouter.go
package main
import (
"archive/tar"
"bytes"
"flag"
"log"
"github.com/google/go-containerregistry/pkg/name"
"github.com/google/go-containerregistry/pkg/v1/mutate"
@ImJasonH
ImJasonH / git.go
Created Jul 29, 2019
hacking on trying to write git objects (https://github.com/ImJasonH/ideas/issues/77)
View git.go
package main
import (
"bytes"
"compress/zlib"
"crypto/sha1"
"fmt"
"io"
"log"
"os"
View migrating-knative-build.md

Migrating from Knative Build

This doc describes a process for users who are familiar with Knative Build and BuildTemplate resources to migrate to Tekton TaskRuns and Tasks, respectively.

Tekton's resources are heavily influenced by Knative's Build-related resources, with some additional features that enable them to be chained together inside a Pipeline, and provide additional flexibility and reusability.

| Knative | Tekton |

View scriptmode.md

Much of this proposal is cribbed from proposals @ahmetb has previously made, ideas are not my own.

Expected Behavior

Users have an easy cruft-free way to express a multi-statement script in the body of a Task step, without having to understand advanced topics about containers, like what an entrypoint or a command is.

Users should only need to have passing familiarity with a shell environment to be successful using Tekton.

Actual Behavior

View main.go
package main
import "fmt"
func main() {
fmt.Println("hello world")
}
You can’t perform that action at this time.