The following are conventions for declaring different type of source inputs. This information is provided to the lifecycle using project-metadata.toml.
The following types are concrete source types and can use any keys as long as they don’t overlap with additive sources.
type
(string, required)Must be git
source
(required)version
(required)
commit
(string, required)
Full commit hash
describe
(string, optional)
Description of commit (see git describe
)
metadata
(optional)
repository
(string, optional)
Repository URL
refs
(list of strings, optional)
Additional relevant Git references
[source]
type = "git"
[source.version]
commit = "63a73f1b0f2a4f6978c19184b0ea33ad3f092913"
describe = "v0.18.1-2-g3f092913"
[source.metadata]
repository = "https://github.com/myorg/myrepo.git"
refs = ["master", "v3.0"]
type
(string, required)Must be image
source
(required)version
(required)
digest
(string, required)metadata
(optional)
path
(string, optional)
Absolute path to source in image
repository
(string, optional)
Fully-qualified image name
refs
(list of strings, optional)
Additional relevant image names/tags
[source]
type = "image"
[source.version]
digest = "146c4bce42545e6a4575283b32a7f01924ef86ce848273079693a42b52b27321"
[source.metadata]
path = "/source"
repository = "index.docker.io/example/image:latest"
refs = ["index.docker.io/example/image:mytag", "index.docker.io/example/image@sha256:146c4bce42545e6a4575283b32a7f01924ef86ce848273079693a42b52b27321"]
The following source information is considered additive and should not overlap with source types.
project.toml
type
(string, required)Must be project
(only if no other type is present)
source
(required)version
(required)
version
(string, optional)_.version
metadata
(optional)
url
(string, optional)_.source-url
[source]
type = "project"
[source.version]
version = "1.2.3"
[source.metadata]
url = "https://github.com/example/repo"
[source]
type = "image"
[source.version]
digest = "146c4bce42545e6a4575283b32a7f01924ef86ce848273079693a42b52b27321"
version = "1.2.3"
[source.metadata]
path = "/source"
repository = "index.docker.io/example/image:latest"
refs = ["index.docker.io/example/image:mytag", "index.docker.io/example/image@sha256:146c4bce42545e6a4575283b32a7f01924ef86ce848273079693a42b52b27321"]
url = "https://github.com/example/repo"