Skip to content

Commit

Permalink
fix(rules): add GCP Cloud Build
Browse files Browse the repository at this point in the history
  • Loading branch information
bodinsamuel committed Aug 7, 2023
1 parent dc51d87 commit 9e038c4
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/common/techs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export const list: TechItem[] = [
{ key: 'gcp.datastore', name: 'Datastore', type: 'db' },
{ key: 'gcp.cloudrun', name: 'Cloud Run', type: 'hosting' },
{ key: 'gcp.functions', name: 'Functions', type: 'hosting' },
{ key: 'gcp.cloudbuild', name: 'Cloud Build', type: 'tool' },
{ key: 'gcp.pubsub', name: 'PubSub', type: 'messaging' },
{ key: 'gcp.gce', name: 'Compute Engine', type: 'hosting' },
{ key: 'gcp.gcs', name: 'Cloud Storage', type: 'storage' },
Expand Down
1 change: 1 addition & 0 deletions src/rules/spec/nodejs/__snapshots__/component.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ exports[`npm > should match everything 1`] = `
"gcp",
"gcp.bigquery",
"gcp.bigtable",
"gcp.cloudbuild",
"gcp.cloudrun",
"gcp.datastore",
"gcp.dns",
Expand Down
5 changes: 5 additions & 0 deletions src/rules/spec/ruby/__snapshots__/component.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,11 @@ exports[`ruby (component) > should match everything 2`] = `
"google-cloud-bigtable",
"1.0.0",
],
[
"ruby",
"google-cloud-build-v1",
"1.0.0",
],
[
"ruby",
"google-cloud-compute",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ exports[`terraform (resource) > should match everything 1`] = `
"gcp",
"gcp.bigquery",
"gcp.bigtable",
"gcp.cloudbuild",
"gcp.cloudrun",
"gcp.datastore",
"gcp.dns",
Expand Down
14 changes: 14 additions & 0 deletions src/rules/tool/gcp.cloudbuild.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { register } from '../../rules.js';

register({
tech: 'gcp.cloudbuild',
dependencies: [
{ type: 'npm', name: '@google-cloud/cloudbuild' },
{ type: 'terraform.resource', name: 'google_cloudbuild_trigger' },
{
type: 'ruby',
name: /^google-cloud-build/,
example: 'google-cloud-build-v1',
},
],
});
1 change: 1 addition & 0 deletions src/rules/tool/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import './gcp.cloudbuild.js';
import './gitlab.js';
import './helm.js';
import './terragrunt.js';
1 change: 1 addition & 0 deletions src/types/techs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export type AllowedKeys =
| 'flyio'
| 'gcp.bigquery'
| 'gcp.bigtable'
| 'gcp.cloudbuild'
| 'gcp.cloudrun'
| 'gcp.datastore'
| 'gcp.dns'
Expand Down

0 comments on commit 9e038c4

Please sign in to comment.