diff --git a/cloudbuild/list-build-triggers.js b/cloudbuild/listBuildTriggers.js similarity index 83% rename from cloudbuild/list-build-triggers.js rename to cloudbuild/listBuildTriggers.js index 3413ad380f..60d967b870 100644 --- a/cloudbuild/list-build-triggers.js +++ b/cloudbuild/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/cloudbuild/system-test/samples.js b/cloudbuild/system-test/samples.js index ff1f4ea9f2..c5f7d7e2c6 100644 --- a/cloudbuild/system-test/samples.js +++ b/cloudbuild/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');