diff --git a/API.md b/API.md index 6765f99..dbe45ef 100644 --- a/API.md +++ b/API.md @@ -2652,6 +2652,53 @@ public readonly logicalID: string; ## Classes +### ConstantStringValueResolver + +- *Implements:* IValueResolver + +#### Initializers + +```typescript +import { ConstantStringValueResolver } from 'cdk8s-pipelines' + +new ConstantStringValueResolver(val: string) +``` + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| val | string | *No description.* | + +--- + +##### `val`Required + +- *Type:* string + +--- + + + +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| value | string | Gets the string value for a parameter. | + +--- + +##### `value`Required + +```typescript +public readonly value: string; +``` + +- *Type:* string + +Gets the string value for a parameter. + +--- + + ### ParameterBuilder Builds the parameters for use by Tasks and Pipelines. @@ -2685,8 +2732,7 @@ new ParameterBuilder(id: string) | ofType | Sets the type of the parameter. | | withDefaultValue | Sets the default value for the parameter. | | withDescription | Sets the description of the parameter. | -| withName | Sets the name of the parameter. | -| withPiplineParameter | Sets the default value for the parameter. | +| withName | *No description.* | | withValue | Sets the value for the parameter. | --- @@ -2733,51 +2779,29 @@ Sets the description of the parameter. --- -##### `withName` +##### ~~`withName`~~ ```typescript public withName(name: string): ParameterBuilder ``` -Sets the name of the parameter. - ###### `name`Required - *Type:* string --- -##### `withPiplineParameter` - -```typescript -public withPiplineParameter(pipelineParamName: string, defaultValue?: string): ParameterBuilder -``` - -Sets the default value for the parameter. - -###### `pipelineParamName`Required - -- *Type:* string - ---- - -###### `defaultValue`Optional - -- *Type:* string - ---- - ##### `withValue` ```typescript -public withValue(val: string): ParameterBuilder +public withValue(val: string | IValueResolver): ParameterBuilder ``` Sets the value for the parameter. ###### `val`Required -- *Type:* string +- *Type:* string | IValueResolver --- @@ -2787,10 +2811,10 @@ Sets the value for the parameter. | **Name** | **Type** | **Description** | | --- | --- | --- | | description | string | Gets the description of the parameter. | -| requiresPipelineParameter | boolean | Returns true if this parameter expects input at the pipeline level. | | defaultValue | string | *No description.* | | logicalID | string | Gets the logicalID for the `ParameterBuilder`, which is used by the underlying construct. | | name | string | Gets the name of the parameter. | +| requiresPipelineParameter | string | Returns the name of the input if the parameter expects one at the pipeline level, undefined otherwise. | | type | string | Gets the type of the parameter. | | value | string | Gets the value of the parameter. | @@ -2808,18 +2832,6 @@ Gets the description of the parameter. --- -##### `requiresPipelineParameter`Required - -```typescript -public readonly requiresPipelineParameter: boolean; -``` - -- *Type:* boolean - -Returns true if this parameter expects input at the pipeline level. - ---- - ##### `defaultValue`Optional ```typescript @@ -2854,6 +2866,18 @@ Gets the name of the parameter. --- +##### `requiresPipelineParameter`Optional + +```typescript +public readonly requiresPipelineParameter: string; +``` + +- *Type:* string + +Returns the name of the input if the parameter expects one at the pipeline level, undefined otherwise. + +--- + ##### `type`Optional ```typescript @@ -2915,6 +2939,7 @@ new PipelineBuilder(scope: Construct, id: string) | buildPipeline | Builds the actual [Pipeline](https://tekton.dev/docs/getting-started/pipelines/) from the settings configured using the fluid syntax. | | withDescription | Provides the name for the pipeline task and will be rendered as the `name` property. | | withName | Provides the name for the pipeline task and will be rendered as the `name` property. | +| withStringParam | Add parameter of type string to the Pipeline. | | withTask | *No description.* | --- @@ -2961,6 +2986,20 @@ Provides the name for the pipeline task and will be rendered as the `name` prope --- +##### `withStringParam` + +```typescript +public withStringParam(param: ParameterBuilder): PipelineBuilder +``` + +Add parameter of type string to the Pipeline. + +###### `param`Required + +- *Type:* ParameterBuilder + +--- + ##### `withTask` ```typescript @@ -3031,6 +3070,53 @@ a local variable before the loop and reference that instead. --- +### PipelineParameterValueResolver + +- *Implements:* IValueResolver + +#### Initializers + +```typescript +import { PipelineParameterValueResolver } from 'cdk8s-pipelines' + +new PipelineParameterValueResolver(param: ParameterBuilder) +``` + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| param | ParameterBuilder | *No description.* | + +--- + +##### `param`Required + +- *Type:* ParameterBuilder + +--- + + + +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| value | string | Gets the string value for a parameter. | + +--- + +##### `value`Required + +```typescript +public readonly value: string; +``` + +- *Type:* string + +Gets the string value for a parameter. + +--- + + ### PipelineRunBuilder Builds a `PipelineRun` using the supplied configuration. @@ -3946,4 +4032,32 @@ Gets the name of the workspace. --- +## Protocols + +### IValueResolver + +- *Implemented By:* ConstantStringValueResolver, PipelineParameterValueResolver, IValueResolver + +Resolves the value through different means. + + +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| value | string | Gets the string value for a parameter. | + +--- + +##### `value`Required + +```typescript +public readonly value: string; +``` + +- *Type:* string + +Gets the string value for a parameter. + +---