stdlib: renamed verbs to nouns

Signed-off-by: Sam Alba <sam.alba@gmail.com>
This commit is contained in:
Sam Alba 2021-06-15 17:57:14 +02:00
parent 6f9a61386e
commit d1454a9871
10 changed files with 35 additions and 29 deletions

View File

@ -8,13 +8,14 @@ import (
// Backend configuration
backend: {
// Source code to build this container
source: git.#Repository | dagger.#Artifact @dagger(input)
// Container environment variables
environment: {
[string]: string @dagger(input)
}
[string]: string
} @dagger(input)
// Public hostname (need to match the master domain configures on the loadbalancer)
hostname: string @dagger(input)
@ -39,16 +40,16 @@ backend: {
dockerfilePath: *"" | string @dagger(input)
// docker build args
dockerBuildArgs: {
[string]: string @dagger(input)
}
[string]: string
} @dagger(input)
}
// Init container runs only once when the main container starts
initContainer: {
command: [...string] @dagger(input)
environment: {
[string]: string @dagger(input)
}
[string]: string
} @dagger(input)
}
}

View File

@ -9,7 +9,7 @@ database: {
let slug = name
dbType: "mysql" | "postgresql" @dagger(input)
db: rds.#CreateDB & {
db: rds.#Database & {
config: infra.awsConfig
name: slug
dbArn: infra.rdsInstanceArn
@ -17,7 +17,7 @@ database: {
secretArn: infra.rdsAdminSecretArn
}
user: rds.#CreateUser & {
user: rds.#User & {
config: infra.awsConfig
dbArn: infra.rdsInstanceArn
"dbType": dbType

View File

@ -1,4 +1,4 @@
// AWS Cloud Formation
// AWS CloudFormation
package cloudformation
import (
@ -23,7 +23,7 @@ import (
// Stack parameters
parameters: {
...
}
} @dagger(input)
// Behavior when failure to create/update the Stack
onFailure: *"DO_NOTHING" | "ROLLBACK" | "DELETE" @dagger(input)
@ -32,7 +32,7 @@ import (
timeout: *10 | uint @dagger(input)
// Never update the stack if already exists
neverUpdate: *false | bool @dagger(input)
neverUpdate: *false | true @dagger(input)
#files: {
"/entrypoint.sh": #Code
@ -48,8 +48,8 @@ import (
}
outputs: {
[string]: string @dagger(output)
}
[string]: string
} @dagger(output)
outputs: #up: [
op.#Load & {

View File

@ -6,13 +6,13 @@ import (
"dagger.io/os"
)
// Convert AWS credentials to Docker Registry credentials for ECR
// Convert ECR credentials to Docker Login format
#Credentials: {
// AWS Config
config: aws.#Config
// ECR credentials
username: "AWS"
// ECR registry
username: "AWS" @dagger(output)
ctr: os.#Container & {
image: aws.#CLI & {
@ -22,10 +22,11 @@ import (
command: "aws ecr get-login-password > /out"
}
// ECR registry secret
secret: {
os.#File & {
from: ctr
path: "/out"
}
}.read.data
}.read.data @dagger(output)
}

View File

@ -5,8 +5,8 @@ import (
"dagger.io/aws"
)
// RunTask implements ecs run-task for running a single container on ECS
#RunTask: {
// Task implements ecs run-task for running a single container on ECS
#Task: {
// AWS Config
config: aws.#Config

View File

@ -19,7 +19,6 @@ import (
// kubeconfig is the generated kube configuration file
kubeconfig: {
@dagger(output)
string
#up: [
@ -58,5 +57,5 @@ import (
format: "string"
},
]
}
} @dagger(output)
}

View File

@ -8,6 +8,7 @@ import (
// Returns an unused rule priority (randomized in available range)
#RandomRulePriority: {
// AWS Config
config: aws.#Config

View File

@ -8,7 +8,8 @@ import (
)
// Creates a new Database on an existing RDS Instance
#CreateDB: {
#Database: {
// AWS Config
config: aws.#Config
@ -83,7 +84,8 @@ import (
}
// Creates a new user credentials on an existing RDS Instance
#CreateUser: {
#User: {
// AWS Config
config: aws.#Config
@ -107,7 +109,6 @@ import (
// Outputed username
out: {
@dagger(output)
string
#up: [
@ -188,11 +189,12 @@ import (
format: "string"
},
]
}
} @dagger(output)
}
// Fetches information on an existing RDS Instance
#Instance: {
// AWS Config
config: aws.#Config

View File

@ -94,6 +94,7 @@ import (
// S3 Bucket sync
#Sync: {
// AWS Config
config: aws.#Config
@ -103,8 +104,7 @@ import (
// Target S3 URL (eg. s3://<bucket-name>/<path>/<sub-path>)
target: string @dagger(input)
// Files that exist in the destination but not in the
// source are deleted during sync.
// Delete files that already exist on remote destination
delete: *false | bool @dagger(input)
// Object content type

View File

@ -11,8 +11,10 @@ import (
// GCP Config
config: gcp.#Config
// GCR credentials
username: "oauth2accesstoken"
// GCR registry username
username: "oauth2accesstoken" @dagger(output)
// GCR registry secret
secret: {
string