variables

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

package variables implements a type and functions to handle CI job variables as described in https://docs.gitlab.com/ee/ci/variables. This includes handling file-type variables and (eventually) masked variables. It is analogous to, but a subset/simplification of, https://gitlab.com/gitlab-org/gitlab-runner/-/blob/main/common/variables.go. This includes things like expanding variables and writing file-type variables to file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Prepare

func Prepare(pjob *proto.Job, tmpPath string) (map[string]string, error)

Types

type Variable

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

func (*Variable) File

func (v *Variable) File() bool

func (*Variable) Key

func (v *Variable) Key() string

func (*Variable) Masked

func (v *Variable) Masked() bool

func (*Variable) Value

func (v *Variable) Value() string

File type variables return the full path to the file instead of the value.

func (*Variable) Write

func (v *Variable) Write() error

type Variables

type Variables []Variable

func New

func New(vars []*proto.Variable, tmpPath string) Variables

func (*Variables) Write

func (vs *Variables) Write() error

Jump to

Keyboard shortcuts

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