Skip to content

Add new getting started step for starter policies#3063

Open
shaun-od wants to merge 2 commits intomainfrom
mas/starter-policies
Open

Add new getting started step for starter policies#3063
shaun-od wants to merge 2 commits intomainfrom
mas/starter-policies

Conversation

@shaun-od
Copy link
Contributor

Background

Platform Hub policies getting started docs need to be updated with the starter policies feature.

Result
Updates the getting started guide with starter policy details.

To be merged once Starter Policies name has been confirmed

@shaun-od shaun-od changed the title adding new getting started step for starter policies Add new getting started step for starter policies Mar 12, 2026
Copy link
Contributor

@steve-fenton-octopus steve-fenton-octopus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!


:::div{.hint}

- If you want to start with the most basic policy, choose Create Blank Policy.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- If you want to start with the most basic policy, choose Create Blank Policy.
If you want to start with the most basic policy, choose Create Blank Policy.

@shaun-od did you mean to add this as a bullet point?


:::div{.hint}

- The slug can not be changed once a policy is created.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The slug can not be changed once a policy is created.

@shaun-od another bullet point which I am not sure if it's intentional


Full details of output schema is available on the [schema page](/docs/platform-hub/policies/schema).

See

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shaun-od I realise this change is not included in this PR but I spotted it and it looks like a copy error and not required

### 4. Define the policy scope
### 5. Define the policy scope

You’ll now need to define the policy's scope, as Rego in the OCL file. Octopus will provide data about your deployments to the policy engine to use during evaluation. When you are writing your Rego code for scoping or conditions, this input data is available under the value ```input.VALUE```. This scope section of the policy defines the package name, which must match the underlying .ocl file name the policy is stored in. By default, the policy evaluates to false. The scope will evaluate to true if the deployment is going to the Production environment, for the ACME project, and in the Default space - all three conditions must be true at the same time.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
You’ll now need to define the policy's scope, as Rego in the OCL file. Octopus will provide data about your deployments to the policy engine to use during evaluation. When you are writing your Rego code for scoping or conditions, this input data is available under the value ```input.VALUE```. This scope section of the policy defines the package name, which must match the underlying .ocl file name the policy is stored in. By default, the policy evaluates to false. The scope will evaluate to true if the deployment is going to the Production environment, for the ACME project, and in the Default space - all three conditions must be true at the same time.
You’ll now need to define the policy's scope, as Rego. Octopus will provide data about your deployments to the policy engine to use during evaluation. When you are writing your Rego code for scoping or conditions, this input data is available under the value ```input.VALUE```. This scope section of the policy defines the package name, which must match the underlying .ocl file name the policy is stored in. By default, the policy evaluates to false. The scope will evaluate to true if the deployment is going to the Production environment, for the ACME project, and in the Default space - all three conditions must be true at the same time.

@shaun-od we should drop the mention of the OCL file because all policy changes are being made in the UI and not as code.

@@ -135,7 +149,7 @@
}
```

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shaun-od do we need to callout that ēvaluate is a required keyword and cannot be renamed?

For conditions we call out the following:
You cannot rename result, it must be called result.

Copy link

@octo-ryanhall octo-ryanhall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shaun-od I've added a couple of suggestions that require a review before we publish the docs. I think we have a few things we need to also consider.

Should we update the code snippets in these docs so that they reflect the code in the starter policies? Currently they are missing the comments.

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.

3 participants