Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First class dagger shell #1947

Merged
merged 23 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions dagger.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"name": "vscode-runme",
"engineVersion": "v0.15.3",
"sdk": "typescript",
"dependencies": [
{
"name": "golang",
"source": "github.com/purpleclay/daggerverse/golang@7e83bccc350fa981e975ac0c8619f92a1b729958"
"source": "github.com/purpleclay/daggerverse/golang@7e83bccc350fa981e975ac0c8619f92a1b729958",
"pin": "7e83bccc350fa981e975ac0c8619f92a1b729958"
}
],
"source": "dagger",
"engineVersion": "v0.11.4"
"source": "dagger"
}
2 changes: 2 additions & 0 deletions dagger/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
/sdk
/node_modules/**
/**/node_modules/**
/**/.pnpm-store/**
7 changes: 4 additions & 3 deletions dagger/Pipeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ Let's use [github.com/purpleclay/daggerverse](https://daggerverse.dev/mod/github

```sh {"id":"01J04HR247XE1TK2MVB9SR4W51","name":"KERNEL_BINARY"}
dagger call \
-m golang \
--src ../runme \
-m golang \
--src ../runme \
build \
file \
--path runme
--path runme \
-o /tmp/runme-binary
```

### Grab the Presetup Script
Expand Down
4 changes: 2 additions & 2 deletions dagger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ terminalRows: 16
## List available functions

```sh {"excludeFromRunAll":"true","id":"01HTNVRK3AJ2AT8M24TA996RCJ","terminalRows":"15"}
dagger -m vscode-runme functions
dagger functions
```

## Build Kernel Binary
Expand All @@ -35,5 +35,5 @@ dagger --progress=plain call \
--binary /tmp/runme/runme \
--presetup dagger/scripts/presetup.sh \
build-extension \
--github-token cmd:"gh auth token"
--github-token-secret cmd:"gh auth token"
```
37 changes: 37 additions & 0 deletions dagger/notebook/shell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
runme:
id: 01JJDCG2SQSGV0DP55XCR55AYM
version: v3
shell: dagger shell
terminalRows: 20
---

# Compose Notebook Pipelines using the Dagger Shell

Let's get upstream artifacts ready. First, compile the Runme kernel binary.

```sh {"id":"01JJDCG2SPRDWGQ1F4Z6EH69EJ","name":"KERNEL_BINARY"}
github.com/purpleclay/daggerverse/golang $(git https://github.com/stateful/runme | head | tree) |
build |
file runme
```

Then, grab the presetup.sh script to provision the build container.

```sh {"id":"01JJDCG2SQSGV0DP55X86EJFSZ","name":"PRESETUP","terminalRows":"14"}
git https://github.com/stateful/vscode-runme |
head |
tree |
file dagger/scripts/presetup.sh
```

## Build the Runme VS Code Extension

Let's tie together above's artifacts via their respective cell names to build the Runme VS Code extension.

```sh {"id":"01JJDCG2SQSGV0DP55X8JVYDNR","name":"EXTENSION","terminalRows":"25"}
github.com/stateful/vscode-runme |
with-remote github.com/stateful/vscode-runme main |
with-container $(KERNEL_BINARY) $(PRESETUP) |
build-extension GITHUB_TOKEN
```
Loading