stdlib: renamed verbs to nouns
Signed-off-by: Sam Alba <sam.alba@gmail.com>
This commit is contained in:
parent
6f9a61386e
commit
d1454a9871
@ -8,13 +8,14 @@ import (
|
|||||||
|
|
||||||
// Backend configuration
|
// Backend configuration
|
||||||
backend: {
|
backend: {
|
||||||
|
|
||||||
// Source code to build this container
|
// Source code to build this container
|
||||||
source: git.#Repository | dagger.#Artifact @dagger(input)
|
source: git.#Repository | dagger.#Artifact @dagger(input)
|
||||||
|
|
||||||
// Container environment variables
|
// Container environment variables
|
||||||
environment: {
|
environment: {
|
||||||
[string]: string @dagger(input)
|
[string]: string
|
||||||
}
|
} @dagger(input)
|
||||||
|
|
||||||
// Public hostname (need to match the master domain configures on the loadbalancer)
|
// Public hostname (need to match the master domain configures on the loadbalancer)
|
||||||
hostname: string @dagger(input)
|
hostname: string @dagger(input)
|
||||||
@ -39,16 +40,16 @@ backend: {
|
|||||||
dockerfilePath: *"" | string @dagger(input)
|
dockerfilePath: *"" | string @dagger(input)
|
||||||
// docker build args
|
// docker build args
|
||||||
dockerBuildArgs: {
|
dockerBuildArgs: {
|
||||||
[string]: string @dagger(input)
|
[string]: string
|
||||||
}
|
} @dagger(input)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Init container runs only once when the main container starts
|
// Init container runs only once when the main container starts
|
||||||
initContainer: {
|
initContainer: {
|
||||||
command: [...string] @dagger(input)
|
command: [...string] @dagger(input)
|
||||||
environment: {
|
environment: {
|
||||||
[string]: string @dagger(input)
|
[string]: string
|
||||||
}
|
} @dagger(input)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ database: {
|
|||||||
let slug = name
|
let slug = name
|
||||||
dbType: "mysql" | "postgresql" @dagger(input)
|
dbType: "mysql" | "postgresql" @dagger(input)
|
||||||
|
|
||||||
db: rds.#CreateDB & {
|
db: rds.#Database & {
|
||||||
config: infra.awsConfig
|
config: infra.awsConfig
|
||||||
name: slug
|
name: slug
|
||||||
dbArn: infra.rdsInstanceArn
|
dbArn: infra.rdsInstanceArn
|
||||||
@ -17,7 +17,7 @@ database: {
|
|||||||
secretArn: infra.rdsAdminSecretArn
|
secretArn: infra.rdsAdminSecretArn
|
||||||
}
|
}
|
||||||
|
|
||||||
user: rds.#CreateUser & {
|
user: rds.#User & {
|
||||||
config: infra.awsConfig
|
config: infra.awsConfig
|
||||||
dbArn: infra.rdsInstanceArn
|
dbArn: infra.rdsInstanceArn
|
||||||
"dbType": dbType
|
"dbType": dbType
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// AWS Cloud Formation
|
// AWS CloudFormation
|
||||||
package cloudformation
|
package cloudformation
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@ -23,7 +23,7 @@ import (
|
|||||||
// Stack parameters
|
// Stack parameters
|
||||||
parameters: {
|
parameters: {
|
||||||
...
|
...
|
||||||
}
|
} @dagger(input)
|
||||||
|
|
||||||
// Behavior when failure to create/update the Stack
|
// Behavior when failure to create/update the Stack
|
||||||
onFailure: *"DO_NOTHING" | "ROLLBACK" | "DELETE" @dagger(input)
|
onFailure: *"DO_NOTHING" | "ROLLBACK" | "DELETE" @dagger(input)
|
||||||
@ -32,7 +32,7 @@ import (
|
|||||||
timeout: *10 | uint @dagger(input)
|
timeout: *10 | uint @dagger(input)
|
||||||
|
|
||||||
// Never update the stack if already exists
|
// Never update the stack if already exists
|
||||||
neverUpdate: *false | bool @dagger(input)
|
neverUpdate: *false | true @dagger(input)
|
||||||
|
|
||||||
#files: {
|
#files: {
|
||||||
"/entrypoint.sh": #Code
|
"/entrypoint.sh": #Code
|
||||||
@ -48,8 +48,8 @@ import (
|
|||||||
}
|
}
|
||||||
|
|
||||||
outputs: {
|
outputs: {
|
||||||
[string]: string @dagger(output)
|
[string]: string
|
||||||
}
|
} @dagger(output)
|
||||||
|
|
||||||
outputs: #up: [
|
outputs: #up: [
|
||||||
op.#Load & {
|
op.#Load & {
|
||||||
|
@ -6,13 +6,13 @@ import (
|
|||||||
"dagger.io/os"
|
"dagger.io/os"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Convert AWS credentials to Docker Registry credentials for ECR
|
// Convert ECR credentials to Docker Login format
|
||||||
#Credentials: {
|
#Credentials: {
|
||||||
// AWS Config
|
// AWS Config
|
||||||
config: aws.#Config
|
config: aws.#Config
|
||||||
|
|
||||||
// ECR credentials
|
// ECR registry
|
||||||
username: "AWS"
|
username: "AWS" @dagger(output)
|
||||||
|
|
||||||
ctr: os.#Container & {
|
ctr: os.#Container & {
|
||||||
image: aws.#CLI & {
|
image: aws.#CLI & {
|
||||||
@ -22,10 +22,11 @@ import (
|
|||||||
command: "aws ecr get-login-password > /out"
|
command: "aws ecr get-login-password > /out"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ECR registry secret
|
||||||
secret: {
|
secret: {
|
||||||
os.#File & {
|
os.#File & {
|
||||||
from: ctr
|
from: ctr
|
||||||
path: "/out"
|
path: "/out"
|
||||||
}
|
}
|
||||||
}.read.data
|
}.read.data @dagger(output)
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,8 @@ import (
|
|||||||
"dagger.io/aws"
|
"dagger.io/aws"
|
||||||
)
|
)
|
||||||
|
|
||||||
// RunTask implements ecs run-task for running a single container on ECS
|
// Task implements ecs run-task for running a single container on ECS
|
||||||
#RunTask: {
|
#Task: {
|
||||||
|
|
||||||
// AWS Config
|
// AWS Config
|
||||||
config: aws.#Config
|
config: aws.#Config
|
||||||
|
@ -19,7 +19,6 @@ import (
|
|||||||
|
|
||||||
// kubeconfig is the generated kube configuration file
|
// kubeconfig is the generated kube configuration file
|
||||||
kubeconfig: {
|
kubeconfig: {
|
||||||
@dagger(output)
|
|
||||||
string
|
string
|
||||||
|
|
||||||
#up: [
|
#up: [
|
||||||
@ -58,5 +57,5 @@ import (
|
|||||||
format: "string"
|
format: "string"
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
} @dagger(output)
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ import (
|
|||||||
|
|
||||||
// Returns an unused rule priority (randomized in available range)
|
// Returns an unused rule priority (randomized in available range)
|
||||||
#RandomRulePriority: {
|
#RandomRulePriority: {
|
||||||
|
|
||||||
// AWS Config
|
// AWS Config
|
||||||
config: aws.#Config
|
config: aws.#Config
|
||||||
|
|
||||||
|
@ -8,7 +8,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Creates a new Database on an existing RDS Instance
|
// Creates a new Database on an existing RDS Instance
|
||||||
#CreateDB: {
|
#Database: {
|
||||||
|
|
||||||
// AWS Config
|
// AWS Config
|
||||||
config: aws.#Config
|
config: aws.#Config
|
||||||
|
|
||||||
@ -83,7 +84,8 @@ import (
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Creates a new user credentials on an existing RDS Instance
|
// Creates a new user credentials on an existing RDS Instance
|
||||||
#CreateUser: {
|
#User: {
|
||||||
|
|
||||||
// AWS Config
|
// AWS Config
|
||||||
config: aws.#Config
|
config: aws.#Config
|
||||||
|
|
||||||
@ -107,7 +109,6 @@ import (
|
|||||||
|
|
||||||
// Outputed username
|
// Outputed username
|
||||||
out: {
|
out: {
|
||||||
@dagger(output)
|
|
||||||
string
|
string
|
||||||
|
|
||||||
#up: [
|
#up: [
|
||||||
@ -188,11 +189,12 @@ import (
|
|||||||
format: "string"
|
format: "string"
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
} @dagger(output)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fetches information on an existing RDS Instance
|
// Fetches information on an existing RDS Instance
|
||||||
#Instance: {
|
#Instance: {
|
||||||
|
|
||||||
// AWS Config
|
// AWS Config
|
||||||
config: aws.#Config
|
config: aws.#Config
|
||||||
|
|
||||||
|
@ -94,6 +94,7 @@ import (
|
|||||||
|
|
||||||
// S3 Bucket sync
|
// S3 Bucket sync
|
||||||
#Sync: {
|
#Sync: {
|
||||||
|
|
||||||
// AWS Config
|
// AWS Config
|
||||||
config: aws.#Config
|
config: aws.#Config
|
||||||
|
|
||||||
@ -103,8 +104,7 @@ import (
|
|||||||
// Target S3 URL (eg. s3://<bucket-name>/<path>/<sub-path>)
|
// Target S3 URL (eg. s3://<bucket-name>/<path>/<sub-path>)
|
||||||
target: string @dagger(input)
|
target: string @dagger(input)
|
||||||
|
|
||||||
// Files that exist in the destination but not in the
|
// Delete files that already exist on remote destination
|
||||||
// source are deleted during sync.
|
|
||||||
delete: *false | bool @dagger(input)
|
delete: *false | bool @dagger(input)
|
||||||
|
|
||||||
// Object content type
|
// Object content type
|
||||||
|
@ -11,8 +11,10 @@ import (
|
|||||||
// GCP Config
|
// GCP Config
|
||||||
config: gcp.#Config
|
config: gcp.#Config
|
||||||
|
|
||||||
// GCR credentials
|
// GCR registry username
|
||||||
username: "oauth2accesstoken"
|
username: "oauth2accesstoken" @dagger(output)
|
||||||
|
|
||||||
|
// GCR registry secret
|
||||||
secret: {
|
secret: {
|
||||||
string
|
string
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user