Skip to content

Commit 788e4af

Browse files
committed
line edits
1 parent 01cba41 commit 788e4af

1 file changed

Lines changed: 22 additions & 19 deletions

File tree

README.md

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ Step packages are an evolution in the development of Octopus steps. Step package
22

33
* Developed outside the main Octopus code base.
44
* Tested as isolated and independent projects.
5-
* Distributed on their own independent timelines.
6-
* Independently versioned, with each version able to be run side-by-side.
5+
* Distributed on their own independent timelines (not quite implemented yet).
6+
* Independently versioned, with each version able to be run side-by-side (not implemented yet).
77

8-
This sample project provides a starting point for anyone looking to create a new step package. The code in this repository defines a "Hello World" target and step to demonstrate a minimal step package implementation.
8+
This sample project provides a starting point for anyone looking to create a new step package. The code in this repository defines a "Hello World" target and step demonstrating a minimal step package implementation.
99

1010
## Project directory structure
1111

12-
The directory structure of a step package project is shown below:
12+
The directory structure of a step package is shown below:
1313

1414
* `\`
15-
* `steps` - A directory containing the step definitions.
16-
* `<step-name>` - A directory containing the definition of a step. There may be many of these directories to define many steps within a single step package.
15+
* `steps` - A directory containing one or more step definitions.
16+
* `<step-name>` - A directory containing the definition of a step. There may be many of these directories defining many steps within a single step package.
1717
* `src` - The parent directory containing the step code and assets.
1818
* `__tests__` - The directory containing step tests.
1919
* `executor.spec.ts` - Tests validating the logic in the `executor.ts` file.
@@ -23,12 +23,12 @@ The directory structure of a step package project is shown below:
2323
* `metadata.json` - The step metadata.
2424
* `ui.ts` - The step UI definition.
2525
* `validation.ts` - The step validation rules.
26-
* `targets`
27-
* `<target-name>`
28-
* `src` - The parent directory containing the step code and assets.
29-
* `__tests__` - The directory containing step tests.
26+
* `targets` - A directory containing one or more target definitions.
27+
* `<target-name>` - A directory containing the definition of a target. There may be many of these directories defining many steps within a single step package.
28+
* `src` - The parent directory containing the target code and assets.
29+
* `__tests__` - The directory containing target tests.
3030
* `executor.spec.ts` - Tests validating the logic in the `executor.ts` file.
31-
* `executor.ts` - The code to be executed when a target healthcheck is run by Octopus.
31+
* `executor.ts` - The code to be executed when a target health check is run by Octopus.
3232
* `inputs.ts` - The definition of the inputs required by the target.
3333
* `logo.svg` - The image to be displayed in the Octopus web UI for the target.
3434
* `metadata.json` - The target metadata.
@@ -55,7 +55,7 @@ Creating a new target involves creating the following files under the `steps/<ta
5555

5656
### `metadata.json`
5757

58-
The `metadata.json` provides details about the target. A sample is shown below:
58+
The `metadata.json` file provides details about the target. A sample is shown below:
5959

6060
```json
6161
{
@@ -74,11 +74,11 @@ The `metadata.json` provides details about the target. A sample is shown below:
7474

7575
* `schemaVersion` is the version of the metadata file. `1.0.0` is the only version available.
7676
* `version` is the version of the target. Versioning is covered in detail [here](https://github.com/OctopusDeploy/Architecture/blob/main/Steps/Concepts/Versioning.md).
77-
* `type` defines the type of resource tobe created. It must be `deployment-target` for a target.
77+
* `type` defines the type of resource to be created. It must be `deployment-target` for a target.
7878
* `id` is the resource ID.
7979
* `name` is the name of the target displayed by the Octopus web UI.
8080
* `description` is the description of the target displayed by the Octopus UI.
81-
* `categories` is an array containing one or more step categories display by the Octopus UI where the target will be listed.
81+
* `categories` is an array containing one or more target categories display by the Octopus UI where the target will be listed.
8282
* `launcher` defines how the step is executed. A value of `node` means the step is executed by Node.js.
8383

8484
### `inputs.ts`
@@ -112,11 +112,11 @@ export default HelloWorldDeploymentTargetHealthCheckExecutor;
112112

113113
### `ui.ts`
114114

115-
The form to be exposed by the Octopus web UI is defined by the function exported by the `ui.ts` file. The form is defined as an instance of the `DeploymentTargetUI` interface, which has two functions: `createInitialInputs` and `editInputsForm`.
115+
The form displayed by the Octopus web UI is defined by the function exported by the `ui.ts` file. The form is defined as an instance of the `DeploymentTargetUI` interface, which has two functions: `createInitialInputs` and `editInputsForm`.
116116

117117
The `createInitialInputs` function allows the initial default field values to be defined.
118118

119-
The `editInputsForm` function provides a DSL for building the user interface. The first parameter is the inputs defined in `inputs.ts`. The second parameter is an instance of `AvailableStepComponents`, which has factory functions for creating various input widgets like text fields, lists, radio buttons etc.
119+
The `editInputsForm` function provides a DSL for building the user interface. The first parameter is the inputs defined in `inputs.ts`. The second parameter is an instance of `AvailableDeploymentTargetComponents`, which has factory functions for creating various input widgets like text fields, lists, radio buttons etc.
120120

121121
Here we define the initial value of the `greetingPrefix` input to be `Hello`, and build the form with a single `text` input:
122122

@@ -149,11 +149,11 @@ export default HelloWorldTargetUI;
149149

150150
### `validation.ts`
151151

152-
Form validation is performed by the function exported by the `validate.ts` file. This function the returns an array of `ValueValidator` objects, and takes two parameters:
152+
Form validation is performed by the function exported by the `validate.ts` file. This function returns an array of `ValueValidator` objects, and takes two parameters:
153153
1. The step inputs as [input paths](https://github.com/OctopusDeploy/Architecture/blob/main/Steps/Concepts/InputsAndOutputs.md#input-paths).
154154
2. A validation function that returns a `ValueValidator` and takes two parameters:
155155
1. An input path.
156-
2. A function the returns a string containing the error code (or returns nothing if there is no validation error) and takes the input value (retrieved from the input path) as the first parameter.
156+
2. A function returning a string containing the error code (or returns nothing if there is no validation error) and takes the input value (retrieved from the input path) as the first parameter.
157157

158158
Here is an example:
159159

@@ -251,7 +251,10 @@ export default HelloWorldStepExecutor;
251251

252252
### `ui.ts`
253253

254-
The step form to be displayed by the Octopus web UI is defined much the same was it was with the target. There are some subtle differences though: it implements the `StepUI` type, and first parameter to the `createInitialInputs` function can be an instance of `InitialInputFactories`, which provides the ability to create blank package references.
254+
The step form to be displayed by the Octopus web UI is defined much the same was it was with the target. There are some subtle differences though:
255+
* It implements the `StepUI` type.
256+
* The first parameter to the `createInitialInputs` function can be an instance of `InitialInputFactories`, which provides the ability to create blank package references.
257+
* The second parameter to the `editInputsForm` function is an instance of `AvailableStepComponents`, which exposes a different widget set.
255258

256259
Here we define the initial value of the `name` input to be a blank string, and build the form with a single `text` input:
257260

0 commit comments

Comments
 (0)