AWS Config shared by all AWS packages
| FIELD | SPEC | DOC | 
|---|---|---|
| region | string | N/A | 
AWS CloudFormation Stack
| FIELD | SPEC | DOC | 
|---|---|---|
| source | string | Source is the Cloudformation template, either a Cue struct or a JSON/YAML string | 
| config | aws.Config | AWS Config | 
| stackName | string | Stackname is the cloudformation stack | 
| parameters | { [string]: string } | Stack parameters | 
| stackOutput | run.output["/outputs/stack_output"] | Output of the stack apply | 
Credentials retriever for ECR
| FIELD | SPEC | DOC | 
|---|---|---|
| status | "completed" | "error" | "cancelled" | "cached" | "skipped" | N/A | 
| code | "    export AWS_ACCESS_KEY_ID=\"$(cat /inputs/aws/access_key)\"\n    export AWS_SECRET_ACCESS_KEY=\"$(cat /inputs/aws/secret_key)\"\n\n    credentials=$(cat /inputs/target | docker-credential-ecr-login get)\n\n    echo $credentials | jq -j .Username \> /outputs/username\n    echo $credentials | jq -j .Secret \> /outputs/secret\n    echo $credentials | \\\n        jq -j .ServerURL | \\\n        sed \"s=http[s]*://==\" | \\\n        cut -d'/' -f1 \> /outputs/registry" | N/A | 
| os | C{alpineVersion: "latest", alpineDigest: "sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d", package: (close((({[]: (pkg: string)-\>true, } & C{bash: true}) & C{jq: true})) & {curl: true}), extraCommand: (close([, ...string]) & ["curl -o \"/usr/local/bin/docker-credential-ecr-login\" \\\n    \""+helperUrl+"\" && \\\n    chmod +x \"/usr/local/bin/docker-credential-ecr-login\""])} | N/A | 
| input | {[]: (path: string)-\>(Directory | string | bytes | Cache | Secret), "/entrypoint.sh": code, "/inputs/aws/access_key": config.accessKey, "/inputs/aws/secret_key": config.secretKey, "/inputs/target": target} | N/A | 
| command | [(string & "/bin/bash"),(string & "--noprofile"),(string & "--norc"),(string & "-xeo"),(string & "pipefail"),(string & "/entrypoint.sh")] | N/A | 
| $bl | "bl.Run" | N/A | 
| auth | C{[]: (host: string)-\>RegistryCredentials, ""+target+"": credentials} | Authentication for ECR Registries | 
| environment | {[]: (_: string)-\>string, AWS_DEFAULT_REGION: config.region} | N/A | 
| workdir | string | *"/" | N/A | 
| runPolicy | "always" | N/A | 
| output | {[]: (path: string)-\>(Directory | string | bytes), "/outputs/registry": string, "/outputs/username": string, "/outputs/secret": string} | N/A | 
| target | string | Target is the ECR image | 
| config | aws.Config | AWS Config | 
| credentials | bl.RegistryCredentials & { username: output["/outputs/username"] secret: bl.Secret & { // FIXME: we should be able to output a bl.Secret directly value: base64.Encode(null, output["/outputs/secret"]) } } | ECR credentials | 
| helperUrl | "https://amazon-ecr-credential-helper-releases.s3.us-east-2.amazonaws.com/0.4.0/linux-amd64/docker-credential-ecr-login" | N/A | 
| FIELD | SPEC | DOC | 
|---|---|---|
| cpu | *256 | uint | N/A | 
| memory | *512 | uint | N/A | 
| networkMode | *"bridge" | string | N/A | 
| containers | [...Container] | N/A | 
| resources | { ECSTaskDefinition: { Type: "AWS::ECS::TaskDefinition" Properties: { Cpu: strconv.FormatUint(cpu, 10) Memory: strconv.FormatUint(memory, 10) if (roleArn & string) != _|_ { TaskRoleArn: roleArn } NetworkMode: networkMode ContainerDefinitions: containers } } } | N/A | 
| FIELD | SPEC | DOC | 
|---|---|---|
| Command | [...string] | N/A | 
| Name | string | N/A | 
| Image | string | N/A | 
| FIELD | SPEC | DOC | 
|---|---|---|
| config | aws.Config | N/A | 
| resources | { ECSListenerRule: { Type: "AWS::ElasticLoadBalancingV2::ListenerRule" Properties: { ListenerArn: elbListenerArn Priority: elbRulePriority Conditions: [{ Field: "host-header" Values: [hostName] }] Actions: [{ Type: "forward" TargetGroupArn: Ref: "ECSTargetGroup" }] } } ECSTargetGroup: { Type: "AWS::ElasticLoadBalancingV2::TargetGroup" Properties: { VpcId: vpcID Port: 80 Protocol: "HTTP" } } ECSService: { Type: "AWS::ECS::Service" Properties: { Cluster: cluster DesiredCount: desiredCount LaunchType: launchType LoadBalancers: [{ TargetGroupArn: Ref: "ECSTargetGroup" ContainerName: containerName ContainerPort: containerPort }] ServiceName: serviceName TaskDefinition: Ref: "ECSTaskDefinition" DeploymentConfiguration: { MaximumPercent: 100 MinimumHealthyPercent: 50 } } DependsOn: "ECSListenerRule" } } | N/A | 
| cluster | string | ECS cluster name or ARN | 
| containerPort | int & \>=0 | Container port | 
| containerName | string | Container name | 
| launchType | "FARGATE" | "EC2" | Service launch type | 
| vpcID | string | VPC id of the cluster | 
| elbListenerArn | string | ARN of the ELB listener | 
| elbRulePriority | uint | *100 | ELB rule priority | 
| hostName | string | Hostname of the publicly accessible service | 
| serviceName | string | Name of the service | 
SimpleECSApp is a simplified interface for ECS
| FIELD | SPEC | DOC | 
|---|---|---|
| config | aws.Config | N/A | 
| resources | C{ECSTaskDefinition: C{Type: "AWS::ECS::TaskDefinition", Properties: C{Cpu: FormatUint (cpu,10), Memory: FormatUint (memory,10), NetworkMode: networkMode, ContainerDefinitions: containers if ((roleArn & string) != _|_(from source)) yield C{TaskRoleArn: roleArn}}}, ECSListenerRule: C{Type: "AWS::ElasticLoadBalancingV2::ListenerRule", Properties: C{ListenerArn: elbListenerArn, Priority: elbRulePriority, Conditions: [C{Field: "host-header", Values: [hostName]}], Actions: [C{Type: "forward", TargetGroupArn: C{Ref: "ECSTargetGroup"}}]}}, ECSTargetGroup: C{Type: "AWS::ElasticLoadBalancingV2::TargetGroup", Properties: C{Protocol: "HTTP", VpcId: vpcID, Port: 80}}, ECSService: C{Type: "AWS::ECS::Service", Properties: C{Cluster: cluster, DesiredCount: desiredCount, LaunchType: launchType, LoadBalancers: [C{ContainerPort: containerPort, TargetGroupArn: C{Ref: "ECSTargetGroup"}, ContainerName: containerName}], ServiceName: serviceName, TaskDefinition: C{Ref: "ECSTaskDefinition"}, DeploymentConfiguration: C{MaximumPercent: 100, MinimumHealthyPercent: 50}}, DependsOn: "ECSListenerRule"}} | N/A | 
| containerPort | *80 | uint | N/A | 
| hostname | string | N/A | 
| containerImage | string | N/A | 
| infra | { cluster: string vpcID: string elbListenerArn: string } | N/A | 
| subDomain | strings.Split(hostname, ".")[0] | N/A | 
| out | cfn.stackOutput | N/A | 
| cfn | cloudformation.Stack & { config: inputConfig source: json.Marshal({ AWSTemplateFormatVersion: "2010-09-09" Description: "ECS App deployed with Blocklayer" Resources: resources }) stackName: "bl-ecs-\(subDomain)" } | N/A | 
KubeConfig config outputs a valid kube-auth-config for kubectl client
| FIELD | SPEC | DOC | 
|---|---|---|
| config | aws.Config | AWS Config | 
| cluster | string | EKS cluster name | 
Elastic Beanstalk Application
| FIELD | SPEC | DOC | 
|---|---|---|
| config | aws.Config | AWS Config | 
| applicationName | string | Beanstalk application name | 
| out | run.output["/outputs/out"] | N/A | 
Elastic Beanstalk Environment
| FIELD | SPEC | DOC | 
|---|---|---|
| platform | string | Elastic Beanstalk platform to use | 
| config | aws.Config | AWS Config | 
| applicationName | string | Application name | 
| out | run.output["/outputs/out"] | N/A | 
| environmentName | string | Beanstalk environment name | 
| createOptions | { cname?: string tier?: string instance_type?: string instance_profile?: string service_role?: string keyname?: string scale?: string elb_type?: string } | Environment create options; check eb create --help | 
| cname | strings.TrimRight(run.output["/outputs/cname"], "\n") | N/A | 
Elastic Beanstalk Deployment
| FIELD | SPEC | DOC | 
|---|---|---|
| config | aws.Config | AWS Config | 
| applicationName | string | Application name | 
| environmentName | string | Beanstalk environment name | 
| cname | strings.TrimRight(run.output["/outputs/cname"], "\n") | N/A | 
Returns a non-taken rule priority
| FIELD | SPEC | DOC | 
|---|---|---|
| status | "completed" | "error" | "cancelled" | "cached" | "skipped" | N/A | 
| code | "export AWS_ACCESS_KEY_ID=\"$(cat /inputs/aws/access_key)\"\nexport AWS_SECRET_ACCESS_KEY=\"$(cat /inputs/aws/secret_key)\"\n\nif [ -s /inputs/vhost ]; then\n    # We passed a vhost as input, try to recycle priority from previously allocated vhost\n    vhost=\"$(cat /inputs/vhost)\"\n\n    priority=$(aws elbv2 describe-rules --no-paginate \\\n        --listener-arn \"$(cat /inputs/listenerArn)\" | \\\n        jq -r --arg vhost \"$vhost\" '.Rules[] | select(.Conditions[].HostHeaderConfig.Values[] == $vhost) | .Priority')\n\n    if [ -n \"${priority}\" ]; then\n        echo -n \"${priority}\" \> /outputs/priority\n        exit 0\n    fi\nfi\n\n# Find the next priority available that we can allocate\naws elbv2 describe-rules --no-paginate \\\n    --listener-arn \"$(cat /inputs/listenerArn)\" \\\n    | jq '[ .Rules[].Priority | select(. != \"default\") | tonumber ] | max + 1' \\\n    \> /outputs/priority" | N/A | 
| os | C{alpineVersion: "latest", alpineDigest: "sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d", package: (close((({[]: (pkg: string)-\>true, } & C{bash: true}) & C{jq: true})) & {python: true, coreutils: true}), extraCommand: (close([, ...string]) & ["apk add --no-cache py-pip && pip install awscli && apk del py-pip"])} | N/A | 
| input | {[]: (path: string)-\>(Directory | string | bytes | Cache | Secret), "/entrypoint.sh": code, "/inputs/aws/access_key": config.accessKey, "/inputs/aws/secret_key": config.secretKey, "/inputs/listenerArn": listenerArn, "/inputs/vhost": vhost, "/cache/aws": Cache} | N/A | 
| command | [(string & "/bin/bash"),(string & "--noprofile"),(string & "--norc"),(string & "-xeo"),(string & "pipefail"),(string & "/entrypoint.sh")] | N/A | 
| $bl | "bl.Run" | N/A | 
| environment | {[]: (_: string)-\>string, AWS_DEFAULT_REGION: config.region, AWS_CONFIG_FILE: "/cache/aws/config"} | N/A | 
| workdir | string | *"/" | N/A | 
| runPolicy | "always" | N/A | 
| output | {[]: (path: string)-\>(Directory | string | bytes), "/outputs/priority": string} | N/A | 
| config | aws.Config | AWS Config | 
| listenerArn | string | ListenerArn | 
| vhost | string | *"" | Optional vhost for reusing priorities | 
| priority | strconv.Atoi(strings.TrimRight(output["/outputs/priority"], "\n")) | Priority number | 
| FIELD | SPEC | DOC | 
|---|---|---|
| name | string | DB name | 
| status | "completed" | "error" | "cancelled" | "cached" | "skipped" | N/A | 
| code | "set +o pipefail\n\nexport AWS_ACCESS_KEY_ID=\"$(cat /inputs/aws/access_key)\"\nexport AWS_SECRET_ACCESS_KEY=\"$(cat /inputs/aws/secret_key)\"\n\naws rds-data execute-statement \\\n    --resource-arn \"$(cat /inputs/db_arn)\" \\\n    --secret-arn \"$(cat /inputs/secret_arn)\" \\\n    --sql \"CREATE DATABASE \\`$(cat /inputs/name)\\`\" \\\n    --no-include-result-metadata \\\n|& tee /tmp/out\nexit_code=${PIPESTATUS[0]}\nif [ $exit_code -ne 0 ]; then\n    cat /tmp/out\n    grep -q \"database exists\" /tmp/out\n    [ $? -ne 0 ] && exit $exit_code\nfi\ncp /inputs/name /outputs/dbCreated" | N/A | 
| os | C{alpineVersion: "latest", alpineDigest: "sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d", package: (close((({[]: (pkg: string)-\>true, } & C{bash: true}) & C{jq: true})) & {python: true, coreutils: true}), extraCommand: (close([, ...string]) & ["apk add --no-cache py-pip && pip install awscli && apk del py-pip"])} | N/A | 
| input | {[]: (path: string)-\>(Directory | string | bytes | Cache | Secret), "/entrypoint.sh": code, "/inputs/aws/access_key": config.accessKey, "/inputs/aws/secret_key": config.secretKey, "/inputs/name": name, "/inputs/db_arn": dbArn, "/inputs/secret_arn": secretArn} | N/A | 
| command | [(string & "/bin/bash"),(string & "--noprofile"),(string & "--norc"),(string & "-xeo"),(string & "pipefail"),(string & "/entrypoint.sh")] | N/A | 
| $bl | "bl.Run" | N/A | 
| environment | {[]: (_: string)-\>string, AWS_DEFAULT_REGION: config.region} | N/A | 
| workdir | string | *"/" | N/A | 
| runPolicy | *"onChange" | "always" | "never" | N/A | 
| output | {[]: (path: string)-\>(Directory | string | bytes), "/outputs/dbCreated": string} | N/A | 
| config | aws.Config | AWS Config | 
| dbArn | string | ARN of the database instance | 
| secretArn | string | ARN of the database secret (for connecting via rds api) | 
| dbCreated | output["/outputs/dbCreated"] | N/A | 
| FIELD | SPEC | DOC | 
|---|---|---|
| status | "completed" | "error" | "cancelled" | "cached" | "skipped" | N/A | 
| code | "set +o pipefail\n\nexport AWS_ACCESS_KEY_ID=\"$(cat /inputs/aws/access_key)\"\nexport AWS_SECRET_ACCESS_KEY=\"$(cat /inputs/aws/secret_key)\"\n\naws rds-data execute-statement \\\n    --resource-arn \"$(cat /inputs/db_arn)\" \\\n    --secret-arn \"$(cat /inputs/secret_arn)\" \\\n    --sql \"CREATE USER '$(cat /inputs/username)'@'%' IDENTIFIED BY '$(cat /inputs/password)'\" \\\n    --no-include-result-metadata \\\n|& tee tmp/out\nexit_code=${PIPESTATUS[0]}\nif [ $exit_code -ne 0 ]; then\n    cat tmp/out\n    grep -q \"Operation CREATE USER failed for\" tmp/out\n    [ $? -ne 0 ] && exit $exit_code\nfi\ncp /inputs/username /outputs/username\ncp /inputs/password /outputs/password\n\naws rds-data execute-statement \\\n    --resource-arn \"$(cat /inputs/db_arn)\" \\\n    --secret-arn \"$(cat /inputs/secret_arn)\" \\\n    --sql \"SET PASSWORD FOR '$(cat /inputs/username)'@'%' = PASSWORD('$(cat /inputs/password)')\" \\\n    --no-include-result-metadata\n\nif [ -s /inputs/grant_database ]; then\n    aws rds-data execute-statement \\\n        --resource-arn \"$(cat /inputs/db_arn)\" \\\n        --secret-arn \"$(cat /inputs/secret_arn)\" \\\n        --sql \"GRANT ALL ON \\`$(cat /inputs/grant_database)\\`.* to '$(cat /inputs/username)'@'%'\" \\\n        --no-include-result-metadata\nfi" | N/A | 
| os | C{alpineVersion: "latest", alpineDigest: "sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d", package: (close((({[]: (pkg: string)-\>true, } & C{bash: true}) & C{jq: true})) & {python: true, coreutils: true}), extraCommand: (close([, ...string]) & ["apk add --no-cache py-pip && pip install awscli && apk del py-pip"])} | N/A | 
| input | {[]: (path: string)-\>(Directory | string | bytes | Cache | Secret), "/entrypoint.sh": code, "/inputs/aws/access_key": config.accessKey, "/inputs/aws/secret_key": config.secretKey, "/inputs/db_arn": dbArn, "/inputs/secret_arn": secretArn, "/inputs/username": username, "/inputs/password": password, "/inputs/grant_database": grantDatabase} | N/A | 
| command | [(string & "/bin/bash"),(string & "--noprofile"),(string & "--norc"),(string & "-xeo"),(string & "pipefail"),(string & "/entrypoint.sh")] | N/A | 
| $bl | "bl.Run" | N/A | 
| environment | {[]: (_: string)-\>string, AWS_DEFAULT_REGION: config.region} | N/A | 
| workdir | string | *"/" | N/A | 
| runPolicy | *"onChange" | "always" | "never" | N/A | 
| output | {[]: (path: string)-\>(Directory | string | bytes), "/outputs/username": string, "/outputs/password": string} | N/A | 
| username | string | Username | 
| config | aws.Config | AWS Config | 
| dbArn | string | ARN of the database instance | 
| secretArn | string | ARN of the database secret (for connecting via rds api) | 
| password | string | Password | 
| grantDatabase | string | *"" | N/A | 
S3 file or Directory upload
| FIELD | SPEC | DOC | 
|---|---|---|
| url | run.output["/outputs/url"] | URL of the uploaded S3 object | 
| source | string | bl.Directory | Source Directory, File or String to Upload to S3 | 
| target | string | Target S3 URL (eg. s3://<bucket-name>/<path>/<sub-path>) | 
| config | aws.Config | AWS Config | 
Task is the interface implemented by the core actions (Build, Run, Push).
| FIELD | SPEC | DOC | 
|---|---|---|
| status | "completed" | "error" | "cancelled" | "cached" | "skipped" | N/A | 
| $bl | string | N/A | 
Run executes command inside the filesystem fs
| FIELD | SPEC | DOC | 
|---|---|---|
| status | "completed" | "error" | "cancelled" | "cached" | "skipped" | N/A | 
| input | { [path=string]: Directory | string | bytes | Cache | Secret } | N/A | 
| command | string | [...string] | N/A | 
| $bl | "bl.Run" | N/A | 
| environment | { [string]: string } | N/A | 
| workdir | string | *"/" | N/A | 
| runPolicy | *"onChange" | "always" | "never" | N/A | 
| output | { [path=string]: Directory | string | bytes } | N/A | 
BashScript is a helper to run bash scripts within an alpine environment.
| FIELD | SPEC | DOC | 
|---|---|---|
| status | "completed" | "error" | "cancelled" | "cached" | "skipped" | N/A | 
| code | string | N/A | 
| os | { alpineVersion: "latest" alpineDigest: "sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d" package: [pkg=string]: true package: bash: true // always install bash package: jq: true // always install jq extraCommand: [...string] } | N/A | 
| input | {[]: (path: string)-\>(Directory | string | bytes | Cache | Secret), "/entrypoint.sh": code} | N/A | 
| command | [(string & "/bin/bash"),(string & "--noprofile"),(string & "--norc"),(string & "-xeo"),(string & "pipefail"),(string & "/entrypoint.sh")] | N/A | 
| $bl | "bl.Run" | N/A | 
| environment | { [string]: string } | N/A | 
| workdir | string | *"/" | N/A | 
| runPolicy | *"onChange" | "always" | "never" | N/A | 
| output | { [path=string]: Directory | string | bytes } | N/A | 
Build takes a Dockerfile and/or a build context and produces an OCI image as a Directory.
| FIELD | SPEC | DOC | 
|---|---|---|
| status | "completed" | "error" | "cancelled" | "cached" | "skipped" | N/A | 
| $bl | "bl.Build" | N/A | 
| auth | RegistryAuth | credentials for the registry (optional) used to pull images in FROMstatements | 
Directory is a core type representing a directory. There are multiple implementations of directory, a directory can map to a registry, to the local filesystem, and so on.
| FIELD | SPEC | DOC | 
|---|---|---|
| path | string | *"/" | N/A | 
| $bl | "bl.Directory" | N/A | 
| source | Registry | Context | Directory | N/A | 
Secret is a core type holding a secret value. Secrets are encrypted at rest and only decrypted on demand when passed as an input to a Run
| FIELD | SPEC | DOC | 
|---|---|---|
| $bl | "bl.Secret" | N/A | 
| value | string | N/A | 
Cache is a core type. It behaves like a directory but it's content is persistenly cached between runs
| FIELD | SPEC | DOC | 
|---|---|---|
| $bl | "bl.Cache" | N/A | 
| key | string | *"" | N/A | 
RegistryAuth maps registry hosts to credentials
| FIELD | SPEC | DOC | 
|---|
Push exports the source directory to the target registry
| FIELD | SPEC | DOC | 
|---|---|---|
| status | "completed" | "error" | "cancelled" | "cached" | "skipped" | N/A | 
| $bl | "bl.Push" | N/A | 
| auth | RegistryAuth | credentials for the registry (optional) | 
| target | string | N/A | 
| ref | string | ref will be filled in with the canonical push reference | 
Push exports the source directory to the target registry
| FIELD | SPEC | DOC | 
|---|---|---|
| status | "completed" | "error" | "cancelled" | "cached" | "skipped" | N/A | 
| $bl | "bl.Pull" | N/A | 
| auth | RegistryAuth | credentials for the registry (optional) | 
| ref | string | registry ref to pull | 
RegistryCredentials encodes Docker Registry credentials
| FIELD | SPEC | DOC | 
|---|---|---|
| username | string | N/A | 
Credentials retriever for Docker Hub
| FIELD | SPEC | DOC | 
|---|---|---|
| auth | C{[]: (host: string)-\>RegistryCredentials, "https://index.docker.io/v1/": credentials} | Authentication for Docker Hub | 
| target | string | Target is the Docker Hub image | 
| config | { username: string password: bl.Secret } | Docker Hub Config | 
| credentials | bl.RegistryCredentials & { username: config.username secret: config.password } | Registry Credentials | 
| FIELD | SPEC | DOC | 
|---|---|---|
| environment | { [string]: string } | N/A | 
| buildScript | string | N/A | 
| runScript | string | N/A | 
Read reads the contents of a file.
| FIELD | SPEC | DOC | 
|---|---|---|
| filename | !="" | filename names the file to read. | 
| contents | script.output["/output"] | contents is the read contents. | 
Create writes contents to the given file.
| FIELD | SPEC | DOC | 
|---|---|---|
| filename | !="" | filename names the file to write. | 
| contents | bytes | string | contents specifies the bytes to be written. | 
| permissions | int | *0o644 | permissions defines the permissions to use if the file does not yet exist. | 
Append writes contents to the given file.
| FIELD | SPEC | DOC | 
|---|---|---|
| filename | !="" | filename names the file to append. | 
| contents | bytes | string | contents specifies the bytes to be written. | 
| permissions | int | *0o644 | permissions defines the permissions to use if the file does not yet exist. | 
Glob returns a list of files.
| FIELD | SPEC | DOC | 
|---|---|---|
| glob | !="" | glob specifies the pattern to match files with. | 
| files | _|_(cannot use string (type string) as bytes in argument 0 to encoding/json.Unmarshal: non-concrete value string) | files that matched | 
Git repository
| FIELD | SPEC | DOC | 
|---|---|---|
| status | "completed" | "error" | "cancelled" | "cached" | "skipped" | N/A | 
| url | string | URL of the Repository | 
| code | "    export GIT_SSH_COMMAND='ssh -o StrictHostKeyChecking=no'\n\n    if [ -f \"/inputs/ssh-key\" ]; then\n        # FIXME: ssh wants this. There must be a better way.\n        cp /inputs/ssh-key /tmp/ssh-key\n        chmod 0600 /tmp/ssh-key\n\n        export GIT_SSH_COMMAND=\"$GIT_SSH_COMMAND -i /tmp/ssh-key\"\n    fi\n\n    url=\"$(cat /inputs/url)\"\n\n    if [ -f /inputs/username ]; then\n        creds=\"$(cat /inputs/username)\"\n        if [ -f /inputs/http-password ]; then\n            creds=\"$creds:$(cat /inputs/http-password)\"\n        fi\n        url=\"${url/\\/\\////$creds@}\"\n    fi\n\n    ref=\"$(cat /inputs/ref)\"\n\n    cache_key=\"$(base64 \< /inputs/url)\"\n    mirror=\"/cache/git/${cache_key}\"\n\n    # Set up a mirror as a cache\n    if [ ! -d \"$mirror\" ]; then\n        git clone --progress --verbose --mirror \"$url\" -- \"$mirror\"\n    fi\n    # Refresh the cache.\n    git -C \"$mirror\" remote update\n\n    # Fetch the repository, using the cache\n    git clone --dissociate --reference \"$mirror\" -- \"$url\" /outputs/out\n\n    # Checkout ref\n    git -C /outputs/out reset --hard \"$ref\"\n\n    # Extract the revision\n    git -C /outputs/out rev-parse \"$ref\" \> /outputs/commit\n    git -C /outputs/out rev-parse --short \"$ref\" \> /outputs/short-commit\n\n    if [ ! -f /inputs/keep-gitdir ]; then\n        # Remove gitdir by default\n        rm -rf /outputs/out/.git\n    fi" | N/A | 
| os | C{alpineVersion: "latest", alpineDigest: "sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d", package: (close((({[]: (pkg: string)-\>true, } & C{bash: true}) & C{jq: true})) & {git: true, openssh: true}), extraCommand: [, ...string]} | N/A | 
| input | {[]: (path: string)-\>(Directory | string | bytes | Cache | Secret), "/entrypoint.sh": code, "/inputs/url": url, "/inputs/ref": ref, "/cache/git": Cache} | N/A | 
| command | [(string & "/bin/bash"),(string & "--noprofile"),(string & "--norc"),(string & "-xeo"),(string & "pipefail"),(string & "/entrypoint.sh")] | N/A | 
| $bl | "bl.Run" | N/A | 
| environment | { [string]: string } | N/A | 
| workdir | "/workdir" | N/A | 
| runPolicy | *"onChange" | "always" | "never" | N/A | 
| output | {[]: (path: string)-\>(Directory | string | bytes), "/outputs/out": Directory, "/outputs/commit": string, "/outputs/short-commit": string} | N/A | 
| ref | *"master" | string | Git Ref to checkout | 
| keepGitDir | *false | bool | Keep .git directory after clone | 
| commit | strings.TrimRight(output["/outputs/commit"], "\n") | Output commit ID of the Repository | 
| shortCommit | strings.TrimRight(output["/outputs/short-commit"], "\n") | Output short-commit ID of the Repository | 
Retrieve commit IDs from a git working copy (ie. cloned repository)
| FIELD | SPEC | DOC | 
|---|---|---|
| path | *"./" | string | Optional path to retrieve git commit IDs from | 
| commit | strings.TrimRight(pathCommit.output["/outputs/commit"], "\n") | Output commit ID of the Repository | 
| shortCommit | strings.TrimRight(pathCommit.output["/outputs/short-commit"], "\n") | Output short-commit ID of the Repository | 
| FIELD | SPEC | DOC | 
|---|---|---|
| body | string | N/A | 
| id | string | N/A | 
| FIELD | SPEC | DOC | 
|---|---|---|
| method | "POST" | N/A | 
| response | C{body: string, close(output["/response"]), statusCode: Atoi (output["/status"])} | N/A | 
| body | string | N/A | 
| status | "completed" | "error" | "cancelled" | "cached" | "skipped" | N/A | 
| url | "https://api.github.com/graphql" | N/A | 
| request | C{body: ((string | *"") & Marshal ({query: query, variables: Marshal (variable)})), header: (close({[]: (_: string)-\>(string | [, ...string]), }) & {"Content-Type": "application/json"}), token: (close(Secret) & token)} | N/A | 
| code | "curlArgs=(\n    \"$(cat /url)\"\n    -L --fail --silent --show-error\n    --write-out \"%{http_code}\"\n    -X \"$(cat /method)\"\n    -d \"$(cat /body)\"\n    -o /response\n)\n\nheaders=\"$(cat /headers | jq -r 'to_entries | map(.key + \": \" + (.value | tostring) + \"\\n\") | add')\"\nwhile read h; do\n    curlArgs+=(\"-H\" \"$h\")\ndone \<\<\< \"$headers\"\n\nif [ -e /token ]; then\n    curlArgs+=(\"-H\" \"Authorization: bearer $(cat /token)\")\nfi\n\ncurl \"${curlArgs[@]}\" \> /status" | N/A | 
| os | C{alpineVersion: "latest", alpineDigest: "sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d", package: (close((({[]: (pkg: string)-\>true, } & C{bash: true}) & C{jq: true})) & {curl: true}), extraCommand: [, ...string]} | N/A | 
| input | {[]: (path: string)-\>(Directory | string | bytes | Cache | Secret), "/entrypoint.sh": code, "/token": request.token, "/method": method, "/headers": Marshal (request.header), "/body": request.body, "/url": url} | N/A | 
| command | [(string & "/bin/bash"),(string & "--noprofile"),(string & "--norc"),(string & "-xeo"),(string & "pipefail"),(string & "/entrypoint.sh")] | N/A | 
| $bl | "bl.Run" | N/A | 
| environment | { [string]: string } | N/A | 
| workdir | string | *"/" | N/A | 
| runPolicy | "always" | N/A | 
| output | {[]: ((_: string)-\>string & (path: string)-\>(Directory | string | bytes)), "/response": string, "/status": string} | N/A | 
| subjectId | string | N/A | 
| data | _|_(cannot use string (type string) as bytes in argument 0 to encoding/json.Unmarshal: non-concrete value string) | N/A | 
| comment | _|_(cannot use string (type string) as bytes in argument 0 to encoding/json.Unmarshal: non-concrete value string) | N/A | 
| query | "mutation ($input: AddCommentInput!) {\n    addComment(input: $input) {\n        subject {\n            id\n        }\n        commentEdge {\n            node {\n                ...CommentParts\n            }\n        }\n    }\n}\nfragment CommentParts on IssueComment {\n    id\n    body\n}" | Contents of the graphql query | 
| variable | {input: {body: body, subjectId: subjectId}, ...} | graphql variables | 
| payload | _|_(cannot use string (type string) as bytes in argument 0 to encoding/json.Unmarshal: non-concrete value string) | N/A | 
GitHub v4 GraphQL Query
| FIELD | SPEC | DOC | 
|---|---|---|
| method | "POST" | N/A | 
| response | C{body: string, close(output["/response"]), statusCode: Atoi (output["/status"])} | N/A | 
| status | "completed" | "error" | "cancelled" | "cached" | "skipped" | N/A | 
| url | "https://api.github.com/graphql" | N/A | 
| request | C{body: ((string | *"") & Marshal ({query: query, variables: Marshal (variable)})), header: (close({[]: (_: string)-\>(string | [, ...string]), }) & {"Content-Type": "application/json"}), token: (close(Secret) & token)} | N/A | 
| code | "curlArgs=(\n    \"$(cat /url)\"\n    -L --fail --silent --show-error\n    --write-out \"%{http_code}\"\n    -X \"$(cat /method)\"\n    -d \"$(cat /body)\"\n    -o /response\n)\n\nheaders=\"$(cat /headers | jq -r 'to_entries | map(.key + \": \" + (.value | tostring) + \"\\n\") | add')\"\nwhile read h; do\n    curlArgs+=(\"-H\" \"$h\")\ndone \<\<\< \"$headers\"\n\nif [ -e /token ]; then\n    curlArgs+=(\"-H\" \"Authorization: bearer $(cat /token)\")\nfi\n\ncurl \"${curlArgs[@]}\" \> /status" | N/A | 
| os | C{alpineVersion: "latest", alpineDigest: "sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d", package: (close((({[]: (pkg: string)-\>true, } & C{bash: true}) & C{jq: true})) & {curl: true}), extraCommand: [, ...string]} | N/A | 
| input | {[]: (path: string)-\>(Directory | string | bytes | Cache | Secret), "/entrypoint.sh": code, "/token": request.token, "/method": method, "/headers": Marshal (request.header), "/body": request.body, "/url": url} | N/A | 
| command | [(string & "/bin/bash"),(string & "--noprofile"),(string & "--norc"),(string & "-xeo"),(string & "pipefail"),(string & "/entrypoint.sh")] | N/A | 
| $bl | "bl.Run" | N/A | 
| environment | { [string]: string } | N/A | 
| workdir | string | *"/" | N/A | 
| runPolicy | "always" | N/A | 
| output | {[]: ((_: string)-\>string & (path: string)-\>(Directory | string | bytes)), "/response": string, "/status": string} | N/A | 
| data | payload.data | N/A | 
| query | string | Contents of the graphql query | 
| variable | { [key=string]: _ } | graphql variables | 
| payload | _|_(cannot use string (type string) as bytes in argument 0 to encoding/json.Unmarshal: non-concrete value string) | N/A | 
| FIELD | SPEC | DOC | 
|---|---|---|
| method | "POST" | N/A | 
| response | C{body: string, close(output["/response"]), statusCode: Atoi (output["/status"])} | N/A | 
| body | string | N/A | 
| status | "completed" | "error" | "cancelled" | "cached" | "skipped" | N/A | 
| url | "https://api.github.com/graphql" | N/A | 
| request | C{body: ((string | *"") & Marshal ({query: query, variables: Marshal (variable)})), header: (close({[]: (_: string)-\>(string | [, ...string]), }) & {"Content-Type": "application/json"}), token: (close(Secret) & token)} | N/A | 
| code | "curlArgs=(\n    \"$(cat /url)\"\n    -L --fail --silent --show-error\n    --write-out \"%{http_code}\"\n    -X \"$(cat /method)\"\n    -d \"$(cat /body)\"\n    -o /response\n)\n\nheaders=\"$(cat /headers | jq -r 'to_entries | map(.key + \": \" + (.value | tostring) + \"\\n\") | add')\"\nwhile read h; do\n    curlArgs+=(\"-H\" \"$h\")\ndone \<\<\< \"$headers\"\n\nif [ -e /token ]; then\n    curlArgs+=(\"-H\" \"Authorization: bearer $(cat /token)\")\nfi\n\ncurl \"${curlArgs[@]}\" \> /status" | N/A | 
| os | C{alpineVersion: "latest", alpineDigest: "sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d", package: (close((({[]: (pkg: string)-\>true, } & C{bash: true}) & C{jq: true})) & {curl: true}), extraCommand: [, ...string]} | N/A | 
| input | {[]: (path: string)-\>(Directory | string | bytes | Cache | Secret), "/entrypoint.sh": code, "/token": request.token, "/method": method, "/headers": Marshal (request.header), "/body": request.body, "/url": url} | N/A | 
| command | [(string & "/bin/bash"),(string & "--noprofile"),(string & "--norc"),(string & "-xeo"),(string & "pipefail"),(string & "/entrypoint.sh")] | N/A | 
| $bl | "bl.Run" | N/A | 
| environment | { [string]: string } | N/A | 
| workdir | string | *"/" | N/A | 
| runPolicy | "always" | N/A | 
| output | {[]: ((_: string)-\>string & (path: string)-\>(Directory | string | bytes)), "/response": string, "/status": string} | N/A | 
| data | _|_(cannot use string (type string) as bytes in argument 0 to encoding/json.Unmarshal: non-concrete value string) | N/A | 
| comment | _|_(cannot use string (type string) as bytes in argument 0 to encoding/json.Unmarshal: non-concrete value string) | N/A | 
| query | "mutation ($input: UpdateIssueCommentInput!) {\n    updateIssueComment(input: $input) {\n        issueComment {\n            ...CommentParts\n        }\n    }\n}\nfragment CommentParts on IssueComment {\n    id\n    body\n}" | Contents of the graphql query | 
| variable | {input: {body: body, id: commentId}, ...} | graphql variables | 
| commentId | string | N/A | 
| payload | _|_(cannot use string (type string) as bytes in argument 0 to encoding/json.Unmarshal: non-concrete value string) | N/A | 
| FIELD | SPEC | DOC | 
|---|---|---|
| response | editComment.output["/response"] | N/A | 
| body | string | N/A | 
| status | editComment.output["/status"] | N/A | 
| subjectId | string | N/A | 
| commentId | [ for n in listComments.data.node.comments.nodes if strings.Contains(n.body, "\(marker)") { n.id } ] | Contains a list of comment ID matching the marker | 
| marker | *"\<!-- bl-marker-do-not-remove --\>" | string | N/A | 
| updateCommentQuery | json.Marshal({ query: UpdateComment.query variables: input: { if len(commentId) \> 0 { id: commentId[0] } "body": "\(body)\n\(marker)" } }) | N/A | 
| addCommentQuery | json.Marshal({ query: AddComment.query variables: input: { "subjectId": subjectId "body": "\(body)\n\(marker)" } }) | N/A | 
GitHub Event https://developer.github.com/v3/activity/events
| FIELD | SPEC | DOC | 
|---|---|---|
| number | int | The pull request number. | 
| name | "pull_request" | N/A | 
| sender | {...} | N/A | 
| action | "assigned" | "unassigned" | "review_requested" | "review_request_removed" | "labeled" | "unlabeled" | "opened" | "edited" | "closed" | "ready_for_review" | "locked" | "unlocked" | "reopened" | "synchronize" | N/A | 
| changes | {...} | The changes to the comment if the action was edited. | 
| pull_request | {...} | The pull request itself. | 
PullRequestEvent https://developer.github.com/v3/activity/events/types/#pullrequestevent
| FIELD | SPEC | DOC | 
|---|---|---|
| number | int | The pull request number. | 
| action | "assigned" | "unassigned" | "review_requested" | "review_request_removed" | "labeled" | "unlabeled" | "opened" | "edited" | "closed" | "ready_for_review" | "locked" | "unlocked" | "reopened" | "synchronize" | N/A | 
| changes | {...} | The changes to the comment if the action was edited. | 
| pull_request | {...} | The pull request itself. | 
| FIELD | SPEC | DOC | 
|---|---|---|
| name | string | Github repository name | 
| owner | string | Github repository owner | 
| FIELD | SPEC | DOC | 
|---|---|---|
| number | int | N/A | 
| id | string | N/A | 
| state | string | N/A | 
| title | string | N/A | 
| headRepository | { sshUrl: string url: string } | N/A | 
| headRef | { name: string prefix: string target: oid: string } | N/A | 
| FIELD | SPEC | DOC | 
|---|---|---|
| number | int | N/A | 
| method | "POST" | N/A | 
| response | C{body: string, close(output["/response"]), statusCode: Atoi (output["/status"])} | N/A | 
| status | "completed" | "error" | "cancelled" | "cached" | "skipped" | N/A | 
| url | "https://api.github.com/graphql" | N/A | 
| request | C{body: ((string | *"") & Marshal ({query: query, variables: Marshal (variable)})), header: (close({[]: (_: string)-\>(string | [, ...string]), }) & {"Content-Type": "application/json"}), token: (close(Secret) & token)} | N/A | 
| code | "curlArgs=(\n    \"$(cat /url)\"\n    -L --fail --silent --show-error\n    --write-out \"%{http_code}\"\n    -X \"$(cat /method)\"\n    -d \"$(cat /body)\"\n    -o /response\n)\n\nheaders=\"$(cat /headers | jq -r 'to_entries | map(.key + \": \" + (.value | tostring) + \"\\n\") | add')\"\nwhile read h; do\n    curlArgs+=(\"-H\" \"$h\")\ndone \<\<\< \"$headers\"\n\nif [ -e /token ]; then\n    curlArgs+=(\"-H\" \"Authorization: bearer $(cat /token)\")\nfi\n\ncurl \"${curlArgs[@]}\" \> /status" | N/A | 
| os | C{alpineVersion: "latest", alpineDigest: "sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d", package: (close((({[]: (pkg: string)-\>true, } & C{bash: true}) & C{jq: true})) & {curl: true}), extraCommand: [, ...string]} | N/A | 
| input | {[]: (path: string)-\>(Directory | string | bytes | Cache | Secret), "/entrypoint.sh": code, "/token": request.token, "/method": method, "/headers": Marshal (request.header), "/body": request.body, "/url": url} | N/A | 
| command | [(string & "/bin/bash"),(string & "--noprofile"),(string & "--norc"),(string & "-xeo"),(string & "pipefail"),(string & "/entrypoint.sh")] | N/A | 
| $bl | "bl.Run" | N/A | 
| environment | { [string]: string } | N/A | 
| workdir | string | *"/" | N/A | 
| runPolicy | "always" | N/A | 
| output | {[]: ((_: string)-\>string & (path: string)-\>(Directory | string | bytes)), "/response": string, "/status": string} | N/A | 
| data | _|_(cannot use string (type string) as bytes in argument 0 to encoding/json.Unmarshal: non-concrete value string) | N/A | 
| query | "query($owner: String!, $name: String!, $number: Int!) {\n    repository(owner: $owner, name: $name) {\n        pullRequest(number: $number) {\n            ...PullRequestParts\n        }\n    }\n}\nfragment PullRequestParts on PullRequest {\n    id\n    state\n    number\n    title\n    headRepository {\n        sshUrl\n        url\n    }\n    headRef {\n        name\n        prefix\n        target {\n            oid\n        }\n    }\n}" | Contents of the graphql query | 
| variable | {number: number, name: repo.name, owner: repo.owner, ...} | graphql variables | 
| repo | { owner: string name: string } | N/A | 
| pullRequest | _|_(cannot use string (type string) as bytes in argument 0 to encoding/json.Unmarshal: non-concrete value string) | N/A | 
| payload | _|_(cannot use string (type string) as bytes in argument 0 to encoding/json.Unmarshal: non-concrete value string) | N/A | 
| FIELD | SPEC | DOC | 
|---|---|---|
| status | "completed" | "error" | "cancelled" | "cached" | "skipped" | N/A | 
| url | string | URL of the Repository | 
| code | "    export GIT_SSH_COMMAND='ssh -o StrictHostKeyChecking=no'\n\n    if [ -f \"/inputs/ssh-key\" ]; then\n        # FIXME: ssh wants this. There must be a better way.\n        cp /inputs/ssh-key /tmp/ssh-key\n        chmod 0600 /tmp/ssh-key\n\n        export GIT_SSH_COMMAND=\"$GIT_SSH_COMMAND -i /tmp/ssh-key\"\n    fi\n\n    url=\"$(cat /inputs/url)\"\n\n    if [ -f /inputs/username ]; then\n        creds=\"$(cat /inputs/username)\"\n        if [ -f /inputs/http-password ]; then\n            creds=\"$creds:$(cat /inputs/http-password)\"\n        fi\n        url=\"${url/\\/\\////$creds@}\"\n    fi\n\n    ref=\"$(cat /inputs/ref)\"\n\n    cache_key=\"$(base64 \< /inputs/url)\"\n    mirror=\"/cache/git/${cache_key}\"\n\n    # Set up a mirror as a cache\n    if [ ! -d \"$mirror\" ]; then\n        git clone --progress --verbose --mirror \"$url\" -- \"$mirror\"\n    fi\n    # Refresh the cache.\n    git -C \"$mirror\" remote update\n\n    # Fetch the repository, using the cache\n    git clone --dissociate --reference \"$mirror\" -- \"$url\" /outputs/out\n\n    # Checkout ref\n    git -C /outputs/out reset --hard \"$ref\"\n\n    # Extract the revision\n    git -C /outputs/out rev-parse \"$ref\" \> /outputs/commit\n    git -C /outputs/out rev-parse --short \"$ref\" \> /outputs/short-commit\n\n    if [ ! -f /inputs/keep-gitdir ]; then\n        # Remove gitdir by default\n        rm -rf /outputs/out/.git\n    fi" | N/A | 
| os | C{alpineVersion: "latest", alpineDigest: "sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d", package: (close((({[]: (pkg: string)-\>true, } & C{bash: true}) & C{jq: true})) & {git: true, openssh: true}), extraCommand: [, ...string]} | N/A | 
| input | {[]: (path: string)-\>(Directory | string | bytes | Cache | Secret), "/entrypoint.sh": code, "/inputs/url": url, "/inputs/ref": ref, "/inputs/username": username, "/inputs/http-password": httpPassword, "/cache/git": Cache} | N/A | 
| command | [(string & "/bin/bash"),(string & "--noprofile"),(string & "--norc"),(string & "-xeo"),(string & "pipefail"),(string & "/entrypoint.sh")] | N/A | 
| $bl | "bl.Run" | N/A | 
| environment | { [string]: string } | N/A | 
| workdir | "/workdir" | N/A | 
| runPolicy | *"onChange" | "always" | "never" | N/A | 
| output | {[]: (path: string)-\>(Directory | string | bytes), "/outputs/out": Directory, "/outputs/commit": string, "/outputs/short-commit": string} | N/A | 
| ref | (*"master" | string) | Git Ref to checkout | 
| username | "apikey" | SSH or HTTP username to use in the git URL | 
| keepGitDir | *false | bool | Keep .git directory after clone | 
| commit | strings.TrimRight(output["/outputs/commit"], "\n") | Output commit ID of the Repository | 
| shortCommit | strings.TrimRight(output["/outputs/short-commit"], "\n") | Output short-commit ID of the Repository | 
| pullRequest | PullRequest | N/A | 
| FIELD | SPEC | DOC | 
|---|---|---|
| method | "POST" | N/A | 
| response | C{body: string, close(output["/response"]), statusCode: Atoi (output["/status"])} | N/A | 
| status | "completed" | "error" | "cancelled" | "cached" | "skipped" | N/A | 
| url | "https://api.github.com/graphql" | N/A | 
| request | C{body: ((string | *"") & Marshal ({query: query, variables: Marshal (variable)})), header: (close({[]: (_: string)-\>(string | [, ...string]), }) & {"Content-Type": "application/json"}), token: (close(Secret) & token)} | N/A | 
| code | "curlArgs=(\n    \"$(cat /url)\"\n    -L --fail --silent --show-error\n    --write-out \"%{http_code}\"\n    -X \"$(cat /method)\"\n    -d \"$(cat /body)\"\n    -o /response\n)\n\nheaders=\"$(cat /headers | jq -r 'to_entries | map(.key + \": \" + (.value | tostring) + \"\\n\") | add')\"\nwhile read h; do\n    curlArgs+=(\"-H\" \"$h\")\ndone \<\<\< \"$headers\"\n\nif [ -e /token ]; then\n    curlArgs+=(\"-H\" \"Authorization: bearer $(cat /token)\")\nfi\n\ncurl \"${curlArgs[@]}\" \> /status" | N/A | 
| os | C{alpineVersion: "latest", alpineDigest: "sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d", package: (close((({[]: (pkg: string)-\>true, } & C{bash: true}) & C{jq: true})) & {curl: true}), extraCommand: [, ...string]} | N/A | 
| input | {[]: (path: string)-\>(Directory | string | bytes | Cache | Secret), "/entrypoint.sh": code, "/token": request.token, "/method": method, "/headers": Marshal (request.header), "/body": request.body, "/url": url} | N/A | 
| command | [(string & "/bin/bash"),(string & "--noprofile"),(string & "--norc"),(string & "-xeo"),(string & "pipefail"),(string & "/entrypoint.sh")] | N/A | 
| $bl | "bl.Run" | N/A | 
| environment | { [string]: string } | N/A | 
| workdir | string | *"/" | N/A | 
| runPolicy | "always" | N/A | 
| output | {[]: ((_: string)-\>string & (path: string)-\>(Directory | string | bytes)), "/response": string, "/status": string} | N/A | 
| data | _|_(cannot use string (type string) as bytes in argument 0 to encoding/json.Unmarshal: non-concrete value string) | N/A | 
| query | "query($owner: String!, $name: String!, $last: Int, $states: [PullRequestState!]) {\n    repository(owner: $owner, name: $name) {\n        pullRequests(last: $last, states: $states) {\n            nodes {\n                ...PullRequestParts\n            }\n        }\n    }\n}\nfragment PullRequestParts on PullRequest {\n    id\n    state\n    number\n    title\n    headRepository {\n        sshUrl\n        url\n    }\n    headRef {\n        name\n        prefix\n        target {\n            oid\n        }\n    }\n}" | Contents of the graphql query | 
| variable | {name: repo.name, owner: repo.owner, states: states, last: pageSize, ...} | graphql variables | 
| repo | { owner: string name: string } | N/A | 
| pageSize | int | *25 | N/A | 
| states | [string] | *[] | N/A | 
| pullRequests | _|_(cannot use string (type string) as bytes in argument 0 to encoding/json.Unmarshal: non-concrete value string) | N/A | 
| payload | _|_(cannot use string (type string) as bytes in argument 0 to encoding/json.Unmarshal: non-concrete value string) | N/A | 
| FIELD | SPEC | DOC | 
|---|---|---|
| id | string | N/A | 
| login | string | N/A | 
| FIELD | SPEC | DOC | 
|---|---|---|
| method | "POST" | N/A | 
| response | C{body: string, close(output["/response"]), statusCode: Atoi (output["/status"])} | N/A | 
| status | "completed" | "error" | "cancelled" | "cached" | "skipped" | N/A | 
| url | "https://api.github.com/graphql" | N/A | 
| request | C{body: ((string | *"") & Marshal ({query: query, variables: Marshal (variable)})), header: (close({[]: (_: string)-\>(string | [, ...string]), }) & {"Content-Type": "application/json"}), token: (close(Secret) & token)} | N/A | 
| code | "curlArgs=(\n    \"$(cat /url)\"\n    -L --fail --silent --show-error\n    --write-out \"%{http_code}\"\n    -X \"$(cat /method)\"\n    -d \"$(cat /body)\"\n    -o /response\n)\n\nheaders=\"$(cat /headers | jq -r 'to_entries | map(.key + \": \" + (.value | tostring) + \"\\n\") | add')\"\nwhile read h; do\n    curlArgs+=(\"-H\" \"$h\")\ndone \<\<\< \"$headers\"\n\nif [ -e /token ]; then\n    curlArgs+=(\"-H\" \"Authorization: bearer $(cat /token)\")\nfi\n\ncurl \"${curlArgs[@]}\" \> /status" | N/A | 
| os | C{alpineVersion: "latest", alpineDigest: "sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d", package: (close((({[]: (pkg: string)-\>true, } & C{bash: true}) & C{jq: true})) & {curl: true}), extraCommand: [, ...string]} | N/A | 
| input | {[]: (path: string)-\>(Directory | string | bytes | Cache | Secret), "/entrypoint.sh": code, "/token": request.token, "/method": method, "/headers": Marshal (request.header), "/body": request.body, "/url": url} | N/A | 
| command | [(string & "/bin/bash"),(string & "--noprofile"),(string & "--norc"),(string & "-xeo"),(string & "pipefail"),(string & "/entrypoint.sh")] | N/A | 
| $bl | "bl.Run" | N/A | 
| environment | { [string]: string } | N/A | 
| workdir | string | *"/" | N/A | 
| runPolicy | "always" | N/A | 
| output | {[]: ((_: string)-\>string & (path: string)-\>(Directory | string | bytes)), "/response": string, "/status": string} | N/A | 
| data | _|_(cannot use string (type string) as bytes in argument 0 to encoding/json.Unmarshal: non-concrete value string) | N/A | 
| query | "query {\n    viewer {\n        ...UserParts\n    }\n}\nfragment UserParts on User {\n    id\n    login\n}" | Contents of the graphql query | 
| variable | { [key=string]: _ } | graphql variables | 
| payload | _|_(cannot use string (type string) as bytes in argument 0 to encoding/json.Unmarshal: non-concrete value string) | N/A | 
| user | data.viewer | N/A | 
Go application built with go build
| FIELD | SPEC | DOC | 
|---|---|---|
| os | *"linux" | string | Target OS | 
| version | *"1.14.1" | string | Go version to use | 
| generate | *false | true | Run go generatebefore building | 
| arch | *"amd64" | string | Target architecture | 
| tags | *"netgo" | string | Build tags to use for building | 
| ldflags | *"-w -extldflags \"-static\"" | string | LDFLAGS to use for linking | 
| binaryName | string | Specify the targeted binary name | 
Google Cloud Config shared by all packages
| FIELD | SPEC | DOC | 
|---|---|---|
| region | string | N/A | 
| project | string | N/A | 
Credentials retriever for GCR
| FIELD | SPEC | DOC | 
|---|---|---|
| status | "completed" | "error" | "cancelled" | "cached" | "skipped" | N/A | 
| code | "    export GOOGLE_APPLICATION_CREDENTIALS=\"/inputs/gcp/service_key\"\n\n    credentials=$(cat /inputs/target | docker-credential-gcr get)\n\n    echo $credentials | jq -j .Username \> /outputs/username\n    echo $credentials | jq -j .Secret \> /outputs/secret" | N/A | 
| os | C{alpineVersion: "latest", alpineDigest: "sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d", package: (close((({[]: (pkg: string)-\>true, } & C{bash: true}) & C{jq: true})) & {curl: true}), extraCommand: (close([, ...string]) & ["curl -L \""+helperUrl+"\" | tar -C /usr/local/bin -zx && \\\n    chmod +x \"/usr/local/bin/docker-credential-gcr\""])} | N/A | 
| input | {[]: (path: string)-\>(Directory | string | bytes | Cache | Secret), "/entrypoint.sh": code, "/inputs/gcp/service_key": config.serviceKey, "/inputs/target": target} | N/A | 
| command | [(string & "/bin/bash"),(string & "--noprofile"),(string & "--norc"),(string & "-xeo"),(string & "pipefail"),(string & "/entrypoint.sh")] | N/A | 
| $bl | "bl.Run" | N/A | 
| auth | C{[]: (host: string)-\>RegistryCredentials, ""+target+"": credentials} | Authentication for GCR Registries | 
| environment | { [string]: string } | N/A | 
| workdir | string | *"/" | N/A | 
| runPolicy | "always" | N/A | 
| output | {[]: (path: string)-\>(Directory | string | bytes), "/outputs/username": string, "/outputs/secret": string} | N/A | 
| target | string | Target is the GCR image | 
| config | googlecloud.Config | GCP Config | 
| credentials | bl.RegistryCredentials & { username: output["/outputs/username"] secret: bl.Secret & { // FIXME: we should be able to output a bl.Secret directly value: base64.Encode(null, output["/outputs/secret"]) } } | Registry Credentials | 
| helperUrl | "https://github.com/GoogleCloudPlatform/docker-credential-gcr/releases/download/v2.0.1/docker-credential-gcr_linux_amd64-2.0.1.tar.gz" | N/A | 
KubeConfig config outputs a valid kube-auth-config for kubectl client
| FIELD | SPEC | DOC | 
|---|---|---|
| config | googlecloud.Config | GCP Config | 
| cluster | string | GKE cluster name | 
| FIELD | SPEC | DOC | 
|---|---|---|
| method | "POST" | N/A | 
| response | C{body: string, close(output["/response"]), statusCode: Atoi (output["/status"])} | N/A | 
| status | "completed" | "error" | "cancelled" | "cached" | "skipped" | N/A | 
| url | string | N/A | 
| request | C{body: ((string | *"") & Marshal ({query: query, variables: Marshal (variable)})), header: (close({[]: (_: string)-\>(string | [, ...string]), }) & {"Content-Type": "application/json"}), token?: Secret} | N/A | 
| code | "curlArgs=(\n    \"$(cat /url)\"\n    -L --fail --silent --show-error\n    --write-out \"%{http_code}\"\n    -X \"$(cat /method)\"\n    -d \"$(cat /body)\"\n    -o /response\n)\n\nheaders=\"$(cat /headers | jq -r 'to_entries | map(.key + \": \" + (.value | tostring) + \"\\n\") | add')\"\nwhile read h; do\n    curlArgs+=(\"-H\" \"$h\")\ndone \<\<\< \"$headers\"\n\nif [ -e /token ]; then\n    curlArgs+=(\"-H\" \"Authorization: bearer $(cat /token)\")\nfi\n\ncurl \"${curlArgs[@]}\" \> /status" | N/A | 
| os | C{alpineVersion: "latest", alpineDigest: "sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d", package: (close((({[]: (pkg: string)-\>true, } & C{bash: true}) & C{jq: true})) & {curl: true}), extraCommand: [, ...string]} | N/A | 
| input | {[]: (path: string)-\>(Directory | string | bytes | Cache | Secret), "/entrypoint.sh": code, "/method": method, "/headers": Marshal (request.header), "/body": request.body, "/url": url} | N/A | 
| command | [(string & "/bin/bash"),(string & "--noprofile"),(string & "--norc"),(string & "-xeo"),(string & "pipefail"),(string & "/entrypoint.sh")] | N/A | 
| $bl | "bl.Run" | N/A | 
| environment | { [string]: string } | N/A | 
| workdir | string | *"/" | N/A | 
| runPolicy | "always" | N/A | 
| output | {[]: ((_: string)-\>string & (path: string)-\>(Directory | string | bytes)), "/response": string, "/status": string} | N/A | 
| query | string | Contents of the graphql query | 
| variable | { [key=string]: _ } | graphql variables | 
| payload | _|_(cannot use string (type string) as bytes in argument 0 to encoding/json.Unmarshal: non-concrete value string) | N/A | 
| data | payload.data | N/A | 
| FIELD | SPEC | DOC | 
|---|---|---|
| method | "GET" | "POST" | "PUT" | "DELETE" | "PATH" | "HEAD" | N/A | 
| response | { body: output["/response"] statusCode: strconv.Atoi(output["/status"]) } | N/A | 
| status | "completed" | "error" | "cancelled" | "cached" | "skipped" | N/A | 
| url | string | N/A | 
| request | { body: string | *"" header: [string]: string | [...string] token?: bl.Secret } | N/A | 
| code | "curlArgs=(\n    \"$(cat /url)\"\n    -L --fail --silent --show-error\n    --write-out \"%{http_code}\"\n    -X \"$(cat /method)\"\n    -d \"$(cat /body)\"\n    -o /response\n)\n\nheaders=\"$(cat /headers | jq -r 'to_entries | map(.key + \": \" + (.value | tostring) + \"\\n\") | add')\"\nwhile read h; do\n    curlArgs+=(\"-H\" \"$h\")\ndone \<\<\< \"$headers\"\n\nif [ -e /token ]; then\n    curlArgs+=(\"-H\" \"Authorization: bearer $(cat /token)\")\nfi\n\ncurl \"${curlArgs[@]}\" \> /status" | N/A | 
| os | C{alpineVersion: "latest", alpineDigest: "sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d", package: (close((({[]: (pkg: string)-\>true, } & C{bash: true}) & C{jq: true})) & {curl: true}), extraCommand: [, ...string]} | N/A | 
| input | {[]: (path: string)-\>(Directory | string | bytes | Cache | Secret), "/entrypoint.sh": code, "/method": method, "/headers": Marshal (request.header), "/body": request.body, "/url": url} | N/A | 
| command | [(string & "/bin/bash"),(string & "--noprofile"),(string & "--norc"),(string & "-xeo"),(string & "pipefail"),(string & "/entrypoint.sh")] | N/A | 
| $bl | "bl.Run" | N/A | 
| environment | { [string]: string } | N/A | 
| workdir | string | *"/" | N/A | 
| runPolicy | "always" | N/A | 
| output | {[]: ((_: string)-\>string & (path: string)-\>(Directory | string | bytes)), "/response": string, "/status": string} | N/A | 
Exposes kubectl kustomize
| FIELD | SPEC | DOC | 
|---|---|---|
| source | string | bl.Directory | Kubernetes config to take as input | 
| kustomization | *"" | string | Optionnal kustomization.yaml | 
| version | *"v1.14.7" | string | Version of kubectl client | 
| out | kustomize.output["/kube/out"] | Output of kustomize | 
Apply a Kubernetes configuration
| FIELD | SPEC | DOC | 
|---|---|---|
| source | string | bl.Directory | Kubernetes config to deploy | 
| version | *"v1.14.7" | string | Version of kubectl client | 
| namespace | string | Kubernetes Namespace to deploy to | 
Exposes kubectl kustomize
| FIELD | SPEC | DOC | 
|---|---|---|
| source | string | bl.Directory | Kubernetes config to take as input | 
| kustomization | *"" | string | Optionnal kustomization.yaml | 
| version | *"v1.14.7" | string | Version of kubectl client | 
| out | kustomize.output["/kube/out"] | Output of kustomize | 
Apply a Kubernetes configuration
| FIELD | SPEC | DOC | 
|---|---|---|
| source | string | bl.Directory | Kubernetes config to deploy | 
| version | *"v1.14.7" | string | Version of kubectl client | 
| namespace | string | Kubernetes Namespace to deploy to | 
Install a Helm chart
| FIELD | SPEC | DOC | 
|---|---|---|
| name | string | Helm deployment name | 
| chart | string | bl.Directory | Helm chart to install | 
| repository | *"https://kubernetes-charts.storage.googleapis.com/" | string | Helm chart repository (defaults to stable) | 
| namespace | string | Kubernetes Namespace to deploy to | 
| action | *"installOrUpgrade" | "install" | "upgrade" | Helm action to apply | 
| timeout | string | *"5m" | time to wait for any individual Kubernetes operation (like Jobs for hooks) | 
| wait | *true | bool | if set, will wait until all Pods, PVCs, Services, and minimum number of Pods of a Deployment, StatefulSet, or ReplicaSet are in a ready state before marking the release as successful. It will wait for as long as timeout | 
| atomic | *true | bool | if set, installation process purges chart on fail. The wait option will be set automatically if atomic is used | 
| version | string | *"3.1.2" | Helm version | 
Render a Krane template
| FIELD | SPEC | DOC | 
|---|---|---|
| source | string | bl.Directory | Kubernetes config to render | 
| version | string | *"1.1.2" | Krane version | 
| result | run.output["/krane/result"] | Rendered config | 
Deploy a Kubernetes configuration using Krane
| FIELD | SPEC | DOC | 
|---|---|---|
| source | string | bl.Directory | Kubernetes config to deploy | 
| version | string | *"1.1.2" | Krane version | 
| namespace | string | Kubernetes Namespace to deploy to | 
| prune | bool | *true | Prune resources that are no longer in your Kubernetes template set | 
| FIELD | SPEC | DOC | 
|---|---|---|
| name | string | N/A | 
| create | *true | bool | N/A | 
| server | Server | N/A | 
| FIELD | SPEC | DOC | 
|---|---|---|
| host | string | N/A | 
| port | *3306 | int | N/A | 
| adminUser | string | N/A | 
| adminPassword | string | N/A | 
A Netlify account
| FIELD | SPEC | DOC | 
|---|---|---|
| name | string | *"" | Use this Netlify account name (also referred to as "team" in the Netlify docs) | 
A Netlify site
| FIELD | SPEC | DOC | 
|---|---|---|
| name | string | Deploy to this Netlify site | 
| url | strings.TrimRight(deploy.output["/info/url"], "\n") | Deployment url | 
| account | Account | Netlify account this site is attached to | 
| domain | string | Host the site at this address | 
| create | bool | *true | Create the Netlify site if it doesn't exist? | 
A SSH endpoint
| FIELD | SPEC | DOC | 
|---|---|---|
| host | string | Endpoint hostname | 
| port | int | *22 | Endpoint TCP port | 
| user | string | Endpoint user | 
A javascript application built by Yarn
| FIELD | SPEC | DOC | 
|---|---|---|
| environment | { [string]: string } | Set these environment variables during the build | 
| loadEnv | bool | *true | Load the contents of environmentinto the yarn process? | 
| yarnScript | string | *"build" | Run this yarn script | 
| writeEnvFile | string | *"" | Write the contents of environmentto this file, in the "envfile" format. | 
| buildDirectory | string | *"build" | Read build output from this directory (path must be relative to working directory). | 
Zip archive
| FIELD | SPEC | DOC | 
|---|---|---|
| source | bl.Directory | string | Source Directory, File or String to Zip from |