2887139bf7
- Improve #Container with a better docker.#Run integration - Supports concurrency caching in #Container - Simplify code maintainability and readability - Simplify binary export in #Build - Support multi binary building - External #Version management Signed-off-by: Vasek - Tom C <tom.chauveau@epitech.eu>
45 lines
642 B
CUE
45 lines
642 B
CUE
package go
|
|
|
|
import (
|
|
"dagger.io/dagger"
|
|
"universe.dagger.io/go"
|
|
"universe.dagger.io/docker"
|
|
)
|
|
|
|
dagger.#Plan & {
|
|
actions: tests: image: {
|
|
_source: dagger.#Scratch & {}
|
|
|
|
simple: {
|
|
_image: go.#Image & {}
|
|
|
|
verify: docker.#Run & {
|
|
input: _image.output
|
|
command: {
|
|
name: "/bin/sh"
|
|
args: ["-c", """
|
|
go version | grep "1.16"
|
|
"""]
|
|
}
|
|
}
|
|
}
|
|
|
|
custom: {
|
|
_image: go.#Image & {
|
|
version: "1.17"
|
|
packages: bash: _
|
|
}
|
|
|
|
verify: docker.#Run & {
|
|
input: _image.output
|
|
command: {
|
|
name: "/bin/bash"
|
|
args: ["-c", """
|
|
go version | grep "1.17"
|
|
"""]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|