cue modules: move stdlib to pkg/alpha.dagger.io
In preparation for Europa, we will vendor multiple CUE modules: - `pkg/alpha.dagger.io`: legacy non-europa packages - `pkg/dagger.io`: core Europa packages - `pkg/universe.dagger.io`: Europa universe Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
11
pkg/alpha.dagger.io/js/yarn/tests/testdata/package.json
vendored
Normal file
11
pkg/alpha.dagger.io/js/yarn/tests/testdata/package.json
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "test",
|
||||
"main": "index.js",
|
||||
"license": {
|
||||
"type": "Apache-2.0",
|
||||
"url": "https://opensource.org/licenses/apache2.0.php"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "mkdir -p ./build && echo output > ./build/test && touch .env && cp .env ./build/"
|
||||
}
|
||||
}
|
12
pkg/alpha.dagger.io/js/yarn/tests/testdata2/package.json
Normal file
12
pkg/alpha.dagger.io/js/yarn/tests/testdata2/package.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "test",
|
||||
"main": "index.js",
|
||||
"license": {
|
||||
"type": "Apache-2.0",
|
||||
"url": "https://opensource.org/licenses/apache2.0.php"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "mkdir -p ./build && cp /.env ./build/env"
|
||||
}
|
||||
}
|
||||
|
57
pkg/alpha.dagger.io/js/yarn/tests/yarn.cue
Normal file
57
pkg/alpha.dagger.io/js/yarn/tests/yarn.cue
Normal file
@@ -0,0 +1,57 @@
|
||||
package yarn
|
||||
|
||||
import (
|
||||
"alpha.dagger.io/dagger"
|
||||
"alpha.dagger.io/alpine"
|
||||
"alpha.dagger.io/os"
|
||||
)
|
||||
|
||||
TestData: dagger.#Artifact
|
||||
|
||||
TestReact: {
|
||||
pkg: #Package & {
|
||||
source: TestData
|
||||
}
|
||||
|
||||
test: os.#Container & {
|
||||
image: alpine.#Image & {
|
||||
package: bash: true
|
||||
}
|
||||
mount: "/build": from: pkg.build
|
||||
command: """
|
||||
test "$(cat /build/test)" = "output"
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
||||
TestData2: dagger.#Artifact
|
||||
|
||||
TestSecretsAndFile: {
|
||||
pkg: #Package & {
|
||||
source: 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"* ]]
|
||||
"""
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user