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

feat: add queue_ttl to Build, invert_regex to RepoSource #100

Merged
merged 5 commits into from Mar 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -29,6 +29,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-build</artifactId>
</dependency>
</dependencies>

```

Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2019 Google LLC
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -205,7 +205,6 @@ public CloudBuildStub getStub() {
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Operation createBuild(String projectId, Build build) {

CreateBuildRequest request =
CreateBuildRequest.newBuilder().setProjectId(projectId).setBuild(build).build();
return createBuild(request);
Expand Down Expand Up @@ -288,7 +287,6 @@ public final UnaryCallable<CreateBuildRequest, Operation> createBuildCallable()
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Build getBuild(String projectId, String id) {

GetBuildRequest request =
GetBuildRequest.newBuilder().setProjectId(projectId).setId(id).build();
return getBuild(request);
Expand Down Expand Up @@ -486,7 +484,6 @@ public final UnaryCallable<ListBuildsRequest, ListBuildsResponse> listBuildsCall
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Build cancelBuild(String projectId, String id) {

CancelBuildRequest request =
CancelBuildRequest.newBuilder().setProjectId(projectId).setId(id).build();
return cancelBuild(request);
Expand Down Expand Up @@ -562,7 +559,6 @@ public final UnaryCallable<CancelBuildRequest, Build> cancelBuildCallable() {
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final BuildTrigger createBuildTrigger(String projectId, BuildTrigger trigger) {

CreateBuildTriggerRequest request =
CreateBuildTriggerRequest.newBuilder().setProjectId(projectId).setTrigger(trigger).build();
return createBuildTrigger(request);
Expand Down Expand Up @@ -638,11 +634,10 @@ public final UnaryCallable<CreateBuildTriggerRequest, BuildTrigger> createBuildT
* </code></pre>
*
* @param projectId Required. ID of the project that owns the trigger.
* @param triggerId Required. ID of the `BuildTrigger` to get.
* @param triggerId Required. Identifier (`id` or `name`) of the `BuildTrigger` to get.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final BuildTrigger getBuildTrigger(String projectId, String triggerId) {

GetBuildTriggerRequest request =
GetBuildTriggerRequest.newBuilder().setProjectId(projectId).setTriggerId(triggerId).build();
return getBuildTrigger(request);
Expand Down Expand Up @@ -720,7 +715,6 @@ public final UnaryCallable<GetBuildTriggerRequest, BuildTrigger> getBuildTrigger
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListBuildTriggersResponse listBuildTriggers(String projectId) {

ListBuildTriggersRequest request =
ListBuildTriggersRequest.newBuilder().setProjectId(projectId).build();
return listBuildTriggers(request);
Expand Down Expand Up @@ -797,7 +791,6 @@ public final ListBuildTriggersResponse listBuildTriggers(ListBuildTriggersReques
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteBuildTrigger(String projectId, String triggerId) {

DeleteBuildTriggerRequest request =
DeleteBuildTriggerRequest.newBuilder()
.setProjectId(projectId)
Expand Down Expand Up @@ -883,7 +876,6 @@ public final UnaryCallable<DeleteBuildTriggerRequest, Empty> deleteBuildTriggerC
*/
public final BuildTrigger updateBuildTrigger(
String projectId, String triggerId, BuildTrigger trigger) {

UpdateBuildTriggerRequest request =
UpdateBuildTriggerRequest.newBuilder()
.setProjectId(projectId)
Expand Down Expand Up @@ -971,7 +963,6 @@ public final UnaryCallable<UpdateBuildTriggerRequest, BuildTrigger> updateBuildT
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Operation runBuildTrigger(String projectId, String triggerId, RepoSource source) {

RunBuildTriggerRequest request =
RunBuildTriggerRequest.newBuilder()
.setProjectId(projectId)
Expand Down Expand Up @@ -1076,7 +1067,6 @@ public final UnaryCallable<RunBuildTriggerRequest, Operation> runBuildTriggerCal
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Operation retryBuild(String projectId, String id) {

RetryBuildRequest request =
RetryBuildRequest.newBuilder().setProjectId(projectId).setId(id).build();
return retryBuild(request);
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2019 Google LLC
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -78,8 +78,12 @@
* <code>
* CloudBuildSettings.Builder cloudBuildSettingsBuilder =
* CloudBuildSettings.newBuilder();
* cloudBuildSettingsBuilder.createBuildSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30));
* cloudBuildSettingsBuilder
* .createBuildSettings()
* .setRetrySettings(
* cloudBuildSettingsBuilder.createBuildSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* CloudBuildSettings cloudBuildSettings = cloudBuildSettingsBuilder.build();
* </code>
* </pre>
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2019 Google LLC
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2019 Google LLC
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2019 Google LLC
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -93,8 +93,12 @@
* <code>
* CloudBuildStubSettings.Builder cloudBuildSettingsBuilder =
* CloudBuildStubSettings.newBuilder();
* cloudBuildSettingsBuilder.createBuildSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30));
* cloudBuildSettingsBuilder
* .createBuildSettings()
* .setRetrySettings(
* cloudBuildSettingsBuilder.createBuildSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* CloudBuildStubSettings cloudBuildSettings = cloudBuildSettingsBuilder.build();
* </code>
* </pre>
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2019 Google LLC
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2019 Google LLC
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down