harness

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ErrorMessageKey is the key used to retrieve or store the error message content.
	ErrorMessageKey = "ERROR_MESSAGE"

	// ErrorCodeKey is the key used to identify the specific error code associated with an error.
	ErrorCodeKey = "ERROR_CODE"

	// ErrorCategoryKey is the key used to classify the category of the error, which can help in grouping similar types of errors.
	ErrorCategoryKey = "ERROR_CATEGORY"

	// MetadataFile is the key for the file that stores metadata associated with an error, such as details about the error's source or context.
	MetadataFile = "ERROR_METADATA_FILE"

	// DroneOutputFile is the key for the file where outputs can be exported and utilized in the subsequent steps in Harness CI pipeline.
	DroneOutputFile = "DRONE_OUTPUT"

	// HarnessOutputSecretFile is the key for the file where secrets can be exported and utilized in the subsequent steps in Harness CI pipeline.
	HarnessOutputSecretFile = "HARNESS_OUTPUT_SECRET_FILE"
)

Variables

This section is empty.

Functions

func DeleteOutput added in v1.0.6

func DeleteOutput(name string) error

DeleteOutput removes an output from the file entirely.

func DeleteSecret

func DeleteSecret(name string) error

DeleteSecret removes a secret from the file entirely.

func SetError

func SetError(message, code, category string) error

SetError sets the error message and error code, writing them to the CI_ERROR_METADATA file SetError sets the error message, error code, and error category, writing them to the CI_ERROR_METADATA file

func SetOutput added in v1.0.6

func SetOutput(name, value string) error

SetOutput sets a new secret by adding it to the DRONE_OUTPUT file

func SetSecret

func SetSecret(name, value string) error

SetSecret sets a new secret by adding it to the HARNESS_OUTPUT_SECRET_FILE file

func UpdateOutput added in v1.0.6

func UpdateOutput(name, value string) error

UpdateOutput overwrites the value of an existing output.

func UpdateSecret

func UpdateSecret(name, value string) error

UpdateSecret overwrites the value of an existing secret.

func WriteEnvToOutputFile added in v1.0.6

func WriteEnvToOutputFile(envVar, key, value string) error

WriteEnvToOutputFile writes a key-value pair to the specified file, determined by an environment variable

Types

This section is empty.

Jump to

Keyboard shortcuts

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