jenkins

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package jenkins converts Jenkins pipelines to Harness pipelines.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Converter

type Converter struct {
	// contains filtered or unexported fields
}

Converter converts a Drone pipeline to a Harness v1 pipeline.

func New

func New(options ...Option) *Converter

New creates a new Converter that converts a Drone pipeline to a Harness v1 pipeline.

func (*Converter) Convert

func (d *Converter) Convert(r io.Reader) ([]byte, error)

Convert downgrades a v1 pipeline.

func (*Converter) ConvertBytes

func (d *Converter) ConvertBytes(b []byte) ([]byte, error)

ConvertString downgrades a v1 pipeline.

func (*Converter) ConvertFile

func (d *Converter) ConvertFile(p string) ([]byte, error)

ConvertFile downgrades a v1 pipeline.

func (*Converter) ConvertString

func (d *Converter) ConvertString(s string) ([]byte, error)

ConvertString downgrades a v1 pipeline.

type Format

type Format int

Format defines the intermeditate format.

const (
	FromGithub Format = iota
	FromGitlab
	FromDrone
)

func (Format) String

func (f Format) String() string

String returns the format as a string.

type Option

type Option func(*Converter)

Option configures a Converter option.

func WithAttempts

func WithAttempts(attempts int) Option

WithAttempts returns an option to set the number of retry attempts.

func WithDebug

func WithDebug() Option

WithDebug returns an option to use debug mode.

func WithDockerhub

func WithDockerhub(connector string) Option

WithDockerhub returns an option to set the default dockerhub registry connector.

func WithFormat

func WithFormat(format Format) Option

WithFormat returns an option to customize the intermediate format.

func WithFormatString

func WithFormatString(format string) Option

WithFormat returns an option to customize the intermediate format.

func WithKubernetes

func WithKubernetes(namespace, connector string) Option

WithKubernetes returns an option to set the default runtime to Kubernetes.

func WithToken

func WithToken(token string) Option

WithToken returns an option to set the API token for Chat GPT.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL