Skip to content

Commit 0c512cd

Browse files
bcoeAce Nassri
authored and
Ace Nassri
committed
feat(docs): add listBuildTriggers sample to README (#5)
1 parent 5a73471 commit 0c512cd

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

cloudbuild/list-build-triggers.js renamed to cloudbuild/listBuildTriggers.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
/**
2-
* Copyright 2019, Google, LLC.
2+
* Copyright 2019 Google LLC
3+
*
34
* Licensed under the Apache License, Version 2.0 (the "License");
45
* you may not use this file except in compliance with the License.
56
* You may obtain a copy of the License at
67
*
7-
* http://www.apache.org/licenses/LICENSE-2.0
8+
* http://www.apache.org/licenses/LICENSE-2.0
89
*
910
* Unless required by applicable law or agreed to in writing, software
1011
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -15,6 +16,11 @@
1516

1617
'use strict';
1718

19+
// sample-metadata:
20+
// title: List Triggers.
21+
// description: List available build triggers.
22+
// usage: node list-build-triggers.js <PROJECT_ID>
23+
1824
// [START cloudbuild_list_build_triggers]
1925
async function listBuildTriggers(
2026
projectId = 'YOUR_PROJECT_ID' // Your Google Cloud Platform project ID

cloudbuild/system-test/samples.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
/**
2-
* Copyright 2019, Google, LLC.
2+
* Copyright 2019 Google LLC
3+
*
34
* Licensed under the Apache License, Version 2.0 (the "License");
45
* you may not use this file except in compliance with the License.
56
* You may obtain a copy of the License at
67
*
7-
* http://www.apache.org/licenses/LICENSE-2.0
8+
* http://www.apache.org/licenses/LICENSE-2.0
89
*
910
* Unless required by applicable law or agreed to in writing, software
1011
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -50,7 +51,7 @@ describe('Sample Integration Tests', () => {
5051

5152
it('should run list-build-triggers.js', async () => {
5253
const stdout = execSync(
53-
`node ./samples/list-build-triggers.js ${PROJECT_ID} ${TRIGGER_ID} cloud-build-mvp`,
54+
`node ./samples/listBuildTriggers.js ${PROJECT_ID} ${TRIGGER_ID} cloud-build-mvp`,
5455
{cwd}
5556
);
5657
assert.include(stdout, 'Push-to-any-branch');

0 commit comments

Comments
 (0)