Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

Commit

Permalink
feat: Update cloudbuild proto with the service_account for BYOSA Trig…
Browse files Browse the repository at this point in the history
…gers. (#586)

- [ ] Regenerate this pull request now.

Committer: @emoryruscus
PiperOrigin-RevId: 392957767

Source-Link: googleapis/googleapis@5572865

Source-Link: googleapis/googleapis-gen@bc40f42
  • Loading branch information
gcf-owl-bot[bot] committed Aug 27, 2021
1 parent 33af5f8 commit 84ce78e
Show file tree
Hide file tree
Showing 7 changed files with 933 additions and 459 deletions.
Expand Up @@ -565,6 +565,7 @@ public void createBuildTriggerTest() throws Exception {
.addAllIgnoredFiles(new ArrayList<String>())
.addAllIncludedFiles(new ArrayList<String>())
.setFilter("filter-1274492040")
.setServiceAccount("serviceAccount1079137720")
.build();
mockCloudBuild.addResponse(expectedResponse);

Expand Down Expand Up @@ -620,6 +621,7 @@ public void getBuildTriggerTest() throws Exception {
.addAllIgnoredFiles(new ArrayList<String>())
.addAllIncludedFiles(new ArrayList<String>())
.setFilter("filter-1274492040")
.setServiceAccount("serviceAccount1079137720")
.build();
mockCloudBuild.addResponse(expectedResponse);

Expand Down Expand Up @@ -756,6 +758,7 @@ public void updateBuildTriggerTest() throws Exception {
.addAllIgnoredFiles(new ArrayList<String>())
.addAllIncludedFiles(new ArrayList<String>())
.setFilter("filter-1274492040")
.setServiceAccount("serviceAccount1079137720")
.build();
mockCloudBuild.addResponse(expectedResponse);

Expand Down
Expand Up @@ -48,6 +48,7 @@ private BuildStep() {
secretEnv_ = com.google.protobuf.LazyStringArrayList.EMPTY;
volumes_ = java.util.Collections.emptyList();
status_ = 0;
script_ = "";
}

@java.lang.Override
Expand Down Expand Up @@ -208,6 +209,13 @@ private BuildStep(
pullTiming_ = subBuilder.buildPartial();
}

break;
}
case 154:
{
java.lang.String s = input.readStringRequireUtf8();

script_ = s;
break;
}
default:
Expand Down Expand Up @@ -1090,6 +1098,57 @@ public com.google.cloudbuild.v1.Build.Status getStatus() {
return result == null ? com.google.cloudbuild.v1.Build.Status.UNRECOGNIZED : result;
}

public static final int SCRIPT_FIELD_NUMBER = 19;
private volatile java.lang.Object script_;
/**
*
*
* <pre>
* A shell script to be executed in the step.
* When script is provided, the user cannot specify the entrypoint or args.
* </pre>
*
* <code>string script = 19;</code>
*
* @return The script.
*/
@java.lang.Override
public java.lang.String getScript() {
java.lang.Object ref = script_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
script_ = s;
return s;
}
}
/**
*
*
* <pre>
* A shell script to be executed in the step.
* When script is provided, the user cannot specify the entrypoint or args.
* </pre>
*
* <code>string script = 19;</code>
*
* @return The bytes for script.
*/
@java.lang.Override
public com.google.protobuf.ByteString getScriptBytes() {
java.lang.Object ref = script_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
script_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}

private byte memoizedIsInitialized = -1;

@java.lang.Override
Expand Down Expand Up @@ -1143,6 +1202,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (pullTiming_ != null) {
output.writeMessage(13, getPullTiming());
}
if (!getScriptBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 19, script_);
}
unknownFields.writeTo(output);
}

Expand Down Expand Up @@ -1211,6 +1273,9 @@ public int getSerializedSize() {
if (pullTiming_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getPullTiming());
}
if (!getScriptBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, script_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
Expand Down Expand Up @@ -1248,6 +1313,7 @@ public boolean equals(final java.lang.Object obj) {
if (!getTimeout().equals(other.getTimeout())) return false;
}
if (status_ != other.status_) return false;
if (!getScript().equals(other.getScript())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
Expand Down Expand Up @@ -1301,6 +1367,8 @@ public int hashCode() {
}
hash = (37 * hash) + STATUS_FIELD_NUMBER;
hash = (53 * hash) + status_;
hash = (37 * hash) + SCRIPT_FIELD_NUMBER;
hash = (53 * hash) + getScript().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
Expand Down Expand Up @@ -1489,6 +1557,8 @@ public Builder clear() {
}
status_ = 0;

script_ = "";

return this;
}

Expand Down Expand Up @@ -1565,6 +1635,7 @@ public com.google.cloudbuild.v1.BuildStep buildPartial() {
result.timeout_ = timeoutBuilder_.build();
}
result.status_ = status_;
result.script_ = script_;
onBuilt();
return result;
}
Expand Down Expand Up @@ -1709,6 +1780,10 @@ public Builder mergeFrom(com.google.cloudbuild.v1.BuildStep other) {
if (other.status_ != 0) {
setStatusValue(other.getStatusValue());
}
if (!other.getScript().isEmpty()) {
script_ = other.script_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
Expand Down Expand Up @@ -4206,6 +4281,117 @@ public Builder clearStatus() {
return this;
}

private java.lang.Object script_ = "";
/**
*
*
* <pre>
* A shell script to be executed in the step.
* When script is provided, the user cannot specify the entrypoint or args.
* </pre>
*
* <code>string script = 19;</code>
*
* @return The script.
*/
public java.lang.String getScript() {
java.lang.Object ref = script_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
script_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
* <pre>
* A shell script to be executed in the step.
* When script is provided, the user cannot specify the entrypoint or args.
* </pre>
*
* <code>string script = 19;</code>
*
* @return The bytes for script.
*/
public com.google.protobuf.ByteString getScriptBytes() {
java.lang.Object ref = script_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
script_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
* <pre>
* A shell script to be executed in the step.
* When script is provided, the user cannot specify the entrypoint or args.
* </pre>
*
* <code>string script = 19;</code>
*
* @param value The script to set.
* @return This builder for chaining.
*/
public Builder setScript(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}

script_ = value;
onChanged();
return this;
}
/**
*
*
* <pre>
* A shell script to be executed in the step.
* When script is provided, the user cannot specify the entrypoint or args.
* </pre>
*
* <code>string script = 19;</code>
*
* @return This builder for chaining.
*/
public Builder clearScript() {

script_ = getDefaultInstance().getScript();
onChanged();
return this;
}
/**
*
*
* <pre>
* A shell script to be executed in the step.
* When script is provided, the user cannot specify the entrypoint or args.
* </pre>
*
* <code>string script = 19;</code>
*
* @param value The bytes for script to set.
* @return This builder for chaining.
*/
public Builder setScriptBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);

script_ = value;
onChanged();
return this;
}

@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
Expand Down
Expand Up @@ -653,4 +653,31 @@ public interface BuildStepOrBuilder
* @return The status.
*/
com.google.cloudbuild.v1.Build.Status getStatus();

/**
*
*
* <pre>
* A shell script to be executed in the step.
* When script is provided, the user cannot specify the entrypoint or args.
* </pre>
*
* <code>string script = 19;</code>
*
* @return The script.
*/
java.lang.String getScript();
/**
*
*
* <pre>
* A shell script to be executed in the step.
* When script is provided, the user cannot specify the entrypoint or args.
* </pre>
*
* <code>string script = 19;</code>
*
* @return The bytes for script.
*/
com.google.protobuf.ByteString getScriptBytes();
}

0 comments on commit 84ce78e

Please sign in to comment.