bbv1

package
v0.0.0-...-7662601 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package bbv1 contains legacy support for Buildbucket v1 naming conventions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BucketNameToV2

func BucketNameToV2(v1Bucket string) (project string, bucket string)

BucketNameToV2 converts a v1 Bucket name to the v2 constituent parts. The difference between the bucket name is that v2 uses short names, for example: v1: luci.chromium.try v2: try "luci" is dropped, "chromium" is recorded as the project, "try" is the name. If the bucket does not conform to this convention, or if it is not a luci bucket, then this return and empty string for both project and bucket.

func FormatBuildAddress

func FormatBuildAddress(id int64, bucket, builder string, number int) string

FormatBuildAddress returns a value for TagBuildAddress tag. If number is positive, returns "<bucket>/<builder>/<number>", otherwise returns "<id>"

See also ParseBuildAddress.

func ParseBuildAddress

func ParseBuildAddress(address string) (id int64, project, bucket, builder string, number int, err error)

ParseBuildAddress parses a value of a TagBuildAddress tag. See also FormatBuildAddress.

If id is non-zero, project, bucket and builder are zero. If bucket is non-zero, id is zero.

func ProjectFromBucket

func ProjectFromBucket(bucket string) string

ProjectFromBucket tries to retrieve project id from bucket name. Returns "" on failure.

Types

This section is empty.

Jump to

Keyboard shortcuts

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