Module ploigos_step_runner.step_implementers.package.dotnet_package
StepImplementer for the package step using Dotnet.
Notes
Step Configuration
Step configuration expected as input to this step. Could come from:
- static configuration
- runtime configuration
- previous step results
| Configuration Key | Required? | Default | Description |
|---|---|---|---|
csproj-file |
Yes | .csproj or .sln file to pass to dotnet command |
Result Artifacts
Results artifacts output by this step.
| Result Artifact Key | Description |
|---|---|
Classes
class DotnetPackage (workflow_result, parent_work_dir_path, config, environment=None)-
StepImplementer for the
dotnet publishcommandExpand source code
class DotnetPackage(StepImplementer): """ StepImplementer for the `dotnet publish` command """ @staticmethod def step_implementer_config_defaults(): return [] @staticmethod def _required_config_or_result_keys(): return [ "csproj-file" ] def _run_step(self): # Command usage: `dotnet [options] publish [<PROJECT | SOLUTION>]` # Build the arguments args = [] args += ["publish"] # publish args += self._build_options() # [options] csproj_file = self.get_value('csproj-file') args += [csproj_file] # [<PROJECT | SOLUTION>] # STDOUT goes here output_file_path = self.write_working_file('dotnet_publish_output.txt') # Run the command Shell().run( 'dotnet', args=args, output_file_path=output_file_path ) return StepResult.from_step_implementer(self) def _build_options(self): """ Build the [options] part of the dotnet command """ options = [] # The 'dotnet' command has a -c flag which stands for 'configuration'. # Use it if psr is configured for it. config_setting = self.get_value('configuration') if config_setting is not None: options += ['-c', config_setting] return optionsAncestors
- StepImplementer
- abc.ABC
Inherited members
StepImplementer:configcreate_working_dir_sub_direnvironmentget_config_valueget_copy_of_runtime_step_configget_result_valueget_valueglobal_config_defaultsglobal_environment_config_defaultshas_config_valuerun_stepstep_configstep_config_overridesstep_environment_configstep_implementer_config_defaultsstep_namesub_step_implementer_namesub_step_namework_dir_pathworkflow_resultwrite_working_file