gitflow ux

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi
2021-05-07 14:45:15 -07:00
parent 52a1a6bac0
commit b77d1a1e3e
37 changed files with 495 additions and 1043 deletions

View File

@@ -1,44 +0,0 @@
package main
import (
"dagger.io/dagger/op"
)
// Reproduce inline issue.
// See https://github.com/dagger/dagger/issues/395
test: adhoc: repro395: {
good: {
// This field is correctly computed because its intermediary pipeline is not inlined.
hello: sayHello.message
// Intermediary pipeline cannot be inlined: it must be visible in a field
sayHello: {
message: {
string
#up: [
op.#FetchContainer & { ref: "alpine" },
op.#Exec & {
args: ["sh", "-c", "echo hello > /message"]
},
op.#Export & { source: "/message", format: "string" },
]
}
}
}
bad: {
// This field is NOT correctly computed because its intermediary pipeline is inlined.
hello: {
message: {
string
#up: [
op.#FetchContainer & { ref: "alpine" },
op.#Exec & {
args: ["sh", "-c", "echo hello > /message"]
},
op.#Export & { source: "/message", format: "string" },
]
}
}.message
}
}

View File

@@ -1,69 +0,0 @@
// A dagger workflow to develop dagger
package main
import (
"dagger.io/dagger"
"dagger.io/os"
"dagger.io/alpine"
"dagger.io/docker"
"dagger.io/go"
)
// Dagger source code
source: dagger.#Artifact
test: {
// Go unit tests
unit: {
logs: (os.#File & {
from: build.ctr
path: "/test.log"
read: format: "string"
}).read.data
}
// Full suite of bats integration tests
integration: {
// FIXME
}
}
// Build the dagger binaries
build: {
ctr: go.#Container & {
"source": source
setup: [
"apk add --no-cache file",
]
command: """
go test -v ./... > /test.log
go build -o /binaries/ ./cmd/... > /build.log
"""
}
binaries: docker.#Container & {
image: ctr
outputDir: "/binaries"
}
logs: (os.#File & {
from: ctr
path: "/build.log"
read: format: "string"
}).read.data
}
// Execute `dagger help`
usage: docker.#Container & {
image: alpine.#Image
command: "dagger help"
volume: binaries: {
from: build.binaries
dest: "/usr/local/dagger/bin/"
}
shell: search: "/usr/local/dagger/bin": true
}

View File

@@ -1 +0,0 @@
../../examples/hello-world

View File

@@ -1,21 +0,0 @@
package main
import (
"dagger.io/docker"
"dagger.io/os"
)
let ctr = docker.#Container & {
command: "echo 'hello world!' > /etc/motd"
}
motd: (os.#File & {
from: ctr
path: "/etc/motd"
read: format: "string"
}).read.data
etc: (os.#Dir & {
from: ctr
path: "/etc"
}).read.tree