-- Generated by Gleam CI helpers. module CI.Component (run, version, upload, download, search, build_publish, build_promote) 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 "jfrog-cli" "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 "jfrog-cli" "version" json -- | Upload build artifacts using a configured JFrog server. -- | @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 serverId Server Id supplied to the jfrog-cli upload operation. -- | @param flat Flat supplied to the jfrog-cli upload operation. -- | @param recursive Recursive supplied to the jfrog-cli upload operation. -- | @param buildName Build Name supplied to the jfrog-cli upload operation. -- | @param buildNumber Build Number supplied to the jfrog-cli upload operation. -- | @param pattern Pattern supplied to the jfrog-cli upload operation. -- | @param target Target selected for this native operation. upload :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe (Array String), serverId :: Maybe String, flat :: Maybe Boolean, recursive :: Maybe Boolean, buildName :: Maybe String, buildNumber :: Maybe String, pattern :: String, target :: String } -> Effect Contract.ExecutionResult upload args = do json <- Contract.cliInput (Contract.encodeInput args) Native.executeWithSetup Dependencies.ensureFor "jfrog-cli" "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 serverId Server Id supplied to the jfrog-cli download operation. -- | @param flat Flat supplied to the jfrog-cli download operation. -- | @param pattern Pattern supplied to the jfrog-cli download operation. -- | @param destination Destination supplied to the jfrog-cli download operation. Default: "dist/". download :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe (Array String), serverId :: Maybe String, flat :: Maybe Boolean, pattern :: String, destination :: Maybe String } -> Effect Contract.ExecutionResult download args = do json <- Contract.cliInput (Contract.encodeInput args) Native.executeWithSetup Dependencies.ensureFor "jfrog-cli" "download" json -- | search -- | @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 serverId Server Id supplied to the jfrog-cli search operation. -- | @param pattern Pattern supplied to the jfrog-cli search operation. search :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe (Array String), serverId :: Maybe String, pattern :: String } -> Effect Contract.ExecutionResult search args = do json <- Contract.cliInput (Contract.encodeInput args) Native.executeWithSetup Dependencies.ensureFor "jfrog-cli" "search" json -- | build publish -- | @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 serverId Server Id supplied to the jfrog-cli build_publish operation. -- | @param buildName Build Name supplied to the jfrog-cli build_publish operation. -- | @param buildNumber Build Number supplied to the jfrog-cli build_publish operation. build_publish :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe (Array String), serverId :: Maybe String, buildName :: String, buildNumber :: String } -> Effect Contract.ExecutionResult build_publish args = do json <- Contract.cliInput (Contract.encodeInput args) Native.executeWithSetup Dependencies.ensureFor "jfrog-cli" "build_publish" json -- | build promote -- | @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 serverId Server Id supplied to the jfrog-cli build_promote operation. -- | @param copy Copy supplied to the jfrog-cli build_promote operation. -- | @param status Status supplied to the jfrog-cli build_promote operation. -- | @param buildName Build Name supplied to the jfrog-cli build_promote operation. -- | @param buildNumber Build Number supplied to the jfrog-cli build_promote operation. -- | @param targetRepository Target Repository supplied to the jfrog-cli build_promote operation. build_promote :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe (Array String), serverId :: Maybe String, copy :: Maybe Boolean, status :: Maybe String, buildName :: String, buildNumber :: String, targetRepository :: String } -> Effect Contract.ExecutionResult build_promote args = do json <- Contract.cliInput (Contract.encodeInput args) Native.executeWithSetup Dependencies.ensureFor "jfrog-cli" "build_promote" json