Treatment stepOn

cicd/steps::stepOn


Configuration

⬡ logger: log/logger::Logger
⬡ runner: cicd/runners::CicdRunnerEngine

Parameters

↳ var commands: Vec<Command> = [] (process/command::Command)
↳ var environment: Option<Environment> = _ (process/environment::Environment)
↳ var executor_name: Option<string> = _
↳ var name: string
↳ var out_file: Option<string> = _
↳ var out_filesystem: Option<string> = _
↳ var stop_on_failure: bool = true

Inputs

⇥ trigger: Block<void>

Outputs

↦ completed: Block<void>
↦ data: Stream<byte>
↦ failed: Block<void>
↦ finished: Block<void>
↦ started: Block<void>


Runs step on given runner.

Uses the runner to run given commands on executor designated by executor_name with environment.

name serves as identifying purpose.

After commands run, and if they all succeed, the out_file from out_filesystem is extracted and streamed through data.

ℹ️ commands can be empty, as well as environment and executor_name set to none, making stepOn to directly extract out_file from out_filesystem. out_file and out_filesystem can be none and data stream will be closed without emitting reading error.

⚠️ environment may rely on the executor abilities to be correctly setted up. Within containers it is usually passed to /usr/bin/env command, which then require it to be present to use specific environment. Also, while present in many base images, abilities of /usr/bin/env may be limited. Distributions such as Alpine Linux includes a basic env command unable to set working directory, requiring to run apk add coreutils-env beforehand if working_directory of given environment is used.