Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(620)

Side by Side Diff: recipe_engine/source_manifest.proto

Issue 2998523002: Add deployment manifest proto to recipe_engine. (Closed)
Patch Set: comment on fetch_url Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | recipe_engine/source_manifest_pb2.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file.
4
5 // Recompile with protoc 3.1.0+:
6 // cd recipe_engine && protoc deployment_manifest.proto --python_out=.
7
8 syntax = "proto3";
9
10 // A Manifest attempts to make an accurate accounting of source/data directories
11 // during the execution of a LUCI task.
12 //
13 // These directories are primarially in the form of e.g. git checkouts of
14 // source, but also include things like isolated hashes and CIPD package
15 // deployments. In the future, other deployment forms may be supported (like
16 // other SCMs).
17 //
18 // The purpose of this manifest is so that other parts of the LUCI stack (e.g.
19 // Milo) can work with the descripitons of this deployed data as a first-class
20 // citizen. Initially this Manifest will be used to allow Milo to display diffs
21 // between jobs, but it will also be useful for tools and humans to get a
22 // record of exactly what data went into this LUCI task.
23 //
24 // Source Manifests can be emitted from recipes using the
25 // 'recipe_engine/manifest' module.
26 message Manifest {
27 // Version will increment on backwards-incompatible changes only. Backwards
28 // compatible changes will not alter this version number.
29 //
30 // Currently, the only valid version number is 0.
31 int32 version = 1;
32
33 message GitCheckout {
34 // The canonicalized URL of the original repo that is considered the “source
35 // of truth” for the source code. Ex.
36 // https://chromium.googlesource.com/chromium/tools/build.git
37 // https://github.com/luci/recipes-py
38 string repo_url = 1;
39
40 // If different from repo_url, this can be the URL of the repo that the sour ce
41 // was actually fetched from (i.e. a mirror). Ex.
42 // https://chromium.googlesource.com/external/github.com/luci/recipes-py
43 //
44 // If this is empty, it's presumed to be equal to repo_url.
45 string fetch_url = 2;
46
47 // The fully resolved revision (commit hash) of the source. Ex.
48 // 3617b0eea7ec74b8e731a23fed2f4070cbc284c4
49 //
50 // Note that this is the raw revision bytes, not their hex-encoded form.
51 bytes revision = 3;
52
53 // The ref that the task used to resolve the revision of the source (if any) . Ex.
54 // refs/heads/master
55 // refs/changes/04/511804/4
56 //
57 // This should always be a ref on the hosted repo (not any local alias
58 // like 'refs/remotes/...').
59 //
60 // This should always be an absolute ref (i.e. starts with 'refs/'). An
61 // example of a non-absolute ref would be 'master'.
62 string tracking_ref = 4;
63 }
64
65 message CIPDPackage {
66 // The canonicalized URL of the CIPD server which provided the package. Ex.
67 // https://chrome-infra-packages.appspot.com
68 string cipd_server_url = 1;
69
70 // The fully resolved CIPD package name that was deployed. Ex.
71 // infra/tools/luci/led/linux-amd64
72 string cipd_package_name = 2;
73
74 // The package pattern that was given to the CIPD client (if known). Ex.
75 // infra/tools/luci/led/${platform}
76 string cipd_package_pattern = 3;
77
78 // The fully resolved instance ID of the deployed package. Ex.
79 // 0cfafb3a705bd8f05f86c6444ff500397fbb711c
80 //
81 // Note that this is the raw instance_id bytes, not their hex-encoded form.
82 bytes cipd_instance_id = 4;
83
84 // The unresolved version ID of the deployed package (if known). Ex.
85 // git_revision:aaf3a2cfccc227b5141caa1b6b3502c9907d7420
86 // latest
87 string cipd_version = 5;
88 }
89
90 message Isolated {
91 // The canonicalized URL of the isolated server which hosts the isolated.
92 // Ex.
93 // https://isolateserver.appspot.com
94 string isolated_server_url = 1;
95
96 // The namespace of the isolated document. Ex.
97 // default-gzip
98 string namespace = 2;
99
100 // The hash of the isolated document. Ex.
101 // 62a7df62ea122380afb306bb4d9cdac1bc7e9a96
102 //
103 // Note that this is the raw hash bytes, not their hex-encoded form.
104 bytes hash = 3;
105 }
106
107 // A Directory contains one or more descriptions of deployed artifacts. Note
108 // that due to the practical nature of jobs on bots, it may be the case that
109 // a given directory contains e.g. a git checkout and multiple cipd packages.
110 message Directory {
111 GitCheckout git_checkout = 1;
112
113 repeated CIPDPackage cipd_package = 2;
114 repeated Isolated isolated = 3;
115 }
116
117 // Map of local file system directory path (with forward slashes) to
118 // a Directory message containing one or more deployments.
119 //
120 // The local path is relative to some job-specific root. This should be used
121 // for informational/display/organization purposes, and should not be used as
122 // a global primary key. i.e. if you depend on chromium/src.git being in
123 // a folder called “src”, I will find you and make really angry faces at you
124 // until you change it...(╬ಠ益ಠ). Instead, implementations should consider
125 // indexing by e.g. git repository URL or cipd package name as more better
126 // primary keys.
127 map<string, Directory> directories = 2;
128 }
OLDNEW
« no previous file with comments | « no previous file | recipe_engine/source_manifest_pb2.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698