-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Better publish process (#271)
- Loading branch information
Showing
208 changed files
with
2,596 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
.github/workflows/transformations_azure_compliance_premium_postgres.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: "Test Azure Compliance Premium Policies: Postgres" | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "transformations/azure/compliance-premium/**" | ||
- ".github/workflows/transformations_azure_compliance_premium_postgres.yml" | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "transformations/azure/compliance-premium/**" | ||
- ".github/workflows/transformations_azure_compliance_premium_postgres.yml" | ||
|
||
jobs: | ||
transformations-azure-compliance-premium: | ||
name: transformations/azure/compliance-premium | ||
timeout-minutes: 30 | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./transformations/azure/compliance-premium | ||
services: | ||
postgres: | ||
image: postgres:11 | ||
env: | ||
POSTGRES_PASSWORD: pass | ||
POSTGRES_USER: postgres | ||
POSTGRES_DB: postgres | ||
ports: | ||
- 5432:5432 | ||
# Set health checks to wait until postgres has started | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.9" | ||
cache: "pip" | ||
cache-dependency-path: "./transformations/azure/compliance-premium/requirements.txt" | ||
- name: Install dependencies | ||
run: pip install -r requirements.txt | ||
- name: Setup CloudQuery | ||
uses: cloudquery/setup-cloudquery@v3 | ||
with: | ||
version: v3.29.1 | ||
- name: Migrate DB | ||
run: cloudquery migrate tests/azure.yml tests/pg.yml | ||
env: | ||
CQ_DSN: postgresql://postgres:pass@localhost:5432/postgres | ||
- name: DBT dependencies | ||
run: | | ||
dbt deps --target dev-pg --profiles-dir ./tests | ||
- name: Run Policies | ||
run: | | ||
dbt run --target dev-pg --profiles-dir ./tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module.exports = { | ||
root: true, | ||
parserOptions: { | ||
ecmaVersion: 12, | ||
sourceType: "module", | ||
}, | ||
plugins: ["unicorn"], | ||
extends: ["eslint:recommended", "prettier", "plugin:unicorn/recommended"], | ||
env: { | ||
es2021: true, | ||
node: true, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# dbt-pack | ||
|
||
A utility to pack a dbt project into a single zip file. | ||
|
||
## Prerequisites | ||
|
||
- [Node.js LTS](https://nodejs.org/en/) | ||
|
||
## Setup | ||
|
||
```bash | ||
npm ci | ||
``` | ||
|
||
## Usage | ||
|
||
```bash | ||
node index.js dbt-pack --project-dir=../../transformations/azure/compliance-free | ||
node index.js dbt-pack --project-dir=../../transformations/azure/compliance-premium | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env node | ||
import path from "node:path"; | ||
import yargs from "yargs"; | ||
import { hideBin } from "yargs/helpers"; | ||
import { pack } from "./src/index.js"; | ||
|
||
yargs(hideBin(process.argv)) | ||
.command( | ||
"dbt-pack", | ||
"Package dbt project into a single zip", | ||
() => {}, | ||
async ({ projectDir }) => { | ||
await pack({ | ||
projectDir: path.resolve(projectDir), | ||
}); | ||
}, | ||
) | ||
.option("project-dir", { | ||
alias: "p", | ||
type: "string", | ||
description: "Path to dbt project directory", | ||
demandOption: true, | ||
}) | ||
.demandCommand(1) | ||
.strict() | ||
.parse(); |
Oops, something went wrong.