Something went wrong. Try again.
A collection of +180 reusable WebAssembly modules for building composable CI/CD pipelines with FluentCI fluentci.io/modules
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174-- Generated by Gleam CI helpers.module CI.Component (run, version, build, registry_push, registry_pull, deploy, cloud_deploy, cloud_login, plugins_install, plugins_list, up) where
import Preludeimport CI.Contract as Contractimport Data.Maybe (Maybe)import Effect (Effect)import CI.ModuleDependencies as Dependenciesimport CI.CLI as Native
-- | Execute additional Spin or plugin commands with literal CSV arguments.-- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".".-- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist.-- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool.-- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000.-- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas.-- | @param arguments Additional literal native tokens in CSV form; CSV quotes preserve commas inside a token.run :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, arguments :: String } -> Effect Contract.ExecutionResultrun args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "spin" "run" json
-- | Print the installed Spin version.-- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".".-- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist.-- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool.-- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000.-- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas.version :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String } -> Effect Contract.ExecutionResultversion args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "spin" "version" json
-- | Build application components with the project toolchains.-- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".".-- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist.-- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool.-- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000.-- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas.-- | @param from Local app manifest/directory or native remote reference where supported; native CLI validates the source.-- | @param profile Named build profile.-- | @param components Comma-separated component IDs; omitted builds all components.-- | @param skipTargetChecks Skip deployment-target compatibility checks.-- | @param skipGenerateWits Skip generating dependency WIT files.-- | @param arguments Additional literal native tokens in CSV form; CSV quotes preserve commas inside a token.build :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, from :: Maybe String, profile :: Maybe String, components :: Maybe String, skipTargetChecks :: Maybe Boolean, skipGenerateWits :: Maybe Boolean, arguments :: Maybe String } -> Effect Contract.ExecutionResultbuild args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "spin" "build" json
-- | Push an application as an OCI artifact using native registry credentials.-- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".".-- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist.-- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool.-- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000.-- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas.-- | @param reference OCI registry reference including the desired tag.-- | @param from Local app manifest/directory or native remote reference where supported; native CLI validates the source.-- | @param profile Build profile to push.-- | @param build Build before pushing.-- | @param compose Compose component dependencies before pushing.-- | @param annotations Comma-separated KEY=VALUE OCI image annotations.-- | @param cacheDir Directory for registry cache data.-- | @param insecure Explicitly ignore registry certificate errors.-- | @param arguments Additional literal native tokens in CSV form; CSV quotes preserve commas inside a token.registry_push :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, reference :: String, from :: Maybe String, profile :: Maybe String, build :: Maybe Boolean, compose :: Maybe Boolean, annotations :: Maybe String, cacheDir :: Maybe String, insecure :: Maybe Boolean, arguments :: Maybe String } -> Effect Contract.ExecutionResultregistry_push args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "spin" "registry_push" json
-- | Pull an application from an OCI registry.-- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".".-- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist.-- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool.-- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000.-- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas.-- | @param reference OCI registry reference to pull.-- | @param prepare Output directory for a prepared app; native CLI requires absent or empty directory.-- | @param cacheDir Directory for registry cache data.-- | @param insecure Explicitly ignore registry certificate errors.-- | @param arguments Additional literal native tokens in CSV form; CSV quotes preserve commas inside a token.registry_pull :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, reference :: String, prepare :: Maybe String, cacheDir :: Maybe String, insecure :: Maybe Boolean, arguments :: Maybe String } -> Effect Contract.ExecutionResultregistry_pull args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "spin" "registry_pull" json
-- | Deploy through the plugin named by SPIN_DEPLOY_PLUGIN; arguments are plugin-specific.-- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".".-- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist.-- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool.-- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000.-- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas.-- | @param arguments Additional literal native tokens in CSV form; CSV quotes preserve commas inside a token.deploy :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, arguments :: Maybe String } -> Effect Contract.ExecutionResultdeploy args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "spin" "deploy" json
-- | Deploy through the explicitly installed Fermyon cloud plugin.-- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".".-- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist.-- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool.-- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000.-- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas.-- | @param from Local app manifest/directory or native remote reference where supported; native CLI validates the source.-- | @param build Build the local app before deployment.-- | @param environmentName Saved Fermyon deployment environment.-- | @param readinessTimeout Readiness wait in seconds; zero skips waiting.-- | @param variables Comma-separated KEY=VALUE app variables. Avoid passing secrets in argv.-- | @param keyValues Comma-separated KEY=VALUE entries for the default store.-- | @param links Comma-separated explicit resource links, such as sqlite:label=database.-- | @param arguments Additional literal native tokens in CSV form; CSV quotes preserve commas inside a token.cloud_deploy :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, from :: Maybe String, build :: Maybe Boolean, environmentName :: Maybe String, readinessTimeout :: Maybe Int, variables :: Maybe String, keyValues :: Maybe String, links :: Maybe String, arguments :: Maybe String } -> Effect Contract.ExecutionResultcloud_deploy args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "spin" "cloud_deploy" json
-- | Authenticate the cloud plugin using inherited SPIN_AUTH_TOKEN without browser login.-- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".".-- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist.-- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool.-- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000.-- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas.-- | @param environmentName Name under which to save the login.-- | @param url Cloud instance URL.-- | @param arguments Additional literal native tokens in CSV form; CSV quotes preserve commas inside a token.cloud_login :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, environmentName :: Maybe String, url :: Maybe String, arguments :: Maybe String } -> Effect Contract.ExecutionResultcloud_login args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "spin" "cloud_login" json
-- | Install a selected deployment/runtime plugin explicitly.-- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".".-- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist.-- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool.-- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000.-- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas.-- | @param name Plugin name, for example cloud.-- | @param pluginVersion Exact plugin release; omitted uses native selection.-- | @param yes Explicitly accept the plugin installation prompt.-- | @param arguments Additional literal native tokens in CSV form; CSV quotes preserve commas inside a token.plugins_install :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, name :: String, pluginVersion :: Maybe String, yes :: Maybe Boolean, arguments :: Maybe String } -> Effect Contract.ExecutionResultplugins_install args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "spin" "plugins_install" json
-- | Inspect installed Spin plugins.-- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".".-- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist.-- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool.-- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000.-- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas.-- | @param installed List installed plugins only.-- | @param arguments Additional literal native tokens in CSV form; CSV quotes preserve commas inside a token.plugins_list :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, installed :: Maybe Boolean, arguments :: Maybe String } -> Effect Contract.ExecutionResultplugins_list args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "spin" "plugins_list" json
-- | Run an application in the foreground; use a scoped lifecycle and bounded timeout.-- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".".-- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist.-- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool.-- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000.-- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas.-- | @param from Local app manifest/directory or native remote reference where supported; native CLI validates the source.-- | @param build Build the application first.-- | @param env Comma-separated KEY=VALUE component environment overrides.-- | @param arguments Additional literal native tokens in CSV form; CSV quotes preserve commas inside a token.up :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, from :: Maybe String, build :: Maybe Boolean, env :: Maybe String, arguments :: Maybe String } -> Effect Contract.ExecutionResultup args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "spin" "up" json