diff --git a/pkg/universe.dagger.io/docker/build.cue b/pkg/universe.dagger.io/docker/build.cue index 7ff5c8a8..16e0724b 100644 --- a/pkg/universe.dagger.io/docker/build.cue +++ b/pkg/universe.dagger.io/docker/build.cue @@ -10,7 +10,6 @@ import ( steps: [#Step, ...#Step] output: #Image - // Generate build DAG from linerar steps _dag: { for idx, step in steps { diff --git a/pkg/universe.dagger.io/yarn/test/yarn-test.cue b/pkg/universe.dagger.io/yarn/test/yarn-test.cue index 014f238a..46262d6a 100644 --- a/pkg/universe.dagger.io/yarn/test/yarn-test.cue +++ b/pkg/universe.dagger.io/yarn/test/yarn-test.cue @@ -10,11 +10,9 @@ import ( ) dagger.#Plan & { - inputs: { - directories: { - testdata: path: "./testdata" - testdata2: path: "./testdata2" - } + inputs: directories: { + testdata: path: "./testdata" + testdata2: path: "./testdata2" } actions: { @@ -24,59 +22,59 @@ dagger.#Plan & { } pkg: yarn.#Build & { - source: inputs.directories.testdata.contents + source: inputs.directories.testdata.contents "cache": cache } _image: engine.#Pull & { - source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3" - } + source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3" + } // FIXME: use bash.#Script test: engine.#Exec & { input: _image.output mounts: build: { - dest: "/build" + dest: "/build" contents: pkg.output } args: [ "sh", "-c", #""" - test "$(cat /build/test)" = "output" - """# + test "$(cat /build/test)" = "output" + """#, ] } } // FIXME: re-enable? // TestSecretsAndFile: { - // pkg: #Package & { - // source: inputs.directories.testdata2 - // writeEnvFile: "/.env" - // env: { - // one: "one" - // two: "two" - // } - // secrets: { - // secretone: dagger.#Secret @dagger(input) - // secretwo: dagger.#Secret @dagger(input) - // } - // } + // pkg: #Package & { + // source: inputs.directories.testdata2 + // writeEnvFile: "/.env" + // env: { + // one: "one" + // two: "two" + // } + // secrets: { + // secretone: dagger.#Secret @dagger(input) + // secretwo: dagger.#Secret @dagger(input) + // } + // } - // test: os.#Container & { - // image: alpine.#Image & { - // package: bash: true - // } - // shell: path: "/bin/bash" - // mount: "/build": from: pkg.build - // command: """ - // content="$(cat /build/env)" - // [[ "${content}" = *"SECRETONE="* ]] && \\ - // [[ "${content}" = *"SECRETWO="* ]] && \\ - // [[ "${content}" = *"ONE=one"* ]] && \\ - // [[ "${content}" = *"TWO=two"* ]] - // """ - // } + // test: os.#Container & { + // image: alpine.#Image & { + // package: bash: true + // } + // shell: path: "/bin/bash" + // mount: "/build": from: pkg.build + // command: """ + // content="$(cat /build/env)" + // [[ "${content}" = *"SECRETONE="* ]] && \\ + // [[ "${content}" = *"SECRETWO="* ]] && \\ + // [[ "${content}" = *"ONE=one"* ]] && \\ + // [[ "${content}" = *"TWO=two"* ]] + // """ + // } // } } -} \ No newline at end of file +} diff --git a/pkg/universe.dagger.io/yarn/yarn.cue b/pkg/universe.dagger.io/yarn/yarn.cue index 4cac4723..ec883468 100644 --- a/pkg/universe.dagger.io/yarn/yarn.cue +++ b/pkg/universe.dagger.io/yarn/yarn.cue @@ -54,29 +54,28 @@ import ( yarnImage: docker.#Run & { image: alpine.image script: """ - apk add -U --no-cache bash yarn - """ + apk add -U --no-cache bash yarn + """ } // Run yarn in a containerized build environment command: bash.#Run & { // FIXME: not working? // *{ - // _image: alpine.#Build & { - // packages: { - // bash: version: "=~5.1" - // yarn: version: yarnVersion - // } - // } + // _image: alpine.#Build & { + // packages: { + // bash: version: "=~5.1" + // yarn: version: yarnVersion + // } + // } - // image: _image.output - // env: CUSTOM_IMAGE: "0" + // image: _image.output + // env: CUSTOM_IMAGE: "0" // } | { - // env: CUSTOM_IMAGE: "1" + // env: CUSTOM_IMAGE: "1" // } - image: docker.#Image & yarnImage.output - + image: docker.#Image & yarnImage.output script: #""" # Create $ENVFILE_NAME file if set