...

Package ci

import "edge-infra.dev/hack/build/ci"
Overview
Index
Subdirectories

Overview ▾

Variables

var (
    // GoDepsFile is the path to the file where we store the generated Bazel
    // dependencies for our repository.
    // TODO: integrate with `hack`
    GoDepsFile = "hack/deps/go.bzl"

    RepoRoot     string
    ManifestsDir string
)

func BuildInfo

func BuildInfo(rc bool, repoRoot string) (*build.Version, string, error)

func FilesToBazelLabels

func FilesToBazelLabels(l logr.Logger, files []string) (string, error)

func GitDiffToBazelLabels

func GitDiffToBazelLabels(l logr.Logger, session *sh.Shell, commitRange string) (string, error)

GitDiffToBazelLabels takes a commit range and queries bazel for the corresponding files. Writes progress to terminal, intended to be used in scripts / CLIs

func QuerySet

func QuerySet(l logr.Logger, includeManualTags bool, set string, args ...string) ([]string, error)

QuerySet runs a bazel query on the passed in set

func RDeps

func RDeps(excludeManualTags bool, set string) string

RDeps builds the query string representing all reverse dependencies (i.e., what build or test targets depend on these labels?) of the provided Bazel set(x).

This is intended to be used where the set is a list of file names to determine what to build/test/publish based on the changed files, but can be used with any labels.

This query will exclude any build targets marked as "manual".

This function is used to build our rdeps queries in consistent ways for querying build, test, and container_push targets, as well as dry-mode outputs which do not want to actually exercise queries.

Subdirectories

Name Synopsis
..
leaf
cmd
pkg
go