ci: base implementation for building dagger binary

Signed-off-by: Sam Alba <samalba@users.noreply.github.com>
This commit is contained in:
Sam Alba
2022-02-09 20:48:22 -08:00
parent e2670298ff
commit 7ecf0a97ad
3 changed files with 99 additions and 0 deletions

34
ci/base.cue Normal file
View File

@@ -0,0 +1,34 @@
package main
import (
"universe.dagger.io/docker"
)
let GoVersion = "1.17"
// Base container images used for the CI
images: {
// base image to build go binaries
goBuilder: docker.#Build & {
_packages: ["bash", "git"]
steps: [
docker.#Pull & {
source: "index.docker.io/golang:\(GoVersion)-alpine"
},
for pkg in _packages {
docker.#Run & {
command: {
name: "apk"
args: ["add", pkg]
flags: {
"-U": true
"--no-cache": true
}
}
}
},
]
}
}