devops

package
v0.4.0-alpha1 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogError

func LogError(msg string, a ...any)

func LogWarning

func LogWarning(msg string, a ...any)

func PublishArtifact

func PublishArtifact(folder string, name string, source string) error

PublishArtifact publishes an artifact to Azure DevOps.

If folder is not an empty string, the artifact will be published inside of the specified folder. If folder is an empty string, the artifact will be published at the root level.

Returns an error if the artifact name or source is empty.

This function DOES NOT BLOCK, it only produces the logging command to upload the artifact. The actual upload is handled by Azure DevOps after the command is emitted. The uploaded file MUST be kept available at the source path until the end of the job.

Expectations on the caller:

  • Check that this function is only called when running in Azure DevOps context.
  • Ensure that the source path exists, is accessible, and is a regular file.
  • Handle any errors returned by this function appropriately.

func SetProgress

func SetProgress[T float64 | int](progress T)

SetProgress sets the progress percentage for a task.

If an int is provided, it is interpreted as a percentage (0-100). If a float64 is provided, it is interpreted as a fraction (0.0-1.0) and will be multiplied by 100.

Types

type Group

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

Group type. It MUST have a non-zero size to ensure unique pointers.

func OpenGroup

func OpenGroup(name string) *Group

Opens a new group and adds it to the stack.

func (*Group) Close

func (g *Group) Close()

Closes the group and closes+removes all groups above it from the stack (aka subgroups).

Jump to

Keyboard shortcuts

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