jenkins

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// STABLE represents a stable release type
	STABLE string = "stable"
	// WEEKLY represents a weekly release type
	WEEKLY string = "weekly"
	// WRONG represents a bad release name
	WRONG string = "unknown"
)

Variables

View Source
var (
	// ChangelogFallbackContent is returned when no Github credentials are provided as it's currently
	// the only to retrieve Jenkins changelog from GitHub release.
	ChangelogFallbackContent string = `` /* 318-byte string literal not displayed */

)

Functions

func GetVersions

func GetVersions() (latest string, versions []string, err error)

GetVersions fetch every jenkins version from the maven repository

func ReleaseType

func ReleaseType(version string) (string, error)

ReleaseType return the release type of a version

Types

type Jenkins

type Jenkins struct {
	Release string      // Defines the release name like latest or weekly
	Version string      // Defines a specific release version
	Github  github.Spec // Github Parameter used to retrieve a Jenkins changelog
}

Jenkins defines parameters needed to retrieve latest Jenkins version based on a specific release

func (*Jenkins) Changelog

func (j *Jenkins) Changelog(name string) (string, error)

Changelog returns a changelog description based on a Jenkins version retrieved from a GitHub Release

func (*Jenkins) Condition

func (j *Jenkins) Condition(source string) (bool, error)

Condition checks that a Jenkins version exists and that the version match a valid release type

func (*Jenkins) ConditionFromSCM

func (j *Jenkins) ConditionFromSCM(source string, scm scm.Scm) (bool, error)

ConditionFromSCM checks if a key exists in a yaml file

func (*Jenkins) Source

func (j *Jenkins) Source(workingDir string) (string, error)

Source return the latest Jenkins version based on release type

func (*Jenkins) Validate

func (j *Jenkins) Validate() (err error)

Validate run some validation on the Jenkins struct

type Semver

type Semver struct {
	Major      string
	Minor      string
	Patch      string
	Prerelease string
}

Semver struct to store a semver.

func NewVersion

func NewVersion(in string) Semver

NewVersion creates a new Semver.

func (Semver) LessThan

func (v Semver) LessThan(o Semver) bool

LessThan returns true if this Semver is less than the supplied one.

func (*Semver) String

func (v *Semver) String() string

String string representation of this struct.

Jump to

Keyboard shortcuts

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