Treatment pushArtifact
work/artifact::pushArtifact
Parameters
↳ var access: string = "organization"
↳ var entrypoint: Option<string> = _
↳ var forever: bool = false
↳ var lock: bool = false
↳ var parallel: u32 = 4
↳ var retention_days: u32 = 0
Inputs
⇥ filesystem: Block<FileSystem> (fs/filesystem::FileSystem)
⇥ name: Block<string>
⇥ path: Block<string>
Outputs
↦ artifact: Block<Json> (json::Json)
↦ completed: Block<void>
↦ error: Block<string>
↦ failed: Block<void>
↦ finished: Block<void>
Push the files of a directory as a run artifact of api.melodium.tech.
The regular files under path of filesystem (fs/dir::files, links being left out) are kept
as the artifact name of the run, each at its path relative to path, such as index.html
and assets/main.css. Each file is uploaded in a track of its own, at most parallel at
once, read, searched for revealed secret values (std/secret::scan) with its path, and
uploaded in parts while it is read (work/run::upload).
name is made of letters, digits, _, . and -, unique in the run. The artifact is:
- shown in the run page when
entrypointis one of its files, such asindex.html, making it a render; - read by members of the organization and its runs (
accessorganization), or by anyone (public); - kept
retention_daysdays, the retention of the plan when0, or until deleted whenforever; - never deleted before it expires when
lock, for good.
Once every file is uploaded, the artifact is completed: artifact gives it, as api.melodium.tech
describes it, with completed. If a file cannot be read or uploaded, holds a revealed secret
value, or api.melodium.tech refuses the artifact, failed is emitted and error gives the
reason; the pending artifact is never shown, and api.melodium.tech abandons it.
finished is emitted in every case.
Artifacts are only pushed by programs run by api.melodium.tech.