Documentation ¶
Index ¶
- Constants
- Variables
- func ANGLECodeGeneration(ctx context.Context, env []string, client *http.Client, parentRepoDir string, ...) error
- func ANGLERollChromium(ctx context.Context, env []string, _ *http.Client, parentRepoDir string, ...) error
- func AddPreUploadStepForTesting(s PreUploadStep) config.PreUploadStep
- func AngleGnToBp(ctx context.Context, env []string, client *http.Client, parentRepoDir string, ...) error
- func ApplyExternalChangeGithubFunc() git_common.ApplyExternalChangeFunc
- func ChromiumRollWebGPUCTS(ctx context.Context, env []string, client *http.Client, parentRepoDir string, ...) error
- func CreateNewGerritRoll(ctx context.Context, g gerrit.GerritInterface, ...) (int64, error)
- func FlutterLicenseScripts(ctx context.Context, _ []string, _ *http.Client, parentRepoDir string, ...) error
- func FlutterLicenseScriptsForDart(ctx context.Context, _ []string, _ *http.Client, parentRepoDir string, ...) error
- func FlutterLicenseScriptsForFuchsia(ctx context.Context, _ []string, _ *http.Client, parentRepoDir string, ...) error
- func GenericPreUploadStep(ctx context.Context, cfg *config.PreUploadConfig, env []string, ...) error
- func GetDEPSCheckoutPath(c *config.DEPSLocalParentConfig, workdir string) (string, error)
- func GitCheckoutUploadGerritRollFunc(g gerrit.GerritInterface) git_common.UploadRollFunc
- func GitCheckoutUploadGithubRollFunc(githubClient *github.GitHub, userName, rollerName, forkRepoURL string) git_common.UploadRollFunc
- func GoGenerateCipd(ctx context.Context, _ []string, client *http.Client, parentRepoDir string, ...) error
- func NewCopy(ctx context.Context, cfg *config.CopyParentConfig, reg *config_vars.Registry, ...) (*gitilesParent, error)
- func NewFreeTypeParent(ctx context.Context, c *config.FreeTypeParentConfig, reg *config_vars.Registry, ...) (*gitilesParent, error)
- func NewGitilesFile(ctx context.Context, c *config.GitilesParentConfig, reg *config_vars.Registry, ...) (*gitilesParent, error)
- func NewGoModGerritParent(ctx context.Context, c *config.GoModGerritParentConfig, ...) (*goModParent, error)
- func NewGoModParent(ctx context.Context, c *config.GoModParentConfig, reg *config_vars.Registry, ...) (*goModParent, error)
- func SkiaGnToBp(ctx context.Context, env []string, client *http.Client, parentRepoDir string, ...) error
- func TrainInfra(ctx context.Context, env []string, client *http.Client, parentRepoDir string, ...) error
- func UpdateBoringSSL(ctx context.Context, env []string, client *http.Client, parentRepoDir string, ...) error
- func UpdateFlutterDepsForDart(ctx context.Context, env []string, _ *http.Client, parentRepoDir string, ...) error
- func VulkanDepsUpdateCommitMessage(ctx context.Context, env []string, _ *http.Client, parentRepoDir string, ...) error
- type GitCheckoutParent
- func NewDEPSLocal(ctx context.Context, c *config.DEPSLocalParentConfig, ...) (*GitCheckoutParent, error)
- func NewDEPSLocalGerrit(ctx context.Context, c *config.DEPSLocalGerritParentConfig, ...) (*GitCheckoutParent, error)
- func NewDEPSLocalGitHub(ctx context.Context, c *config.DEPSLocalGitHubParentConfig, ...) (*GitCheckoutParent, error)
- func NewGitCheckout(ctx context.Context, c *config.GitCheckoutParentConfig, ...) (*GitCheckoutParent, error)
- func NewGitCheckoutGerrit(ctx context.Context, c *config.GitCheckoutGerritParentConfig, ...) (*GitCheckoutParent, error)
- func NewGitCheckoutGithub(ctx context.Context, c *config.GitCheckoutGitHubParentConfig, ...) (*GitCheckoutParent, error)
- func NewGitCheckoutGithubFile(ctx context.Context, c *config.GitCheckoutGitHubFileParentConfig, ...) (*GitCheckoutParent, error)
- type Parent
- type PreUploadStep
Constants ¶
const ( // FtReadmePath is the path to the FreeType readme file. FtReadmePath = "third_party/freetype/README.chromium" // FtIncludeSrc is the includes directory in the child repo. FtIncludeSrc = "include" // FtIncludeDest is the includes directory in the parent repo. FtIncludeDest = "third_party/freetype/include/freetype-custom" )
const (
GClient = "gclient.py"
)
Variables ¶
var ( // FtIncludesToMerge are header files which should be merged when rolling. FtIncludesToMerge = []string{ "freetype/config/ftoption.h", "freetype/config/public-macros.h", } )
var ( // REGitHubForkRepoURL is a regular expression which matches a GitHub fork // repo URL. REGitHubForkRepoURL = regexp.MustCompile(`^(git@github.com:|file:///)(.*)/(.*?)(\.git)?$`) )
Functions ¶
func ANGLECodeGeneration ¶
func ANGLECodeGeneration(ctx context.Context, env []string, client *http.Client, parentRepoDir string, from *revision.Revision, to *revision.Revision) error
ANGLECodeGeneration runs the ANGLE code generation script.
func ANGLERollChromium ¶
func ANGLERollChromium(ctx context.Context, env []string, _ *http.Client, parentRepoDir string, from *revision.Revision, to *revision.Revision) error
ANGLERollChromium runs the ANGLE roll_chromium_deps.py script.
func AddPreUploadStepForTesting ¶
func AddPreUploadStepForTesting(s PreUploadStep) config.PreUploadStep
AddPreUploadStepForTesting adds the given PreUploadStep to the global registry to be used for testing. Returns a unique name for the step. Not safe to be used concurrently with GetPreUploadStep(s).
func AngleGnToBp ¶
func AngleGnToBp(ctx context.Context, env []string, client *http.Client, parentRepoDir string, from *revision.Revision, to *revision.Revision) error
AngleGnToBp runs Angle's scripts to roll into Android.
func ApplyExternalChangeGithubFunc ¶
func ApplyExternalChangeGithubFunc() git_common.ApplyExternalChangeFunc
ApplyExternalChangeGithubFunc returns a ApplyExternalChangeFunc which handles external change Ids for github checkouts.
func ChromiumRollWebGPUCTS ¶
func ChromiumRollWebGPUCTS(ctx context.Context, env []string, client *http.Client, parentRepoDir string, from *revision.Revision, to *revision.Revision) error
ChromiumRollWebGPUCTS updates the list of Typescript sources used to compile the CTS, and it regenerates the list of WPT variants.
func CreateNewGerritRoll ¶
func CreateNewGerritRoll(ctx context.Context, g gerrit.GerritInterface, project, branch, commitMsg, baseCommit string, changes map[string]string, emails []string, dryRun bool) (int64, error)
CreateNewGerritRoll uploads a Gerrit CL with the given changes and returns the issue number or any error which occurred.
func FlutterLicenseScripts ¶
func FlutterLicenseScripts(ctx context.Context, _ []string, _ *http.Client, parentRepoDir string, from *revision.Revision, to *revision.Revision) error
FlutterLicenseScripts runs the flutter license scripts as described in https://bugs.chromium.org/p/skia/issues/detail?id=7730#c6 and in https://github.com/flutter/engine/blob/master/tools/licenses/README.md
func FlutterLicenseScriptsForDart ¶
func FlutterLicenseScriptsForDart(ctx context.Context, _ []string, _ *http.Client, parentRepoDir string, from *revision.Revision, to *revision.Revision) error
FlutterLicenseScriptsForDart runs the flutter license scripts for dart.
func FlutterLicenseScriptsForFuchsia ¶
func FlutterLicenseScriptsForFuchsia(ctx context.Context, _ []string, _ *http.Client, parentRepoDir string, from *revision.Revision, to *revision.Revision) error
FlutterLicenseScriptsForFuchsia runs the flutter license scripts for fuchsia.
func GenericPreUploadStep ¶
func GenericPreUploadStep(ctx context.Context, cfg *config.PreUploadConfig, env []string, client *http.Client, parentRepoDir string, from *revision.Revision, to *revision.Revision) error
GenericPreUploadStep runs a pre-upload step as specified by the given config.
func GetDEPSCheckoutPath ¶
func GetDEPSCheckoutPath(c *config.DEPSLocalParentConfig, workdir string) (string, error)
GetDEPSCheckoutPath returns the path to the checkout within the workdir, using the given DEPSLocalConfig.
func GitCheckoutUploadGerritRollFunc ¶
func GitCheckoutUploadGerritRollFunc(g gerrit.GerritInterface) git_common.UploadRollFunc
GitCheckoutUploadGerritRollFunc returns a GitCheckoutUploadRollFunc which uploads a CL to Gerrit.
func GitCheckoutUploadGithubRollFunc ¶
func GitCheckoutUploadGithubRollFunc(githubClient *github.GitHub, userName, rollerName, forkRepoURL string) git_common.UploadRollFunc
GitCheckoutUploadGithubRollFunc returns a UploadRollFunc which uploads a CL to Github.
func GoGenerateCipd ¶
func GoGenerateCipd(ctx context.Context, _ []string, client *http.Client, parentRepoDir string, from *revision.Revision, to *revision.Revision) error
GoGenerateCipd runs "go generate" in go/cipd.
func NewCopy ¶
func NewCopy(ctx context.Context, cfg *config.CopyParentConfig, reg *config_vars.Registry, client *http.Client, serverURL, workdir, userName, userEmail string, dep child.Child) (*gitilesParent, error)
NewCopy returns a Parent implementation which copies the Child into itself. It uses a local git checkout and uploads changes to Gerrit.
func NewFreeTypeParent ¶
func NewFreeTypeParent(ctx context.Context, c *config.FreeTypeParentConfig, reg *config_vars.Registry, workdir string, client *http.Client, serverURL string) (*gitilesParent, error)
NewFreeTypeParent returns a Parent instance which rolls FreeType.
func NewGitilesFile ¶
func NewGitilesFile(ctx context.Context, c *config.GitilesParentConfig, reg *config_vars.Registry, client *http.Client, serverURL string) (*gitilesParent, error)
NewGitilesFile returns a Parent implementation which uses Gitiles to roll a dependency.
func NewGoModGerritParent ¶
func NewGoModGerritParent(ctx context.Context, c *config.GoModGerritParentConfig, reg *config_vars.Registry, client *http.Client, workdir string, cr codereview.CodeReview) (*goModParent, error)
NewGoModGerritParent returns a Parent which updates go.mod and uploads CLs to Gerrit.
func NewGoModParent ¶
func NewGoModParent(ctx context.Context, c *config.GoModParentConfig, reg *config_vars.Registry, client *http.Client, workdir string, cr codereview.CodeReview, uploadRoll autoroll_git_common.UploadRollFunc) (*goModParent, error)
NewGoModParent returns a Parent which updates go.mod.
func SkiaGnToBp ¶
func SkiaGnToBp(ctx context.Context, env []string, client *http.Client, parentRepoDir string, from *revision.Revision, to *revision.Revision) error
SkiaGnToBp runs Skia's gn_to_bp.py script to roll into Android.
func TrainInfra ¶
func TrainInfra(ctx context.Context, env []string, client *http.Client, parentRepoDir string, from *revision.Revision, to *revision.Revision) error
TrainInfra trains the infra expectations.
func UpdateBoringSSL ¶
func UpdateBoringSSL(ctx context.Context, env []string, client *http.Client, parentRepoDir string, _, _ *revision.Revision) error
UpdateBoringSSL runs a script to generate files for BoringSSL.
func UpdateFlutterDepsForDart ¶
func UpdateFlutterDepsForDart(ctx context.Context, env []string, _ *http.Client, parentRepoDir string, from *revision.Revision, to *revision.Revision) error
UpdateFlutterDepsForDart runs the create_updated_flutter_deps.py for Dart in Flutter. See https://bugs.chromium.org/p/skia/issues/detail?id=8437#c18 and https://bugs.chromium.org/p/skia/issues/detail?id=8437#c21 for context.
Types ¶
type GitCheckoutParent ¶
type GitCheckoutParent struct { *git_common.Checkout // contains filtered or unexported fields }
GitCheckoutParent is a base for implementations of Parent which use a local Git checkout.
func NewDEPSLocal ¶
func NewDEPSLocal(ctx context.Context, c *config.DEPSLocalParentConfig, reg *config_vars.Registry, client *http.Client, serverURL, workdir string, cr codereview.CodeReview, uploadRoll autoroll_git_common.UploadRollFunc, applyExternalChangeFunc autoroll_git_common.ApplyExternalChangeFunc) (*GitCheckoutParent, error)
NewDEPSLocal returns a Parent which uses a local checkout and DEPS to manage dependencies.
func NewDEPSLocalGerrit ¶
func NewDEPSLocalGerrit(ctx context.Context, c *config.DEPSLocalGerritParentConfig, reg *config_vars.Registry, client *http.Client, serverURL, workdir, rollerName string, cr codereview.CodeReview) (*GitCheckoutParent, error)
NewDEPSLocalGerrit returns a DEPSLocal parent which creates CLs in Gerrit.
func NewDEPSLocalGitHub ¶
func NewDEPSLocalGitHub(ctx context.Context, c *config.DEPSLocalGitHubParentConfig, reg *config_vars.Registry, client *http.Client, serverURL, workdir, rollerName string, cr codereview.CodeReview) (*GitCheckoutParent, error)
NewDEPSLocalGitHub returns a DEPSLocal parent which creates GitHub pull requests.
func NewGitCheckout ¶
func NewGitCheckout(ctx context.Context, c *config.GitCheckoutParentConfig, reg *config_vars.Registry, workdir string, cr codereview.CodeReview, co git.Checkout, createRoll git_common.CreateRollFunc, uploadRoll git_common.UploadRollFunc) (*GitCheckoutParent, error)
NewGitCheckout returns a base for implementations of Parent which use a local checkout to create changes.
func NewGitCheckoutGerrit ¶
func NewGitCheckoutGerrit(ctx context.Context, c *config.GitCheckoutGerritParentConfig, reg *config_vars.Registry, client *http.Client, serverURL, workdir, rollerName string, cr codereview.CodeReview) (*GitCheckoutParent, error)
NewGitCheckoutGerrit returns an implementation of Parent which uses a local git checkout and uploads pull requests to Github.
func NewGitCheckoutGithub ¶
func NewGitCheckoutGithub(ctx context.Context, c *config.GitCheckoutGitHubParentConfig, reg *config_vars.Registry, serverURL, workdir, rollerName string, cr codereview.CodeReview, createRoll git_common.CreateRollFunc) (*GitCheckoutParent, error)
NewGitCheckoutGithub returns an implementation of Parent which uses a local git checkout and uploads pull requests to Github.
func NewGitCheckoutGithubFile ¶
func NewGitCheckoutGithubFile(ctx context.Context, c *config.GitCheckoutGitHubFileParentConfig, reg *config_vars.Registry, client *http.Client, serverURL, workdir, rollerName string, cr codereview.CodeReview) (*GitCheckoutParent, error)
NewGitCheckoutGithubFile returns a Parent which uses a local checkout and a version file (eg. DEPS) to manage dependencies.
type Parent ¶
type Parent interface { // Update returns the pinned version of the dependency at the most // recent revision of the Parent. For implementations which use local // checkouts, this implies a sync. Update(context.Context) (string, error) // CreateNewRoll uploads a CL which updates the pinned version of the // dependency to the given Revision. CreateNewRoll(ctx context.Context, from, to *revision.Revision, rolling []*revision.Revision, emails []string, dryRun bool, commitMsg string) (int64, error) }
Parent represents a git repo (or other destination) which depends on a Child and is capable of producing rolls.
type PreUploadStep ¶
type PreUploadStep func(context.Context, []string, *http.Client, string, *revision.Revision, *revision.Revision) error
PreUploadStep is a function to be run after the roll is performed but before a CL is uploaded. The string slice parameter is the set of environment variables which should be used by the pre-upload step. The http.Client should be authenticated. The string parameter is the absolute path to the directory of the parent repo.
func GetGenericPreUploadStep ¶
func GetGenericPreUploadStep(cfg *config.PreUploadConfig) PreUploadStep
GetGenericPreUploadStep returns the generic pre-upload step using the given config.
func GetPreUploadStep ¶
func GetPreUploadStep(s config.PreUploadStep) (PreUploadStep, error)
GetPreUploadStep returns the PreUploadStep with the given name.
func GetPreUploadSteps ¶
func GetPreUploadSteps(steps []config.PreUploadStep, generic *config.PreUploadConfig) ([]PreUploadStep, error)
GetPreUploadSteps returns the PreUploadSteps with the given names.