-- Generated by Gleam CI helpers. module CI.Component (run, version, upload, download, release_upload) where import Prelude import CI.Contract as Contract import Data.Maybe (Maybe) import Effect (Effect) import CI.ModuleDependencies as Dependencies import CI.CLI as Native -- | Execute arbitrary literal CLI 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 Output artifacts to collect as NAME=PATH entries; names must be unique. -- | @param arguments Literal native CLI argument tokens, passed without shell expansion. run :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe (Array String), arguments :: Array String } -> Effect Contract.ExecutionResult run args = do json <- Contract.cliInput (Contract.encodeInput args) Native.executeWithSetup Dependencies.ensureFor "gitlab-artifacts" "run" json -- | Print the CLI 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 Output artifacts to collect as NAME=PATH entries; names must be unique. version :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe (Array String) } -> Effect Contract.ExecutionResult version args = do json <- Contract.cliInput (Contract.encodeInput args) Native.executeWithSetup Dependencies.ensureFor "gitlab-artifacts" "version" json -- | Upload a prebuilt ZIP to the current job using GitLab job-token authentication. -- | @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 Output artifacts to collect as NAME=PATH entries; names must be unique. -- | @param archive Archive supplied to the gitlab-artifacts upload operation. -- | @param jobId Job Id supplied to the gitlab-artifacts upload operation. -- | @param apiUrl Api Url supplied to the gitlab-artifacts upload operation. Default: "https://gitlab.com/api/v4". upload :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe (Array String), archive :: String, jobId :: String, apiUrl :: Maybe String } -> Effect Contract.ExecutionResult upload args = do json <- Contract.cliInput (Contract.encodeInput args) Native.executeWithSetup Dependencies.ensureFor "gitlab-artifacts" "upload" json -- | download -- | @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 Output artifacts to collect as NAME=PATH entries; names must be unique. -- | @param repo Repo supplied to the gitlab-artifacts download operation. -- | @param job Job supplied to the gitlab-artifacts download operation. -- | @param path Path supplied to the gitlab-artifacts download operation. Default: "dist". -- | @param ref Ref supplied to the gitlab-artifacts download operation. download :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe (Array String), repo :: Maybe String, job :: String, path :: Maybe String, ref :: String } -> Effect Contract.ExecutionResult download args = do json <- Contract.cliInput (Contract.encodeInput args) Native.executeWithSetup Dependencies.ensureFor "gitlab-artifacts" "download" json -- | release upload -- | @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 Output artifacts to collect as NAME=PATH entries; names must be unique. -- | @param repo Repo supplied to the gitlab-artifacts release_upload operation. -- | @param tag Tag supplied to the gitlab-artifacts release_upload operation. -- | @param files Files selected for the native operation; paths are passed literally without shell expansion. release_upload :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe (Array String), repo :: Maybe String, tag :: String, files :: Array String } -> Effect Contract.ExecutionResult release_upload args = do json <- Contract.cliInput (Contract.encodeInput args) Native.executeWithSetup Dependencies.ensureFor "gitlab-artifacts" "release_upload" json