pipeline_parsing_service
            PipelineParsingService
¶
    A service class that parses a YAML document or string into a Pipeline object.
Source code in src/cloe_nessy/pipeline/pipeline_parsing_service.py
                | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |  | 
            _replace_variables(yaml_str)
  
      staticmethod
  
¶
    Replace variable placeholders in a YAML string.
Replaces environment variables with the pattern {{env:var-name}}. Where
the var-name is the name of the environment variable. Replaces secret
references with the pattern {{secret-scope-name:secret-key}}. Where
scope-name is the name of the secret scope and secret-key is the key of
the secret.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| yaml_str | str | A string that can be parsed in YAML format. | required | 
Returns:
| Type | Description | 
|---|---|
| str | The same YAML string with environment variable placeholders replaced. | 
Source code in src/cloe_nessy/pipeline/pipeline_parsing_service.py
              
            parse(path=None, yaml_str=None)
  
      staticmethod
  
¶
    Reads the YAML from a given Path and returns a Pipeline object.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| path | Path | None | Path to the YAML document. | None | 
| yaml_str | str | None | A string that can be parsed in YAML format. | None | 
Raises:
| Type | Description | 
|---|---|
| ValueError | If neither 'path' nor 'yaml_str' has been provided. | 
Returns:
| Name | Type | Description | 
|---|---|---|
| Pipeline | Pipeline | The resulting Pipeline instance. | 
Source code in src/cloe_nessy/pipeline/pipeline_parsing_service.py
              
            register_pipeline_action(pipeline_action_class)
  
      staticmethod
  
¶
    Registers a custom pipeline action class.
Note
Registering an action enables the custom action to be used in the pipeline YAML definition. This is automatically called, when the PipelineParsingService is instantiated with (a list of) custom actions.