Skip to content

Commit

Permalink
Provide a default output
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardogsilva committed May 21, 2024
1 parent 624e672 commit 14e2af2
Showing 1 changed file with 5 additions and 25 deletions.
30 changes: 5 additions & 25 deletions continuous-integration/dagger/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string> {
// 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.
Expand All @@ -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!'
}
}

Expand Down

0 comments on commit 14e2af2

Please sign in to comment.