jenkinsjson

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Overview

Package jenkinsjson converts jenkinsjson pipelines to Harness pipelines.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SanitizeForId

func SanitizeForId(spanName string, spanId string) string

Types

type Converter

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

Converter converts a jenkinsjson pipeline to a Harness v1 pipeline.

func New

func New(options ...Option) *Converter

New creates a new Converter that converts a jenkinsjson 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)

ConvertBytes 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 Option

type Option func(*Converter)

Option configures a Converter option.

func WithDockerhub

func WithDockerhub(connector string) Option

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

func WithKubernetes

func WithKubernetes(namespace, connector string) Option

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

type ProcessedTools added in v0.0.2

type ProcessedTools struct {
	ToolProcessed      bool
	MavenPresent       bool
	GradlePresent      bool
	AntPresent         bool
	MavenProcessed     bool
	GradleProcessed    bool
	AntProcessed       bool
	SonarCubeProcessed bool
	SonarCubePresent   bool
}

type StageWithID added in v0.0.2

type StageWithID struct {
	Stage *harness.Stage
	ID    int
}

Struct used to store the stages so they can be sorted

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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