Skip to content

Correct the schema for the output attribute in Bake files #77

Open
@rcjsuen

Description

@rcjsuen

"output": {
IsOptional: true,
Constraint: schema.List{Elem: schema.AnyExpression{OfType: cty.String}},
},

output is not just a list of strings. It seems like it can also be an object.

target "_common" {
  args = {
    GO_VERSION = "1.23"
    BUILDKIT_CONTEXT_KEEP_GIT_DIR = 1
  }
}

target "lint" {
  inherits = ["_common"]
  dockerfile = "./dockerfiles/lint.Dockerfile"
  output = [{ type = "cacheonly" }]
}

target "docs" {
  inherits = ["_common"]
  dockerfile = "./dockerfiles/docs.Dockerfile"
  output = ["./docs/reference"]
}
{
  "context": ".",
  "dockerfile": "./dockerfiles/docs.Dockerfile",
  "args": {
    "BUILDKIT_CONTEXT_KEEP_GIT_DIR": "1",
    "GO_VERSION": "1.23"
  },
  "output": [
    {
      "dest": "./docs/reference",
      "type": "local"
    }
  ]
}
{
  "context": ".",
  "dockerfile": "./dockerfiles/lint.Dockerfile",
  "args": {
    "BUILDKIT_CONTEXT_KEEP_GIT_DIR": "1",
    "GO_VERSION": "1.23"
  },
  "output": [
    {
      "type": "cacheonly"
    }
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions