From 14e2af21ab326302ea7fa9ec1d873cf185ce03f8 Mon Sep 17 00:00:00 2001 From: Ricardo Garcia Silva Date: Tue, 21 May 2024 16:16:48 +0100 Subject: [PATCH] Provide a default output --- continuous-integration/dagger/src/index.ts | 30 ++++------------------ 1 file changed, 5 insertions(+), 25 deletions(-) diff --git a/continuous-integration/dagger/src/index.ts b/continuous-integration/dagger/src/index.ts index cd55bda..e6a48f4 100644 --- a/continuous-integration/dagger/src/index.ts +++ b/continuous-integration/dagger/src/index.ts @@ -17,27 +17,6 @@ import { dag, Container, Directory, object, func } from "@dagger.io/dagger" @object() class ContinuousIntegration { - /** - * Returns a container that echoes whatever string argument is provided - */ - // @func() - // containerEcho(stringArg: string): Container { - // return dag.container().from("alpine:latest").withExec(["echo", stringArg]) - // } - // - // /** - // * Returns lines that match a pattern in the files of the provided Directory - // */ - // @func() - // async grepDir(directoryArg: Directory, pattern: string): Promise { - // return dag - // .container() - // .from("alpine:latest") - // .withMountedDirectory("/mnt", directoryArg) - // .withWorkdir("/mnt") - // .withExec(["grep", "-R", pattern, "."]) - // .stdout() - // } /** * Build the project's docker image and optionally publish it in a registry. @@ -53,17 +32,18 @@ class ContinuousIntegration { .build( repoRootPath, { - dockerfile: "Dockerfile" + dockerfile: 'Dockerfile' } ) .withLabel( - "org.opencontainers.image.source", - "https://github.com/geobeyond/Arpav-PPCV" + 'org.opencontainers.image.source', + 'https://github.com/geobeyond/Arpav-PPCV' ) - if (publishDockerImage) { const sanitizedName = this._sanitizeDockerImageName(publishDockerImage) return await builtImage.publish(sanitizedName) + } else { + return 'Done!' } }