Skip to content

Commit 79d82b5

Browse files
authored
Merge pull request #23 from DataRecce/feature/drc-506-fix-download-duckdb-file
[Chore] Move preparation task into a script
2 parents a35d3f4 + ec67f0e commit 79d82b5

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,5 @@
66
"features": {
77
"ghcr.io/devcontainers/features/github-cli:1": {}
88
},
9-
"postCreateCommand": {
10-
"dbt": "dbt deps",
11-
"artifact": "gh repo set-default DataRecce/jaffle_shop_duckdb && run_id=$(gh run list --workflow \"Jaffle Shop Recce CI\" --status success --limit 1 --json databaseId --jq '.[0].databaseId') && gh run download $run_id -n duckdb"
12-
},
13-
"postStartCommand": "recce server --cloud --review"
9+
"postStartCommand": "./.devcontainer/script/post_start.sh"
1410
}

.devcontainer/script/post_start.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#! /bin/bash
2+
3+
# Install dbt dependencies
4+
dbt deps
5+
6+
# Download duckdb file
7+
gh repo set-default DataRecce/jaffle_shop_duckdb
8+
branch=$(git branch --show-current)
9+
run_id=$(gh run list --workflow "Jaffle Shop Recce CI" --branch $branch --status success --limit 1 --json databaseId --jq '.[0].databaseId')
10+
gh run download $run_id -n duckdb
11+
12+
# Exec Recce
13+
recce server --cloud --review

0 commit comments

Comments
 (0)