Work in progress: re-write changelog.com example for Europa

Signed-off-by: Solomon Hykes <solomon@dagger.io>
This commit is contained in:
Solomon Hykes
2021-12-15 09:10:47 +00:00
committed by Solomon Hykes
parent 6d4d10a002
commit 8b5a801380
9 changed files with 390 additions and 390 deletions

View File

@@ -13,28 +13,41 @@ import (
// Generate build DAG from linerar steps
dag: {
for idx, step in steps {
// As a special case, wrap #Run into a valid step
if step.run != _|_ {
"\(idx)": {
input: _
run: step & {
image: input
output: rootfs: _
}
output: {
config: input.config
rootfs: run.output.rootfs
}
}
}
///// FIXME: this section is broken and in the middle of debug + rewrite
//// // 1. image -> input
//// if (step.input == _|_) && ((step.image & #Image) != _|_) {
//// input: image
//// }
// Otherwise, just use the step as is
if step.run == _|_ {
"\(idx)": {
run: false
step
}
}
//// // 2.
//// if ((step.output & docker.#Image) == _|_) && ((step.output.rootfs & dagger.#FS) != _|_) {
////
//// }
//// // As a special case, wrap #Run into a valid step
//// if step.run != _|_ {
//// "\(idx)": {
//// input: _
//// run: step & {
//// image: input
//// output: rootfs: _
//// }
//// output: {
//// config: input.config
//// rootfs: run.output.rootfs
//// }
//// }
//// }
//// // Otherwise, just use the step as is
//// if step.run == _|_ {
//// "\(idx)": {
//// run: false
//// step
//// }
//// }
"\(idx)": step
// Either way, connect input to previous output
if idx > 0 {

View File

@@ -19,8 +19,8 @@ import (
// Run a command in a container
#Run: {
run: true // FIXME
image: #Image
input: image // for compatibility with #Build
always: bool | *false
@@ -104,7 +104,10 @@ import (
message: string | *null
}
output: {
output?: {
// FIXME: hack for #Build compatibility
#Image
rootfs?: dagger.#FS & _exec.output
files: [path=string]: {
contents: string