/
cloudbuild.pb.go
2801 lines (2533 loc) · 105 KB
/
cloudbuild.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/devtools/cloudbuild/v1/cloudbuild.proto
/*
Package cloudbuild is a generated protocol buffer package.
It is generated from these files:
google/devtools/cloudbuild/v1/cloudbuild.proto
It has these top-level messages:
RetryBuildRequest
RunBuildTriggerRequest
StorageSource
RepoSource
Source
BuiltImage
BuildStep
Volume
Results
ArtifactResult
Build
Artifacts
TimeSpan
BuildOperationMetadata
SourceProvenance
FileHashes
Hash
Secret
CreateBuildRequest
GetBuildRequest
ListBuildsRequest
ListBuildsResponse
CancelBuildRequest
BuildTrigger
CreateBuildTriggerRequest
GetBuildTriggerRequest
ListBuildTriggersRequest
ListBuildTriggersResponse
DeleteBuildTriggerRequest
UpdateBuildTriggerRequest
BuildOptions
*/
package cloudbuild
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/annotations"
import _ "google.golang.org/genproto/googleapis/api/httpbody"
import _ "google.golang.org/genproto/googleapis/cloud/audit"
import google_longrunning "google.golang.org/genproto/googleapis/longrunning"
import google_protobuf4 "github.com/golang/protobuf/ptypes/duration"
import google_protobuf3 "github.com/golang/protobuf/ptypes/empty"
import google_protobuf5 "github.com/golang/protobuf/ptypes/timestamp"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
// Possible status of a build or build step.
type Build_Status int32
const (
// Status of the build is unknown.
Build_STATUS_UNKNOWN Build_Status = 0
// Build or step is queued; work has not yet begun.
Build_QUEUED Build_Status = 1
// Build or step is being executed.
Build_WORKING Build_Status = 2
// Build or step finished successfully.
Build_SUCCESS Build_Status = 3
// Build or step failed to complete successfully.
Build_FAILURE Build_Status = 4
// Build or step failed due to an internal cause.
Build_INTERNAL_ERROR Build_Status = 5
// Build or step took longer than was allowed.
Build_TIMEOUT Build_Status = 6
// Build or step was canceled by a user.
Build_CANCELLED Build_Status = 7
)
var Build_Status_name = map[int32]string{
0: "STATUS_UNKNOWN",
1: "QUEUED",
2: "WORKING",
3: "SUCCESS",
4: "FAILURE",
5: "INTERNAL_ERROR",
6: "TIMEOUT",
7: "CANCELLED",
}
var Build_Status_value = map[string]int32{
"STATUS_UNKNOWN": 0,
"QUEUED": 1,
"WORKING": 2,
"SUCCESS": 3,
"FAILURE": 4,
"INTERNAL_ERROR": 5,
"TIMEOUT": 6,
"CANCELLED": 7,
}
func (x Build_Status) String() string {
return proto.EnumName(Build_Status_name, int32(x))
}
func (Build_Status) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{10, 0} }
// Specifies the hash algorithm, if any.
type Hash_HashType int32
const (
// No hash requested.
Hash_NONE Hash_HashType = 0
// Use a sha256 hash.
Hash_SHA256 Hash_HashType = 1
// Use a md5 hash.
Hash_MD5 Hash_HashType = 2
)
var Hash_HashType_name = map[int32]string{
0: "NONE",
1: "SHA256",
2: "MD5",
}
var Hash_HashType_value = map[string]int32{
"NONE": 0,
"SHA256": 1,
"MD5": 2,
}
func (x Hash_HashType) String() string {
return proto.EnumName(Hash_HashType_name, int32(x))
}
func (Hash_HashType) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{16, 0} }
// Specifies the manner in which the build should be verified, if at all.
type BuildOptions_VerifyOption int32
const (
// Not a verifiable build. (default)
BuildOptions_NOT_VERIFIED BuildOptions_VerifyOption = 0
// Verified build.
BuildOptions_VERIFIED BuildOptions_VerifyOption = 1
)
var BuildOptions_VerifyOption_name = map[int32]string{
0: "NOT_VERIFIED",
1: "VERIFIED",
}
var BuildOptions_VerifyOption_value = map[string]int32{
"NOT_VERIFIED": 0,
"VERIFIED": 1,
}
func (x BuildOptions_VerifyOption) String() string {
return proto.EnumName(BuildOptions_VerifyOption_name, int32(x))
}
func (BuildOptions_VerifyOption) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{30, 0}
}
// Supported VM sizes.
type BuildOptions_MachineType int32
const (
// Standard machine type.
BuildOptions_UNSPECIFIED BuildOptions_MachineType = 0
// Highcpu machine with 8 CPUs.
BuildOptions_N1_HIGHCPU_8 BuildOptions_MachineType = 1
// Highcpu machine with 32 CPUs.
BuildOptions_N1_HIGHCPU_32 BuildOptions_MachineType = 2
)
var BuildOptions_MachineType_name = map[int32]string{
0: "UNSPECIFIED",
1: "N1_HIGHCPU_8",
2: "N1_HIGHCPU_32",
}
var BuildOptions_MachineType_value = map[string]int32{
"UNSPECIFIED": 0,
"N1_HIGHCPU_8": 1,
"N1_HIGHCPU_32": 2,
}
func (x BuildOptions_MachineType) String() string {
return proto.EnumName(BuildOptions_MachineType_name, int32(x))
}
func (BuildOptions_MachineType) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{30, 1} }
// Specifies the behavior when there is an error in the substitution checks.
type BuildOptions_SubstitutionOption int32
const (
// Fails the build if error in substitutions checks, like missing
// a substitution in the template or in the map.
BuildOptions_MUST_MATCH BuildOptions_SubstitutionOption = 0
// Do not fail the build if error in substitutions checks.
BuildOptions_ALLOW_LOOSE BuildOptions_SubstitutionOption = 1
)
var BuildOptions_SubstitutionOption_name = map[int32]string{
0: "MUST_MATCH",
1: "ALLOW_LOOSE",
}
var BuildOptions_SubstitutionOption_value = map[string]int32{
"MUST_MATCH": 0,
"ALLOW_LOOSE": 1,
}
func (x BuildOptions_SubstitutionOption) String() string {
return proto.EnumName(BuildOptions_SubstitutionOption_name, int32(x))
}
func (BuildOptions_SubstitutionOption) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{30, 2}
}
// Specifies the behavior when writing build logs to Google Cloud Storage.
type BuildOptions_LogStreamingOption int32
const (
// Service may automatically determine build log streaming behavior.
BuildOptions_STREAM_DEFAULT BuildOptions_LogStreamingOption = 0
// Build logs should be streamed to Google Cloud Storage.
BuildOptions_STREAM_ON BuildOptions_LogStreamingOption = 1
// Build logs should not be streamed to Google Cloud Storage; they will be
// written when the build is completed.
BuildOptions_STREAM_OFF BuildOptions_LogStreamingOption = 2
)
var BuildOptions_LogStreamingOption_name = map[int32]string{
0: "STREAM_DEFAULT",
1: "STREAM_ON",
2: "STREAM_OFF",
}
var BuildOptions_LogStreamingOption_value = map[string]int32{
"STREAM_DEFAULT": 0,
"STREAM_ON": 1,
"STREAM_OFF": 2,
}
func (x BuildOptions_LogStreamingOption) String() string {
return proto.EnumName(BuildOptions_LogStreamingOption_name, int32(x))
}
func (BuildOptions_LogStreamingOption) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{30, 3}
}
// Specifies a build to retry.
type RetryBuildRequest struct {
// ID of the project.
ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId" json:"project_id,omitempty"`
// Build ID of the original build.
Id string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"`
}
func (m *RetryBuildRequest) Reset() { *m = RetryBuildRequest{} }
func (m *RetryBuildRequest) String() string { return proto.CompactTextString(m) }
func (*RetryBuildRequest) ProtoMessage() {}
func (*RetryBuildRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *RetryBuildRequest) GetProjectId() string {
if m != nil {
return m.ProjectId
}
return ""
}
func (m *RetryBuildRequest) GetId() string {
if m != nil {
return m.Id
}
return ""
}
// Specifies a build trigger to run and the source to use.
type RunBuildTriggerRequest struct {
// ID of the project.
ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId" json:"project_id,omitempty"`
// ID of the trigger.
TriggerId string `protobuf:"bytes,2,opt,name=trigger_id,json=triggerId" json:"trigger_id,omitempty"`
// Source to build against this trigger.
Source *RepoSource `protobuf:"bytes,3,opt,name=source" json:"source,omitempty"`
}
func (m *RunBuildTriggerRequest) Reset() { *m = RunBuildTriggerRequest{} }
func (m *RunBuildTriggerRequest) String() string { return proto.CompactTextString(m) }
func (*RunBuildTriggerRequest) ProtoMessage() {}
func (*RunBuildTriggerRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *RunBuildTriggerRequest) GetProjectId() string {
if m != nil {
return m.ProjectId
}
return ""
}
func (m *RunBuildTriggerRequest) GetTriggerId() string {
if m != nil {
return m.TriggerId
}
return ""
}
func (m *RunBuildTriggerRequest) GetSource() *RepoSource {
if m != nil {
return m.Source
}
return nil
}
// Location of the source in an archive file in Google Cloud Storage.
type StorageSource struct {
// Google Cloud Storage bucket containing the source (see
// [Bucket Name
// Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
Bucket string `protobuf:"bytes,1,opt,name=bucket" json:"bucket,omitempty"`
// Google Cloud Storage object containing the source.
//
// This object must be a gzipped archive file (`.tar.gz`) containing source to
// build.
Object string `protobuf:"bytes,2,opt,name=object" json:"object,omitempty"`
// Google Cloud Storage generation for the object. If the generation is
// omitted, the latest generation will be used.
Generation int64 `protobuf:"varint,3,opt,name=generation" json:"generation,omitempty"`
}
func (m *StorageSource) Reset() { *m = StorageSource{} }
func (m *StorageSource) String() string { return proto.CompactTextString(m) }
func (*StorageSource) ProtoMessage() {}
func (*StorageSource) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *StorageSource) GetBucket() string {
if m != nil {
return m.Bucket
}
return ""
}
func (m *StorageSource) GetObject() string {
if m != nil {
return m.Object
}
return ""
}
func (m *StorageSource) GetGeneration() int64 {
if m != nil {
return m.Generation
}
return 0
}
// Location of the source in a Google Cloud Source Repository.
type RepoSource struct {
// ID of the project that owns the Cloud Source Repository. If omitted, the
// project ID requesting the build is assumed.
ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId" json:"project_id,omitempty"`
// Name of the Cloud Source Repository. If omitted, the name "default" is
// assumed.
RepoName string `protobuf:"bytes,2,opt,name=repo_name,json=repoName" json:"repo_name,omitempty"`
// A revision within the Cloud Source Repository must be specified in
// one of these ways.
//
// Types that are valid to be assigned to Revision:
// *RepoSource_BranchName
// *RepoSource_TagName
// *RepoSource_CommitSha
Revision isRepoSource_Revision `protobuf_oneof:"revision"`
// Directory, relative to the source root, in which to run the build.
//
// This must be a relative path. If a step's `dir` is specified and is an
// absolute path, this value is ignored for that step's execution.
Dir string `protobuf:"bytes,7,opt,name=dir" json:"dir,omitempty"`
}
func (m *RepoSource) Reset() { *m = RepoSource{} }
func (m *RepoSource) String() string { return proto.CompactTextString(m) }
func (*RepoSource) ProtoMessage() {}
func (*RepoSource) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
type isRepoSource_Revision interface {
isRepoSource_Revision()
}
type RepoSource_BranchName struct {
BranchName string `protobuf:"bytes,3,opt,name=branch_name,json=branchName,oneof"`
}
type RepoSource_TagName struct {
TagName string `protobuf:"bytes,4,opt,name=tag_name,json=tagName,oneof"`
}
type RepoSource_CommitSha struct {
CommitSha string `protobuf:"bytes,5,opt,name=commit_sha,json=commitSha,oneof"`
}
func (*RepoSource_BranchName) isRepoSource_Revision() {}
func (*RepoSource_TagName) isRepoSource_Revision() {}
func (*RepoSource_CommitSha) isRepoSource_Revision() {}
func (m *RepoSource) GetRevision() isRepoSource_Revision {
if m != nil {
return m.Revision
}
return nil
}
func (m *RepoSource) GetProjectId() string {
if m != nil {
return m.ProjectId
}
return ""
}
func (m *RepoSource) GetRepoName() string {
if m != nil {
return m.RepoName
}
return ""
}
func (m *RepoSource) GetBranchName() string {
if x, ok := m.GetRevision().(*RepoSource_BranchName); ok {
return x.BranchName
}
return ""
}
func (m *RepoSource) GetTagName() string {
if x, ok := m.GetRevision().(*RepoSource_TagName); ok {
return x.TagName
}
return ""
}
func (m *RepoSource) GetCommitSha() string {
if x, ok := m.GetRevision().(*RepoSource_CommitSha); ok {
return x.CommitSha
}
return ""
}
func (m *RepoSource) GetDir() string {
if m != nil {
return m.Dir
}
return ""
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*RepoSource) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _RepoSource_OneofMarshaler, _RepoSource_OneofUnmarshaler, _RepoSource_OneofSizer, []interface{}{
(*RepoSource_BranchName)(nil),
(*RepoSource_TagName)(nil),
(*RepoSource_CommitSha)(nil),
}
}
func _RepoSource_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*RepoSource)
// revision
switch x := m.Revision.(type) {
case *RepoSource_BranchName:
b.EncodeVarint(3<<3 | proto.WireBytes)
b.EncodeStringBytes(x.BranchName)
case *RepoSource_TagName:
b.EncodeVarint(4<<3 | proto.WireBytes)
b.EncodeStringBytes(x.TagName)
case *RepoSource_CommitSha:
b.EncodeVarint(5<<3 | proto.WireBytes)
b.EncodeStringBytes(x.CommitSha)
case nil:
default:
return fmt.Errorf("RepoSource.Revision has unexpected type %T", x)
}
return nil
}
func _RepoSource_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*RepoSource)
switch tag {
case 3: // revision.branch_name
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeStringBytes()
m.Revision = &RepoSource_BranchName{x}
return true, err
case 4: // revision.tag_name
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeStringBytes()
m.Revision = &RepoSource_TagName{x}
return true, err
case 5: // revision.commit_sha
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeStringBytes()
m.Revision = &RepoSource_CommitSha{x}
return true, err
default:
return false, nil
}
}
func _RepoSource_OneofSizer(msg proto.Message) (n int) {
m := msg.(*RepoSource)
// revision
switch x := m.Revision.(type) {
case *RepoSource_BranchName:
n += proto.SizeVarint(3<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(len(x.BranchName)))
n += len(x.BranchName)
case *RepoSource_TagName:
n += proto.SizeVarint(4<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(len(x.TagName)))
n += len(x.TagName)
case *RepoSource_CommitSha:
n += proto.SizeVarint(5<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(len(x.CommitSha)))
n += len(x.CommitSha)
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// Location of the source in a supported storage service.
type Source struct {
// Location of source.
//
// Types that are valid to be assigned to Source:
// *Source_StorageSource
// *Source_RepoSource
Source isSource_Source `protobuf_oneof:"source"`
}
func (m *Source) Reset() { *m = Source{} }
func (m *Source) String() string { return proto.CompactTextString(m) }
func (*Source) ProtoMessage() {}
func (*Source) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
type isSource_Source interface {
isSource_Source()
}
type Source_StorageSource struct {
StorageSource *StorageSource `protobuf:"bytes,2,opt,name=storage_source,json=storageSource,oneof"`
}
type Source_RepoSource struct {
RepoSource *RepoSource `protobuf:"bytes,3,opt,name=repo_source,json=repoSource,oneof"`
}
func (*Source_StorageSource) isSource_Source() {}
func (*Source_RepoSource) isSource_Source() {}
func (m *Source) GetSource() isSource_Source {
if m != nil {
return m.Source
}
return nil
}
func (m *Source) GetStorageSource() *StorageSource {
if x, ok := m.GetSource().(*Source_StorageSource); ok {
return x.StorageSource
}
return nil
}
func (m *Source) GetRepoSource() *RepoSource {
if x, ok := m.GetSource().(*Source_RepoSource); ok {
return x.RepoSource
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*Source) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _Source_OneofMarshaler, _Source_OneofUnmarshaler, _Source_OneofSizer, []interface{}{
(*Source_StorageSource)(nil),
(*Source_RepoSource)(nil),
}
}
func _Source_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*Source)
// source
switch x := m.Source.(type) {
case *Source_StorageSource:
b.EncodeVarint(2<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.StorageSource); err != nil {
return err
}
case *Source_RepoSource:
b.EncodeVarint(3<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.RepoSource); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("Source.Source has unexpected type %T", x)
}
return nil
}
func _Source_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*Source)
switch tag {
case 2: // source.storage_source
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(StorageSource)
err := b.DecodeMessage(msg)
m.Source = &Source_StorageSource{msg}
return true, err
case 3: // source.repo_source
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(RepoSource)
err := b.DecodeMessage(msg)
m.Source = &Source_RepoSource{msg}
return true, err
default:
return false, nil
}
}
func _Source_OneofSizer(msg proto.Message) (n int) {
m := msg.(*Source)
// source
switch x := m.Source.(type) {
case *Source_StorageSource:
s := proto.Size(x.StorageSource)
n += proto.SizeVarint(2<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *Source_RepoSource:
s := proto.Size(x.RepoSource)
n += proto.SizeVarint(3<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// An image built by the pipeline.
type BuiltImage struct {
// Name used to push the container image to Google Container Registry, as
// presented to `docker push`.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
// Docker Registry 2.0 digest.
Digest string `protobuf:"bytes,3,opt,name=digest" json:"digest,omitempty"`
// Stores timing information for pushing the specified image.
// @OutputOnly
PushTiming *TimeSpan `protobuf:"bytes,4,opt,name=push_timing,json=pushTiming" json:"push_timing,omitempty"`
}
func (m *BuiltImage) Reset() { *m = BuiltImage{} }
func (m *BuiltImage) String() string { return proto.CompactTextString(m) }
func (*BuiltImage) ProtoMessage() {}
func (*BuiltImage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
func (m *BuiltImage) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *BuiltImage) GetDigest() string {
if m != nil {
return m.Digest
}
return ""
}
func (m *BuiltImage) GetPushTiming() *TimeSpan {
if m != nil {
return m.PushTiming
}
return nil
}
// A step in the build pipeline.
type BuildStep struct {
// Required. The name of the container image that will run this particular
// build step.
//
// If the image is available in the host's Docker daemon's cache, it
// will be run directly. If not, the host will attempt to pull the image
// first, using the builder service account's credentials if necessary.
//
// The Docker daemon's cache will already have the latest versions of all of
// the officially supported build steps
// ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)).
// The Docker daemon will also have cached many of the layers for some popular
// images, like "ubuntu", "debian", but they will be refreshed at the time you
// attempt to use them.
//
// If you built an image in a previous build step, it will be stored in the
// host's Docker daemon's cache and is available to use as the name for a
// later build step.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
// A list of environment variable definitions to be used when running a step.
//
// The elements are of the form "KEY=VALUE" for the environment variable "KEY"
// being given the value "VALUE".
Env []string `protobuf:"bytes,2,rep,name=env" json:"env,omitempty"`
// A list of arguments that will be presented to the step when it is started.
//
// If the image used to run the step's container has an entrypoint, the `args`
// are used as arguments to that entrypoint. If the image does not define
// an entrypoint, the first element in args is used as the entrypoint,
// and the remainder will be used as arguments.
Args []string `protobuf:"bytes,3,rep,name=args" json:"args,omitempty"`
// Working directory to use when running this step's container.
//
// If this value is a relative path, it is relative to the build's working
// directory. If this value is absolute, it may be outside the build's working
// directory, in which case the contents of the path may not be persisted
// across build step executions, unless a `volume` for that path is specified.
//
// If the build specifies a `RepoSource` with `dir` and a step with a `dir`,
// which specifies an absolute path, the `RepoSource` `dir` is ignored for
// the step's execution.
Dir string `protobuf:"bytes,4,opt,name=dir" json:"dir,omitempty"`
// Unique identifier for this build step, used in `wait_for` to
// reference this build step as a dependency.
Id string `protobuf:"bytes,5,opt,name=id" json:"id,omitempty"`
// The ID(s) of the step(s) that this build step depends on.
// This build step will not start until all the build steps in `wait_for`
// have completed successfully. If `wait_for` is empty, this build step will
// start when all previous build steps in the `Build.Steps` list have
// completed successfully.
WaitFor []string `protobuf:"bytes,6,rep,name=wait_for,json=waitFor" json:"wait_for,omitempty"`
// Entrypoint to be used instead of the build step image's default entrypoint.
// If unset, the image's default entrypoint is used.
Entrypoint string `protobuf:"bytes,7,opt,name=entrypoint" json:"entrypoint,omitempty"`
// A list of environment variables which are encrypted using a Cloud Key
// Management Service crypto key. These values must be specified in the
// build's `Secret`.
SecretEnv []string `protobuf:"bytes,8,rep,name=secret_env,json=secretEnv" json:"secret_env,omitempty"`
// List of volumes to mount into the build step.
//
// Each volume will be created as an empty volume prior to execution of the
// build step. Upon completion of the build, volumes and their contents will
// be discarded.
//
// Using a named volume in only one step is not valid as it is indicative
// of a mis-configured build request.
Volumes []*Volume `protobuf:"bytes,9,rep,name=volumes" json:"volumes,omitempty"`
// Stores timing information for executing this build step.
// @OutputOnly
Timing *TimeSpan `protobuf:"bytes,10,opt,name=timing" json:"timing,omitempty"`
// Time limit for executing this build step. If not defined, the step has no
// time limit and will be allowed to continue to run until either it completes
// or the build itself times out.
Timeout *google_protobuf4.Duration `protobuf:"bytes,11,opt,name=timeout" json:"timeout,omitempty"`
// Status of the build step. At this time, build step status is only updated
// on build completion; step status is not updated in real-time as the build
// progresses.
// @OutputOnly
Status Build_Status `protobuf:"varint,12,opt,name=status,enum=google.devtools.cloudbuild.v1.Build_Status" json:"status,omitempty"`
}
func (m *BuildStep) Reset() { *m = BuildStep{} }
func (m *BuildStep) String() string { return proto.CompactTextString(m) }
func (*BuildStep) ProtoMessage() {}
func (*BuildStep) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
func (m *BuildStep) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *BuildStep) GetEnv() []string {
if m != nil {
return m.Env
}
return nil
}
func (m *BuildStep) GetArgs() []string {
if m != nil {
return m.Args
}
return nil
}
func (m *BuildStep) GetDir() string {
if m != nil {
return m.Dir
}
return ""
}
func (m *BuildStep) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *BuildStep) GetWaitFor() []string {
if m != nil {
return m.WaitFor
}
return nil
}
func (m *BuildStep) GetEntrypoint() string {
if m != nil {
return m.Entrypoint
}
return ""
}
func (m *BuildStep) GetSecretEnv() []string {
if m != nil {
return m.SecretEnv
}
return nil
}
func (m *BuildStep) GetVolumes() []*Volume {
if m != nil {
return m.Volumes
}
return nil
}
func (m *BuildStep) GetTiming() *TimeSpan {
if m != nil {
return m.Timing
}
return nil
}
func (m *BuildStep) GetTimeout() *google_protobuf4.Duration {
if m != nil {
return m.Timeout
}
return nil
}
func (m *BuildStep) GetStatus() Build_Status {
if m != nil {
return m.Status
}
return Build_STATUS_UNKNOWN
}
// Volume describes a Docker container volume which is mounted into build steps
// in order to persist files across build step execution.
type Volume struct {
// Name of the volume to mount.
//
// Volume names must be unique per build step and must be valid names for
// Docker volumes. Each named volume must be used by at least two build steps.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
// Path at which to mount the volume.
//
// Paths must be absolute and cannot conflict with other volume paths on the
// same build step or with certain reserved volume paths.
Path string `protobuf:"bytes,2,opt,name=path" json:"path,omitempty"`
}
func (m *Volume) Reset() { *m = Volume{} }
func (m *Volume) String() string { return proto.CompactTextString(m) }
func (*Volume) ProtoMessage() {}
func (*Volume) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
func (m *Volume) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Volume) GetPath() string {
if m != nil {
return m.Path
}
return ""
}
// Artifacts created by the build pipeline.
type Results struct {
// Container images that were built as a part of the build.
Images []*BuiltImage `protobuf:"bytes,2,rep,name=images" json:"images,omitempty"`
// List of build step digests, in the order corresponding to build step
// indices.
BuildStepImages []string `protobuf:"bytes,3,rep,name=build_step_images,json=buildStepImages" json:"build_step_images,omitempty"`
// Path to the artifact manifest. Only populated when artifacts are uploaded.
ArtifactManifest string `protobuf:"bytes,4,opt,name=artifact_manifest,json=artifactManifest" json:"artifact_manifest,omitempty"`
// Number of artifacts uploaded. Only populated when artifacts are uploaded.
NumArtifacts int64 `protobuf:"varint,5,opt,name=num_artifacts,json=numArtifacts" json:"num_artifacts,omitempty"`
}
func (m *Results) Reset() { *m = Results{} }
func (m *Results) String() string { return proto.CompactTextString(m) }
func (*Results) ProtoMessage() {}
func (*Results) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
func (m *Results) GetImages() []*BuiltImage {
if m != nil {
return m.Images
}
return nil
}
func (m *Results) GetBuildStepImages() []string {
if m != nil {
return m.BuildStepImages
}
return nil
}
func (m *Results) GetArtifactManifest() string {
if m != nil {
return m.ArtifactManifest
}
return ""
}
func (m *Results) GetNumArtifacts() int64 {
if m != nil {
return m.NumArtifacts
}
return 0
}
// An artifact that was uploaded during a build. This
// is a single record in the artifact manifest JSON file.
type ArtifactResult struct {
// The path of an artifact in a Google Cloud Storage bucket, with the
// generation number. For example,
// `gs://mybucket/path/to/output.jar#generation`.
Location string `protobuf:"bytes,1,opt,name=location" json:"location,omitempty"`
// The file hash of the artifact.
FileHash []*FileHashes `protobuf:"bytes,2,rep,name=file_hash,json=fileHash" json:"file_hash,omitempty"`
}
func (m *ArtifactResult) Reset() { *m = ArtifactResult{} }
func (m *ArtifactResult) String() string { return proto.CompactTextString(m) }
func (*ArtifactResult) ProtoMessage() {}
func (*ArtifactResult) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
func (m *ArtifactResult) GetLocation() string {
if m != nil {
return m.Location
}
return ""
}
func (m *ArtifactResult) GetFileHash() []*FileHashes {
if m != nil {
return m.FileHash
}
return nil
}
// A build resource in the Container Builder API.
//
// At a high level, a `Build` describes where to find source code, how to build
// it (for example, the builder image to run on the source), and where to store
// the built artifacts.
//
// Fields can include the following variables, which will be expanded when the
// build is created:
//
// - $PROJECT_ID: the project ID of the build.
// - $BUILD_ID: the autogenerated ID of the build.
// - $REPO_NAME: the source repository name specified by RepoSource.
// - $BRANCH_NAME: the branch name specified by RepoSource.
// - $TAG_NAME: the tag name specified by RepoSource.
// - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
// resolved from the specified branch or tag.
// - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.