Page MenuHomeDevCentral

Allow to pass context to CLI
Open, HighPublic

Description

Context can be set to HTTP API, but not as command line. This is not desired, as we want to able to use both with the same information.

Context should be passed through an argument or through stdin, to allow more complex payloads.

$ alkane init foo.domain.tld --context https://repo/foo.git

$ echo "{...}" | alkane init foo.domain.tld

Event Timeline

It was actually intended to pass the context to CLI:

alkane deploy foo.domain.tld somecontext

"somecontext" would be added to unused DeployArgs artifact field, but then None would be passed as context argument.

Let's clarify the field:

#[derive(Debug, Args)]
pub struct DeployArgs {
    /// The name of the site to deploy, using sub.domain.tld format
    pub site_name: String,

    /// The context to pass to the deployment script. Allows CD to give metadata or an URL to download last artifact.
    pub context: Option<String>,
}