Skip to content

Duologic/tekton-libsonnet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tekton jsonnet library

Jsonnet library for https://tekton.dev/

Usage

Install it with jsonnet-bundler:

jb install https://github.com/Duologic/tekton-libsonnet

Import into your jsonnet:

local tekton = import 'github.com/Duologic/tekton-libsonnet/main.libsonnet';

{
  tekton: tekton.installation,

  git_clone_task: tekton.tasks.task_git_clone,

  pipeline:
    local pipeline = tekton.core.v1beta1.pipeline;
    local workspace = 'ws';

    pipeline.new('tanka-pipeline')
    + pipeline.withWorkspace(workspace)
    + pipeline.addTask(
      'git-clone',
      'git-clone',
      workspaces=[{
        name: 'output',
        workspace: workspace,
      }],
      params=[{
        name: 'url',
        value: 'https://github.com/Duologic/tekton-libsonnet.git',
      }]
    ),
}