Skip to content

Migrate step templates to a source-first layout#1679

Draft
bcullman wants to merge 7 commits intoOctopusDeploy:masterfrom
bcullman:src-migration
Draft

Migrate step templates to a source-first layout#1679
bcullman wants to merge 7 commits intoOctopusDeploy:masterfrom
bcullman:src-migration

Conversation

@bcullman
Copy link
Copy Markdown
Contributor

@bcullman bcullman commented May 5, 2026

Background

This PR applies the repository migration to a source-first step-template layout.

It addresses the reviewability and contributor-workflow problems tracked in #1677 by moving editable step-template source into src/step-templates/** while retaining generated step-templates/*.json as the compatibility output.

The migration tooling itself lives in draft PR #1678. That draft PR exists so reviewers can inspect the migration and validation mechanics independently of this repository-migration PR, and use that branch if they want to reproduce the conversion flow locally.

Results

Step templates are now authored in a source-first layout, with script content stored as normal source files beside metadata.json.

Contributor documentation and review guidance have been updated to reflect that workflow, including how to start from an Octopus-exported JSON file using the existing unpack tooling.

Migration-only scripts used to validate the transition are not carried in this branch.

Before

  • Step templates were effectively edited through step-templates/*.json
  • Script changes were commonly reviewed as escaped JSON string diffs
  • Documentation described the JSON-first workflow
  • Category logo guidance pointed at the legacy source location

After

  • Step templates are authored under src/step-templates/**
  • Generated step-templates/*.json remains in place as the compatibility output
  • Script changes are reviewable as normal source-file diffs
  • Documentation now describes the source-first workflow and manual unpack path for exported JSON
  • Category logo guidance now points at src/step-templates/logos

Pre-requisites

  • Id should be a GUID that is not 00000000-0000-0000-0000-000000000000
    • NOTE If you are modifying an existing step template, please make sure that you do not modify the Id property (updating the Id will break the Library sync functionality in Octopus).
  • Version should be incremented, otherwise the integration with Octopus won't update the step template correctly
  • Parameter names should not start with $
  • Step template parameter names (the ones declared in the JSON, not the script body) should be prefixed with a namespace so that they are less likely to clash with other user-defined variables in Octopus (see this issue). For example, use an abbreviated name of the step template or the category of the step template).
  • LastModifiedBy field must be present, and (optionally) updated with the correct author
  • The best practices documented here have been applied
  • If a new Category has been created:
    • An image with the name {categoryname}.png must be present under the src/step-templates/logos folder
    • The switch in the humanize function in gulpfile.babel.js must have a case statement corresponding to it

Fixes #1677

Validation and compatibility note

Draft PR #1678 is the place to review or rerun the migration mechanics and validation workflow.

This PR assumes compatibility is preserved as long as the build continues to generate step-templates/*.json in the legacy location. The exact retrieval flow used by library.octopus.com is not fully documented here, but the generated JSON output is believed to remain compatible.

@bcullman bcullman marked this pull request as draft May 5, 2026 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve step template reviewability and local development with a source-first workflow

1 participant