Skip to content

Commit

Permalink
feat: Support for ReleaseConfigs (#4764)
Browse files Browse the repository at this point in the history
* feat: Support for ReleaseConfigs
feat: Support for WorkflowConfigs
feat: Support new first-party repository methods for committing, listing/reading files, and fetching history
feat: Support new ComputeRepositoryAccessTokenStatus repository method
feat: Support SSH based git authentication configuration
feat: Support workspace compilation override fields
feat: Support NPMRC environment variables
feat: Support labels on repositories
feat: Support custom service account repository configuration
docs: several comments reformatted
fix: rearrange several messages, thus changing field types

PiperOrigin-RevId: 576787262

Source-Link: googleapis/googleapis@7e7ae1a

Source-Link: googleapis/googleapis-gen@b145f1c
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRhdGFmb3JtLy5Pd2xCb3QueWFtbCIsImgiOiJiMTQ1ZjFjNjlhMWQzNjE4YTZkZGRkYTM2MTg4ZGZlOWQ5OWVlYjQzIn0=

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Denis DelGrosso <[email protected]>
  • Loading branch information
3 people authored Oct 26, 2023
1 parent e54bfd5 commit 50712d8
Show file tree
Hide file tree
Showing 50 changed files with 36,992 additions and 14,036 deletions.
15 changes: 15 additions & 0 deletions packages/google-cloud-dataform/README.md

Large diffs are not rendered by default.

1,221 changes: 1,012 additions & 209 deletions packages/google-cloud-dataform/protos/google/cloud/dataform/v1beta1/dataform.proto

Large diffs are not rendered by default.

10,279 changes: 7,159 additions & 3,120 deletions packages/google-cloud-dataform/protos/protos.d.ts

Large diffs are not rendered by default.

26,023 changes: 17,745 additions & 8,278 deletions packages/google-cloud-dataform/protos/protos.js

Large diffs are not rendered by default.

1,457 changes: 1,279 additions & 178 deletions packages/google-cloud-dataform/protos/protos.json

Large diffs are not rendered by default.

270 changes: 270 additions & 0 deletions packages/google-cloud-dataform/samples/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **



'use strict';

function main(name, commitMetadata) {
// [START dataform_v1beta1_generated_Dataform_CommitRepositoryChanges_async]
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The repository's name.
*/
// const name = 'abc123'
/**
* Required. The changes to commit to the repository.
*/
// const commitMetadata = {}
/**
* Optional. The commit SHA which must be the repository's current HEAD before
* applying this commit; otherwise this request will fail. If unset, no
* validation on the current HEAD commit SHA is performed.
*/
// const requiredHeadCommitSha = 'abc123'
/**
* A map to the path of the file to the operation. The path is the full file
* path including filename, from repository root.
*/
// const fileOperations = [1,2,3,4]

// Imports the Dataform library
const {DataformClient} = require('@google-cloud/dataform').v1beta1;

// Instantiates a client
const dataformClient = new DataformClient();

async function callCommitRepositoryChanges() {
// Construct request
const request = {
name,
commitMetadata,
};

// Run request
const response = await dataformClient.commitRepositoryChanges(request);
console.log(response);
}

callCommitRepositoryChanges();
// [END dataform_v1beta1_generated_Dataform_CommitRepositoryChanges_async]
}

process.on('unhandledRejection', err => {
console.error(err.message);
process.exitCode = 1;
});
main(...process.argv.slice(2));
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ function main(name, author) {
*/
// const commitMessage = 'abc123'
/**
* Optional. Full file paths to commit including filename, rooted at workspace root. If
* left empty, all files will be committed.
* Optional. Full file paths to commit including filename, rooted at workspace
* root. If left empty, all files will be committed.
*/
// const paths = ['abc','def']

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **



'use strict';

function main(name) {
// [START dataform_v1beta1_generated_Dataform_ComputeRepositoryAccessTokenStatus_async]
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The repository's name.
*/
// const name = 'abc123'

// Imports the Dataform library
const {DataformClient} = require('@google-cloud/dataform').v1beta1;

// Instantiates a client
const dataformClient = new DataformClient();

async function callComputeRepositoryAccessTokenStatus() {
// Construct request
const request = {
name,
};

// Run request
const response = await dataformClient.computeRepositoryAccessTokenStatus(request);
console.log(response);
}

callComputeRepositoryAccessTokenStatus();
// [END dataform_v1beta1_generated_Dataform_ComputeRepositoryAccessTokenStatus_async]
}

process.on('unhandledRejection', err => {
console.error(err.message);
process.exitCode = 1;
});
main(...process.argv.slice(2));
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ function main(parent, compilationResult) {
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The repository in which to create the compilation result. Must be in the
* format `projects/* /locations/* /repositories/*`.
* Required. The repository in which to create the compilation result. Must be
* in the format `projects/* /locations/* /repositories/*`.
*/
// const parent = 'abc123'
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **



'use strict';

function main(parent, releaseConfig, releaseConfigId) {
// [START dataform_v1beta1_generated_Dataform_CreateReleaseConfig_async]
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The repository in which to create the release config. Must be in
* the format `projects/* /locations/* /repositories/*`.
*/
// const parent = 'abc123'
/**
* Required. The release config to create.
*/
// const releaseConfig = {}
/**
* Required. The ID to use for the release config, which will become the final
* component of the release config's resource name.
*/
// const releaseConfigId = 'abc123'

// Imports the Dataform library
const {DataformClient} = require('@google-cloud/dataform').v1beta1;

// Instantiates a client
const dataformClient = new DataformClient();

async function callCreateReleaseConfig() {
// Construct request
const request = {
parent,
releaseConfig,
releaseConfigId,
};

// Run request
const response = await dataformClient.createReleaseConfig(request);
console.log(response);
}

callCreateReleaseConfig();
// [END dataform_v1beta1_generated_Dataform_CreateReleaseConfig_async]
}

process.on('unhandledRejection', err => {
console.error(err.message);
process.exitCode = 1;
});
main(...process.argv.slice(2));
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ function main(parent, repository, repositoryId) {
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The location in which to create the repository. Must be in the format
* `projects/* /locations/*`.
* Required. The location in which to create the repository. Must be in the
* format `projects/* /locations/*`.
*/
// const parent = 'abc123'
/**
* Required. The repository to create.
*/
// const repository = {}
/**
* Required. The ID to use for the repository, which will become the final component of
* the repository's resource name.
* Required. The ID to use for the repository, which will become the final
* component of the repository's resource name.
*/
// const repositoryId = 'abc123'

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **



'use strict';

function main(parent, workflowConfig, workflowConfigId) {
// [START dataform_v1beta1_generated_Dataform_CreateWorkflowConfig_async]
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The repository in which to create the workflow config. Must be in
* the format `projects/* /locations/* /repositories/*`.
*/
// const parent = 'abc123'
/**
* Required. The workflow config to create.
*/
// const workflowConfig = {}
/**
* Required. The ID to use for the workflow config, which will become the
* final component of the workflow config's resource name.
*/
// const workflowConfigId = 'abc123'

// Imports the Dataform library
const {DataformClient} = require('@google-cloud/dataform').v1beta1;

// Instantiates a client
const dataformClient = new DataformClient();

async function callCreateWorkflowConfig() {
// Construct request
const request = {
parent,
workflowConfig,
workflowConfigId,
};

// Run request
const response = await dataformClient.createWorkflowConfig(request);
console.log(response);
}

callCreateWorkflowConfig();
// [END dataform_v1beta1_generated_Dataform_CreateWorkflowConfig_async]
}

process.on('unhandledRejection', err => {
console.error(err.message);
process.exitCode = 1;
});
main(...process.argv.slice(2));
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ function main(parent, workflowInvocation) {
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The repository in which to create the workflow invocation. Must be in the
* format `projects/* /locations/* /repositories/*`.
* Required. The repository in which to create the workflow invocation. Must
* be in the format `projects/* /locations/* /repositories/*`.
*/
// const parent = 'abc123'
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ function main(parent, workspace, workspaceId) {
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The repository in which to create the workspace. Must be in the format
* `projects/* /locations/* /repositories/*`.
* Required. The repository in which to create the workspace. Must be in the
* format `projects/* /locations/* /repositories/*`.
*/
// const parent = 'abc123'
/**
* Required. The workspace to create.
*/
// const workspace = {}
/**
* Required. The ID to use for the workspace, which will become the final component of
* the workspace's resource name.
* Required. The ID to use for the workspace, which will become the final
* component of the workspace's resource name.
*/
// const workspaceId = 'abc123'

Expand Down
Loading

0 comments on commit 50712d8

Please sign in to comment.