From 691081621185dea61294a38dda6d0af762a13a0d Mon Sep 17 00:00:00 2001 From: Samuel Bodin <1637651+bodinsamuel@users.noreply.github.com> Date: Mon, 23 Oct 2023 14:33:33 +0200 Subject: [PATCH] fix(rules): add Flyway --- src/rules/__snapshots__/index.test.ts.snap | 1 + .../spec/docker/__snapshots__/component.test.ts.snap | 6 ++++++ .../__snapshots__/component.test.ts.snap | 10 ++++++++++ src/rules/tool/flyway.ts | 12 ++++++++++++ src/rules/tool/index.ts | 1 + src/types/techs.ts | 1 + 6 files changed, 31 insertions(+) create mode 100644 src/rules/tool/flyway.ts diff --git a/src/rules/__snapshots__/index.test.ts.snap b/src/rules/__snapshots__/index.test.ts.snap index 17eeea72..5448e4f5 100644 --- a/src/rules/__snapshots__/index.test.ts.snap +++ b/src/rules/__snapshots__/index.test.ts.snap @@ -159,6 +159,7 @@ exports[`all > should match everything 1`] = ` "firebase", "firebase.firestore", "flyio", + "flyway", "gatsby", "gcp", "gcp.aiplatform", diff --git a/src/rules/spec/docker/__snapshots__/component.test.ts.snap b/src/rules/spec/docker/__snapshots__/component.test.ts.snap index a706bfe4..12506fb1 100644 --- a/src/rules/spec/docker/__snapshots__/component.test.ts.snap +++ b/src/rules/spec/docker/__snapshots__/component.test.ts.snap @@ -37,6 +37,7 @@ exports[`docker > should match everything 1`] = ` "docker", "drupal", "elasticsearch", + "flyway", "ghost", "gitguardian", "goacmelego", @@ -359,6 +360,11 @@ exports[`docker > should match everything 2`] = ` "femtopixel/google-lighthouse", "0.0.0", ], + [ + "docker", + "flyway/flyway", + "0.0.0", + ], [ "docker", "getmeili/meilisearch", diff --git a/src/rules/spec/githubActions/__snapshots__/component.test.ts.snap b/src/rules/spec/githubActions/__snapshots__/component.test.ts.snap index 8273b486..1d9390d7 100644 --- a/src/rules/spec/githubActions/__snapshots__/component.test.ts.snap +++ b/src/rules/spec/githubActions/__snapshots__/component.test.ts.snap @@ -511,6 +511,11 @@ exports[`docker > should match all dependencies 2`] = ` "jonelantha/gatsby-s3-action", "1", ], + [ + "githubAction", + "joshuaavalon/flyway-action", + "1", + ], [ "githubAction", "jzweifel/gatsby-cli-github-action", @@ -566,6 +571,11 @@ exports[`docker > should match all dependencies 2`] = ` "planetscale/create-branch-action", "1", ], + [ + "githubAction", + "red-gate/flyway-hub-migration-test", + "1", + ], [ "githubAction", "relative-ci/agent-action", diff --git a/src/rules/tool/flyway.ts b/src/rules/tool/flyway.ts new file mode 100644 index 00000000..c93660fb --- /dev/null +++ b/src/rules/tool/flyway.ts @@ -0,0 +1,12 @@ +import { register } from '../../register.js'; + +register({ + tech: 'flyway', + name: 'Flyway', + type: 'tool', + dependencies: [ + { type: 'docker', name: 'flyway/flyway' }, + { type: 'githubAction', name: 'red-gate/flyway-hub-migration-test' }, + { type: 'githubAction', name: 'joshuaavalon/flyway-action' }, + ], +}); diff --git a/src/rules/tool/index.ts b/src/rules/tool/index.ts index d8c77932..97ca7789 100644 --- a/src/rules/tool/index.ts +++ b/src/rules/tool/index.ts @@ -5,6 +5,7 @@ import './atlasgo.js'; import './bytebase.js'; import './checkov.js'; import './chef.js'; +import './flyway.js'; import './gitlab.js'; import './goacmelego.js'; import './golangcilint.js'; diff --git a/src/types/techs.ts b/src/types/techs.ts index fab4b3ff..ea717d7c 100644 --- a/src/types/techs.ts +++ b/src/types/techs.ts @@ -174,6 +174,7 @@ export type AllowedKeys = | 'firebase.firestore' | 'firebase' | 'flyio' + | 'flyway' | 'gatsby' | 'gcp.aiplatform' | 'gcp.appengine'