blob: de43aae5685e53e536384c98e17911b30c0d935c [file] [log] [blame]
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
syntax = "proto3";
package recipes.infra.gae_tarball_uploader;
// Input properties recognized by 'infra/gae_tarball_uploader' recipe.
//
// Next id: 9.
message Inputs {
// Project describes what code to checkout.
enum Project {
PROJECT_UNDEFINED = 0;
PROJECT_INFRA = 1; // checkout infra solution
PROJECT_INFRA_INTERNAL = 2; // checkout infra_internal solution
PROJECT_GIT_REPO = 3; // checkout a standalone git repository
}
// Project with the source code to checkout. Required.
Project project = 1;
// Describes a standalone git repo to checkout when using PROJECT_GIT_REPO.
message GitRepo {
string url = 1; // https:// git repo URL
string go_version_file = 2; // path to a file with Go version
string nodejs_version_file = 3; // path to a file with Node.js version
}
GitRepo git_repo = 5;
// What instance of infrastructure to use, e.g. dev or prod.
//
// Will be passed as '-infra' flag to 'cloudbuildhelper'. The service account
// running the build should be in the corresponding ACLs.
//
// Required.
string infra = 2;
// A path(s) within the checkout to a directory with *.yaml files (or *.yaml
// files themselves) to discover and build, e.g. 'infra/build/gae/infra' or
// 'infra/build/gae/infra/target.yaml'.
//
// Directories will be listed recursively.
//
// Required.
repeated string manifests = 3;
// If present, enables auto-rolling of built tarballs into a git repository
// with pinned tarballs.
//
// Each tarball in this repository is represented by a directory (matching its
// name in the manifest YAML) under 'tarballs' directory. Each version is
// represented by a file <version>.json inside the tarball directory.
//
// If at least one version file was added, runs `scripts/prune_tarballs.py`
// from this repo to delete older unused versions.
message RollInto {
// Repository to roll built tarballs into (usually infradata/gae).
string repo_url = 1;
// Emails of whom to put into TBR= line in the CL.
repeated string tbr = 2;
// True to actually commit via CQ, False just to upload a pending CL.
bool commit = 3;
}
RollInto roll_into = 4;
// Restrictions limit what can be targeted by manifests.
//
// This is useful when the builder operates over partially untrusted repos
// to limit what they can reach.
//
// If some particular set is empty, the corresponding property is considered
// unrestricted.
message Restrictions {
repeated string targets = 1; // prefixes of allowed target names
repeated string build_steps = 2; // kinds of allowed build steps
repeated string storage = 3; // prefixes of allowed gs:// destinations
}
Restrictions restrictions = 6;
// A template for the version label string.
//
// It is a Python format string, with following placeholders available:
//
// {rev}: a string with the short git revision hash.
// {ref}: a string with the last component of the commit ref (e.g. 'main').
// {cp}: an integer with the commit position number.
// {date}: "YYYY.MM.DD" UTC date when the build started.
// {build}: an integer build number or 0 if not available.
//
// The default is `{cp}-{rev}`.
string version_label_template = 7;
// A list of prefixes of git refs allowed in the input gitiles commit.
//
// Useful for release branch builders configuration as a precaution against
// building something other than a release branch.
//
// If empty, defaults to "everything is allowed".
repeated string allowed_refs = 8;
}