Giter Club home page Giter Club logo

my-resolver's Introduction

Resolver Template

This directory contains a working Resolver based on the instructions from the developer howto in the docs.

Resolver Type

This Resolver responds to type demo.

Parameters

Name Desccription Example Value
url The repository url. https://example.com/repo/

Using the template to start a new Resolver

You can use this as a template to quickly get a new Resolver up and running with your own preferred storage backend.

To reuse the template, simply copy this entire subdirectory to a new directory. The entire program is defined in ./cmd/demoresolver/main.go and provides stub implementations of all the methods defined by the framework.Resolver interface.

Once copied you'll need to run go mod init and go mod tidy at the root of your project. We don't need this in tektoncd/resolution because this submodule relies on the go.mod and go.sum defined at the root of the repo.

After your go module is initialized and dependencies tidied, update config/demo-resolver-deployment.yaml. The image field of the container will need to point to your new go module's name, with a ko:// prefix.

Deploying the Resolver

Requirements

  • A computer with kubectl and ko installed.
  • The tekton-remote-resolution namespace and ResolutionRequest controller installed. See the getting started guide for instructions.

Install

  1. Install the "demo" Resolver:
$ ko apply -f ./config/demo-resolver-deployment.yaml

Testing

Try creating a ResolutionRequest targeting "demo" with no parameters:

$ cat <<EOF > rrtest.yaml
apiVersion: resolution.tekton.dev/v1alpha1
kind: ResolutionRequest
metadata:
  name: test-resolver-template
  labels:
    resolution.tekton.dev/type: demo
EOF

$ kubectl apply -f ./rrtest.yaml

$ kubectl get resolutionrequest -w test-resolver-template

You should shortly see the ResolutionRequest succeed and the content of a hello-world Pipeline base64-encoded in the object's status.data field.

Example PipelineRun

Here's an example PipelineRun that uses the hard-coded demo Pipeline:

apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
  name: resolver-demo
spec:
  pipelineRef:
    resolver: demo

What's Supported?

  • Just one hard-coded Pipeline for demonstration purposes.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License.

my-resolver's People

Contributors

chuangw6 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.