Skip to content

Commit

Permalink
Merge pull request #4 from fluent-ci-templates/feat/pipeline-args
Browse files Browse the repository at this point in the history
feat: handle pipeline arguments
  • Loading branch information
tsirysndr authored Nov 8, 2023
2 parents fc5e574 + 9a7c47d commit 61498f4
Show file tree
Hide file tree
Showing 6 changed files with 158 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ test(src: String!): String
You can also use this pipeline programmatically :

```ts
import { test, build } from "https://pkg.fluentci.io/bazel_pipeline@v0.3.1/mod.ts";
import { test, build } from "https://pkg.fluentci.io/bazel_pipeline@v0.4.0/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 {
test,
build,
} from "https://pkg.fluentci.io/bazel_pipeline@v0.3.1/mod.ts";
} from "https://pkg.fluentci.io/bazel_pipeline@v0.4.0/mod.ts";

await test();
await build();
151 changes: 150 additions & 1 deletion deno.lock

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ export {
join,
resolve,
} from "https://deno.land/std@0.203.0/path/mod.ts";
export { parse } from "https://deno.land/std@0.205.0/flags/mod.ts";
export { snakeCase, camelCase } from "https://cdn.skypack.dev/lodash";

export * as FluentGitlabCI from "https://deno.land/x/fluent_gitlab_ci@v0.4.2/mod.ts";
export * as FluentGithubActions from "https://deno.land/x/fluent_github_actions@v0.2.1/mod.ts";
Expand Down
2 changes: 2 additions & 0 deletions example/.fluentci/src/dagger/jobs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,5 @@ export const jobDescriptions: Record<Job, string> = {
[Job.build]: "Build the project",
[Job.test]: "Run tests",
};

export const pipelineName = "bazel_pipeline";
4 changes: 2 additions & 2 deletions example/.fluentci/src/dagger/list_jobs.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { brightGreen, stringifyTree } from "../../deps.ts";
import { runnableJobs, jobDescriptions, Job } from "./jobs.ts";
import { runnableJobs, jobDescriptions, Job, pipelineName } from "./jobs.ts";

const tree = {
name: brightGreen("bazel_pipeline"),
name: brightGreen(pipelineName),
children: (Object.keys(runnableJobs) as Job[]).map((job) => ({
name: jobDescriptions[job]
? `${brightGreen(job)} - ${jobDescriptions[job]}`
Expand Down

0 comments on commit 61498f4

Please sign in to comment.