diff --git a/generated,README.md,.eslintrc.yml/README.md b/generated,README.md,.eslintrc.yml/README.md index 1e1bfb2a0a..68549c48b1 100644 --- a/generated,README.md,.eslintrc.yml/README.md +++ b/generated,README.md,.eslintrc.yml/README.md @@ -12,6 +12,7 @@ * [Before you begin](#before-you-begin) * [Samples](#samples) + * [List Triggers.](#list-triggers.) * [Quickstart](#quickstart) ## Before you begin @@ -23,6 +24,25 @@ Before running the samples, make sure you've followed the steps outlined in +### List Triggers. + +List available build triggers. + +View the [source code](https://github.com/googleapis/nodejs-cloudbuild/blob/master/samples/listBuildTriggers.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-cloudbuild&page=editor&open_in_editor=samples/listBuildTriggers.js,samples/README.md) + +__Usage:__ + + +`node list-build-triggers.js ` + + +----- + + + + ### Quickstart View the [source code](https://github.com/googleapis/nodejs-cloudbuild/blob/master/samples/quickstart.js). diff --git a/generated,README.md,.eslintrc.yml/list-build-triggers.js b/generated,README.md,.eslintrc.yml/listBuildTriggers.js similarity index 83% rename from generated,README.md,.eslintrc.yml/list-build-triggers.js rename to generated,README.md,.eslintrc.yml/listBuildTriggers.js index 3413ad380f..60d967b870 100644 --- a/generated,README.md,.eslintrc.yml/list-build-triggers.js +++ b/generated,README.md,.eslintrc.yml/listBuildTriggers.js @@ -1,10 +1,11 @@ /** - * Copyright 2019, Google, LLC. + * Copyright 2019 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 * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://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, @@ -15,6 +16,11 @@ 'use strict'; +// sample-metadata: +// title: List Triggers. +// description: List available build triggers. +// usage: node list-build-triggers.js + // [START cloudbuild_list_build_triggers] async function listBuildTriggers( projectId = 'YOUR_PROJECT_ID' // Your Google Cloud Platform project ID diff --git a/generated,README.md,.eslintrc.yml/system-test/samples.js b/generated,README.md,.eslintrc.yml/system-test/samples.js index ff1f4ea9f2..c5f7d7e2c6 100644 --- a/generated,README.md,.eslintrc.yml/system-test/samples.js +++ b/generated,README.md,.eslintrc.yml/system-test/samples.js @@ -1,10 +1,11 @@ /** - * Copyright 2019, Google, LLC. + * Copyright 2019 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 * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://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, @@ -50,7 +51,7 @@ describe('Sample Integration Tests', () => { it('should run list-build-triggers.js', async () => { const stdout = execSync( - `node ./samples/list-build-triggers.js ${PROJECT_ID} ${TRIGGER_ID} cloud-build-mvp`, + `node ./samples/listBuildTriggers.js ${PROJECT_ID} ${TRIGGER_ID} cloud-build-mvp`, {cwd} ); assert.include(stdout, 'Push-to-any-branch');