Skip to content

Commit

Permalink
Merge pull request #4 from fluent-ci-templates/zenith
Browse files Browse the repository at this point in the history
make it compatible with Dagger Zenith
  • Loading branch information
tsirysndr authored Oct 22, 2023
2 parents f2ca51b + c6176b4 commit 57493af
Show file tree
Hide file tree
Showing 14 changed files with 425 additions and 115 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
run: deno install -A -r https://cli.fluentci.io -n fluentci
- name: Setup Dagger
run: |
curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh
curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.8 sh
sudo mv bin/dagger /usr/local/bin
dagger version
- name: Run Dagger Pipelines
Expand Down
20 changes: 9 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Terragrunt Pipeline

[![fluentci pipeline](https://img.shields.io/badge/dynamic/json?label=pkg.fluentci.io&labelColor=%23000&color=%23460cf1&url=https%3A%2F%2Fapi.fluentci.io%2Fv1%2Fpipeline%2Fterragrunt_pipeline&query=%24.version)](https://pkg.fluentci.io/terragrunt_pipeline)
![deno compatibility](https://shield.deno.dev/deno/^1.34)
![deno compatibility](https://shield.deno.dev/deno/^1.37)
[![](https://img.shields.io/codecov/c/gh/fluent-ci-templates/terragrunt-pipeline)](https://codecov.io/gh/fluent-ci-templates/terragrunt-pipeline)

A ready-to-use CI/CD Pipeline for managing your infrastructure with [Terragrunt](https://terragrunt.gruntwork.io/).
Expand Down Expand Up @@ -66,20 +66,18 @@ fluentci run .
| validate | Validate the configuration files |
| apply | Apply infrastructure changes |

```graphql
apply(src: String!, tfVersion: String): String
validate(src: String!, tfVersion: String): String
```

## Programmatic usage

You can also use this pipeline programmatically:

```ts
import Client, { connect } from "https://sdk.fluentci.io/v0.1.9/mod.ts";
import { validate, apply } from "https://pkg.fluentci.io/terragrunt_pipeline@v0.3.1/mod.ts";

function pipeline(src = ".") {
connect(async (client: Client) => {
await validate(client, src);
await apply(client, src);
});
}
import { validate, apply } from "https://pkg.fluentci.io/terragrunt_pipeline@v0.4.0/mod.ts";

pipeline();
await validate();
await apply();
```
13 changes: 3 additions & 10 deletions ci.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
import Client, { connect } from "https://sdk.fluentci.io/v0.1.9/mod.ts";
import {
validate,
apply,
} from "https://pkg.fluentci.io/terragrunt_pipeline@v0.3.1/mod.ts";
} from "https://pkg.fluentci.io/terragrunt_pipeline@v0.4.0/mod.ts";

function pipeline(src = ".") {
connect(async (client: Client) => {
await validate(client, src);
await apply(client, src);
});
}

pipeline();
await validate();
await apply();
5 changes: 5 additions & 0 deletions dagger.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"root": "",
"name": "terragrunt",
"sdkRuntime": "tsiry/dagger-sdk-deno"
}
13 changes: 9 additions & 4 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,29 @@
"tasks": {
"esm:add": "deno run -A https://esm.sh/v128 add",
"esm:update": "deno run -A https://esm.sh/v128 update",
"esm:remove": "deno run -A https://esm.sh/v128 remove"
"esm:remove": "deno run -A https://esm.sh/v128 remove",
"schema": "deno run -A src/dagger/schema.ts",
"clean": "rm -rf gen schema.graphql"
},
"fmt": {
"exclude": [
"example/",
".fluentci/"
".fluentci/",
"gen/"
]
},
"lint": {
"exclude": [
"example/",
".fluentci/"
".fluentci/",
"gen/"
]
},
"test": {
"exclude": [
"example/",
".fluentci/"
".fluentci/",
"gen/"
]
}
}
78 changes: 76 additions & 2 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 20 additions & 4 deletions deps.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,31 @@
export { assertEquals } from "https://deno.land/std@0.191.0/testing/asserts.ts";
import Client from "https://sdk.fluentci.io/v0.1.9/mod.ts";
import Client from "https://sdk.fluentci.io/z1/mod.ts";
export default Client;

export {
connect,
uploadContext,
Container,
} from "https://sdk.fluentci.io/v0.1.9/mod.ts";
CacheSharingMode,
} from "https://sdk.fluentci.io/z1/mod.ts";
export { brightGreen } from "https://deno.land/std@0.191.0/fmt/colors.ts";
export { withDevbox } from "https://nix.fluentci.io/v0.5.1/src/dagger/steps.ts";
export { withDevbox } from "https://nix.fluentci.io/zenith/src/dagger/steps.ts";
export { stringifyTree } from "https://esm.sh/stringify-tree@1.1.1";
import gql from "https://esm.sh/graphql-tag@2.12.6";
export { gql };

export {
arg,
queryType,
stringArg,
intArg,
nonNull,
makeSchema,
} from "npm:nexus";
export {
dirname,
join,
resolve,
} from "https://deno.land/std@0.203.0/path/mod.ts";

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
141 changes: 141 additions & 0 deletions gen/nexus.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
/**
* This file was generated by Nexus Schema
* Do not make changes to this file directly
*/







declare global {
interface NexusGen extends NexusGenTypes {}
}

export interface NexusGenInputs {
}

export interface NexusGenEnums {
}

export interface NexusGenScalars {
String: string
Int: number
Float: number
Boolean: boolean
ID: string
}

export interface NexusGenObjects {
Query: {};
}

export interface NexusGenInterfaces {
}

export interface NexusGenUnions {
}

export type NexusGenRootTypes = NexusGenObjects

export type NexusGenAllTypes = NexusGenRootTypes & NexusGenScalars

export interface NexusGenFieldTypes {
Query: { // field return type
apply: string | null; // String
validate: string | null; // String
}
}

export interface NexusGenFieldTypeNames {
Query: { // field return type name
apply: 'String'
validate: 'String'
}
}

export interface NexusGenArgTypes {
Query: {
apply: { // args
src: string; // String!
tfVersion?: string | null; // String
}
validate: { // args
src: string; // String!
tfVersion?: string | null; // String
}
}
}

export interface NexusGenAbstractTypeMembers {
}

export interface NexusGenTypeInterfaces {
}

export type NexusGenObjectNames = keyof NexusGenObjects;

export type NexusGenInputNames = never;

export type NexusGenEnumNames = never;

export type NexusGenInterfaceNames = never;

export type NexusGenScalarNames = keyof NexusGenScalars;

export type NexusGenUnionNames = never;

export type NexusGenObjectsUsingAbstractStrategyIsTypeOf = never;

export type NexusGenAbstractsUsingStrategyResolveType = never;

export type NexusGenFeaturesConfig = {
abstractTypeStrategies: {
isTypeOf: false
resolveType: true
__typename: false
}
}

export interface NexusGenTypes {
context: any;
inputTypes: NexusGenInputs;
rootTypes: NexusGenRootTypes;
inputTypeShapes: NexusGenInputs & NexusGenEnums & NexusGenScalars;
argTypes: NexusGenArgTypes;
fieldTypes: NexusGenFieldTypes;
fieldTypeNames: NexusGenFieldTypeNames;
allTypes: NexusGenAllTypes;
typeInterfaces: NexusGenTypeInterfaces;
objectNames: NexusGenObjectNames;
inputNames: NexusGenInputNames;
enumNames: NexusGenEnumNames;
interfaceNames: NexusGenInterfaceNames;
scalarNames: NexusGenScalarNames;
unionNames: NexusGenUnionNames;
allInputTypes: NexusGenTypes['inputNames'] | NexusGenTypes['enumNames'] | NexusGenTypes['scalarNames'];
allOutputTypes: NexusGenTypes['objectNames'] | NexusGenTypes['enumNames'] | NexusGenTypes['unionNames'] | NexusGenTypes['interfaceNames'] | NexusGenTypes['scalarNames'];
allNamedTypes: NexusGenTypes['allInputTypes'] | NexusGenTypes['allOutputTypes']
abstractTypes: NexusGenTypes['interfaceNames'] | NexusGenTypes['unionNames'];
abstractTypeMembers: NexusGenAbstractTypeMembers;
objectsUsingAbstractStrategyIsTypeOf: NexusGenObjectsUsingAbstractStrategyIsTypeOf;
abstractsUsingStrategyResolveType: NexusGenAbstractsUsingStrategyResolveType;
features: NexusGenFeaturesConfig;
}


declare global {
interface NexusGenPluginTypeConfig<TypeName extends string> {
}
interface NexusGenPluginInputTypeConfig<TypeName extends string> {
}
interface NexusGenPluginFieldConfig<TypeName extends string, FieldName extends string> {
}
interface NexusGenPluginInputFieldConfig<TypeName extends string, FieldName extends string> {
}
interface NexusGenPluginSchemaConfig {
}
interface NexusGenPluginArgConfig {
}
}
2 changes: 2 additions & 0 deletions mod.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
export * from "./src/dagger/index.ts";
export * as queries from "./src/dagger/queries.ts";
export { schema } from "./src/dagger/schema.ts";
Loading

0 comments on commit 57493af

Please sign in to comment.