Dev env: adopt gitflow layout

Signed-off-by: Solomon Hykes <solomon@dagger.io>
This commit is contained in:
Solomon Hykes 2021-05-25 00:54:26 +00:00 committed by Solomon Hykes
parent 3349955144
commit aa34e95eee
3 changed files with 91 additions and 0 deletions

2
.dagger/env/dev/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# dagger state
state/**

63
.dagger/env/dev/plan/main.cue vendored Normal file
View File

@ -0,0 +1,63 @@
// A dagger workflow to develop dagger
package main
import (
"dagger.io/dagger"
"dagger.io/os"
"dagger.io/go"
)
// Dagger source code
source: dagger.#Artifact @dagger(input)
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: os.#Dir & {
from: ctr
path: "/binaries"
}
logs: (os.#File & {
from: ctr
path: "/build.log"
read: format: "string"
}).read.data
}
// Execute `dagger help`
usage: os.#Container & {
command: "dagger help"
let binpath="/usr/local/dagger/bin"
mount: "\(binpath)": from: build.binaries
shell: search: "\(binpath)": true
}

26
.dagger/env/dev/values.yaml vendored Normal file
View File

@ -0,0 +1,26 @@
name: dev
inputs:
source:
dir:
path: .
include: []
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age1ez5phfa2l6e9fqt4nnem734jajg4nlcefhv3ydeltzjlele47ags34868h
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA4c0xSL1hJZmtsejN0dGpM
OCtpNFdLK0ZUdlc2YXBQV1RaazFpcERSOG5BClZzZGR3YllQODk5dGp5akpxVkhM
YUFxODJVeG1XbHl1WEVmNkMwREdldkkKLS0tIGNDVzNkak9UMnVyQkRHN3Q0TjZz
TWhsS0NUcU5ac0YrQjdmM0dlcEdRYWMKqUO/A83KsECVW+hSgVLTkIuK11VX3T77
fBSXL9D+riW9Q/TCKP0uMVulGnqZF4OoHAzLCug7aV6AEszpeSWyjg==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2021-05-25T00:31:59Z"
mac: ENC[AES256_GCM,data:CMrCKRLDHc/o18zlVc/nwin1d14y2ruhk4i3mL/jtzDVeXDusJpelcgYAsNvKdhXU1v/gl1P4fINzQ4zc6t3krWW80UQFXBSZ1c2EJThKzVQfKFOwr3Fg3FyTm3zeX9Lk4e8z1SFmBj08k3jxr1xtdKwPKLmYN8e37cOy0bT97c=,iv:ffvYUpDxFLCyCynEVkFkBHCsp4HzLFcabiSjuCM0r40=,tag:ZwjW3qB8XcIvF+GoHjsbaQ==,type:str]
pgp: []
encrypted_suffix: secret
version: 3.7.1