go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/deploy/api/modelpb/artifact.proto (about) 1 // Copyright 2022 The LUCI Authors. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 syntax = "proto3"; 16 17 package deploy.model; 18 19 option go_package = "go.chromium.org/luci/deploy/api/modelpb"; 20 21 import "google/protobuf/timestamp.proto"; 22 23 24 // Identifier of an artifact version. 25 message ArtifactID { 26 // Artifact kind. 27 enum Kind { 28 KIND_UNSPECIFIED = 0; 29 30 GAE_TARBALL = 1; // a tarball with GAE code built by cloudbuildhelper 31 DOCKER_IMAGE = 2; // a docker image 32 } 33 Kind kind = 1; 34 // Name of the artifact, e.g. a tarball path or container image name. 35 string name = 2; 36 // Its version label, e.g. "47712-fe5d339". 37 string version = 3; 38 } 39 40 41 // Metadata about an artifact version. 42 // 43 // Immutable. 44 message Artifact { 45 // Its full ID (including version). 46 ArtifactID id = 1; 47 // Artifact URL in the storage, the format depends on the artifact kind. 48 string location = 2; 49 // Its digest as "<algo>:<hex>". 50 string digest = 3; 51 // When it was published to the IaC repository the first time. 52 google.protobuf.Timestamp published = 4; 53 // Reference to the source code the artifact was built from, for change logs. 54 repeated ArtifactSource sources = 5; 55 // Links to logs and UI pages related to the artifact. 56 ArtifactLinks links = 6; 57 } 58 59 60 // Reference to the source code to calculate change logs. 61 // 62 // It is not a full manifest, just "interesting" directories worthy of inclusion 63 // in the change log. 64 message ArtifactSource { 65 // Full git repository URL. 66 string repository = 1; 67 // Git revision. 68 string revision = 2; 69 // List of the directories inside this repo with sources to include. 70 repeated string sources = 3; 71 } 72 73 74 // Links to human-readable logs and UI pages related to the artifact. 75 // 76 // All are optional. 77 message ArtifactLinks { 78 // Link to where the artifact is defined (e.g. its build configs). 79 string definition = 1; 80 // Link to view the artifact via its storage UI (e.g. GCR Cloud Console link). 81 string view = 2; 82 // Link to the buildbucket build that produced this artifact. 83 string buildbucket = 3; 84 // Link to the cloudbuild build that produced this artifact. 85 string cloudbuild = 4; 86 }