Skip to content

Commit

Permalink
fix issue with dagger connect
Browse files Browse the repository at this point in the history
  • Loading branch information
tsirysndr committed Jan 26, 2024
1 parent 6788393 commit dc4ad9f
Show file tree
Hide file tree
Showing 18 changed files with 6,913 additions and 5,143 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/zenith.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v2
- name: Setup Dagger Zenith
run: |
curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.9.3 sh
curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.9.7 sh
sudo mv bin/dagger /usr/local/bin
dagger version
- name: Run Dagger Pipelines
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ llvmCov(
You can also use this pipeline programmatically:

```ts
import { build, test } from "https://pkg.fluentci.io/rust_pipeline@v0.8.2/mod.ts";
import { build, test } from "https://pkg.fluentci.io/rust_pipeline@v0.8.3/mod.ts";

await test();
await build();
Expand Down
2 changes: 1 addition & 1 deletion ci.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
build,
test,
} from "https://pkg.fluentci.io/rust_pipeline@v0.8.2/mod.ts";
} from "https://pkg.fluentci.io/rust_pipeline@v0.8.3/mod.ts";

await test();
await build();
352 changes: 352 additions & 0 deletions deno.lock

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions example/.fluentci/sdk/builder.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { createGQLClient } from "./client.ts";
import { Context } from "./context.ts";

/**
* @hidden
*
* Initialize a default client context from environment.
*/
export function initDefaultContext(): Context {
let ctx = new Context();

// Prefer DAGGER_SESSION_PORT if set
const daggerSessionPort = Deno.env.get("DAGGER_SESSION_PORT");
if (daggerSessionPort) {
const sessionToken = Deno.env.get("DAGGER_SESSION_TOKEN");
if (!sessionToken) {
throw new Error(
"DAGGER_SESSION_TOKEN must be set when using DAGGER_SESSION_PORT"
);
}

ctx = new Context({
client: createGQLClient(Number(daggerSessionPort), sessionToken),
});
} else {
throw new Error("DAGGER_SESSION_PORT must be set");
}

return ctx;
}
Loading

0 comments on commit dc4ad9f

Please sign in to comment.