Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf0f4a65

Browse files
authored
Update octopus-deploy.md (codefresh-io#1107)
* Update octopus-deploy.mdAdded octopus-deploy-login step* Update octopus-deploy.md* Update octopus-deploy.md* Update octopus-deploy.md
1 parent15ae9ec commitf0f4a65

File tree

1 file changed

+63
-5
lines changed

1 file changed

+63
-5
lines changed

‎_docs/integrations/octopus-deploy.md‎

Lines changed: 63 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ The table describes the instance fields you need to define.
116116
| Octopus instance variable | Description|
117117
| ------------- | ------- |
118118
|`OCTOPUS_URL` | The Octopus Server URL on which to run your Octopus Deploy steps. See [Getting started with Octopus](https://octopus.com/docs/getting-started){:target="\_blank"} for an overview of deploy concepts. |
119-
| `OCTOPUS_API_KEY` | The Octopus Deploy API Key required for authentication. Use an existing key or create a new API key. See [Creating an API Key](https://octopus.com/docs/octopus-rest-api/how-to-create-an-api-key#HowtocreateanAPIkey-CreatinganAPIkey){:target="\_blank"}. |
119+
| `OCTOPUS_API_KEY` | The Octopus Deploy API Key required for authentication. Use an existing key or create a new API key. See [Creating an API Key](https://octopus.com/docs/octopus-rest-api/how-to-create-an-api-key#HowtocreateanAPIkey-CreatinganAPIkey){:target="\_blank"}.<br> Alternatively, you can log in with [OIDC access tokens](#log-in-with-access-token). |
120120
| `OCTOPUS_SPACE` | The Space in which to run steps. See [Spaces](https://octopus.com/docs/administration/spaces){:target="\_blank"}.|
121121
|`PROJECT` | The Octopus Deploy project to which to deploy the release. See [Setting up a project](https://octopus.com/docs/projects/setting-up-projects){:target="\_blank"}.|
122122

@@ -170,20 +170,77 @@ For a tenanted release, see [Deploy a tenanted release](#deploy-a-tenanted-relea
170170

171171
## Optional Octopus Deploy steps in Codefresh pipelines
172172

173+
### Log in with access token
174+
175+
To authenticate with Octopus using an access token instead of an API key, use the `octopusdeploy-login` step. This approach enhances security by leveraging short-lived access tokens.
176+
177+
The step accepts an ID token as input, performing a token exchange with the Octopus server to generate an Octopus access token.
178+
179+
180+
##### Usage requirements
181+
* Codefresh `obtain_id_token` step
182+
The `obtain_id_token` step must run _before_ the `octopusdeploy-login` step to generate the `ID_TOKEN` required by `octopusdeploy-login`.
183+
184+
```yaml
185+
login:
186+
type: octopusdeploy-login
187+
arguments:
188+
ID_TOKEN: '${{ID_TOKEN}}'
189+
OCTOPUS_URL: '${{OCTOPUS_URL}}'
190+
OCTOPUS_SERVICE_ACCOUNT_ID: '${{OCTOPUS_SERVICE_ACCOUNT_ID}}'
191+
192+
```
193+
* OIDC configuration for Octopus server
194+
The Octopus server must be configured to support OIDC authentication, as described in [Using OpenID Connect in Octopus with other issuers](https://octopus.com/docs/octopus-rest-api/openid-connect/other-issuers){:target="\_blank"}.
195+
196+
##### Example
197+
Here's an example of a pipeline with the `octopusdeploy-login` step, the `obtain-oidc-id-token` and the `octopusdeploy-run-runbook` steps.
198+
Here, `run-runbook` is configured to authenticate with the `OCTOPUS_ACCESS_TOKEN` instead of the `OCTOPUS_API_KEY`.
199+
200+
```yaml
201+
obtain_id_token:
202+
title: Obtain ID Token
203+
type: obtain-oidc-id-token
204+
stage: "Login"
205+
206+
login:
207+
type: octopusdeploy-login
208+
title: Login
209+
stage: "login"
210+
arguments:
211+
ID_TOKEN: '${{ID_TOKEN}}'
212+
OCTOPUS_URL: "https://example.octopustest.app/"
213+
OCTOPUS_SERVICE_ACCOUNT_ID: <<YOUR_AUDIENCE_VALUE>>
214+
215+
run-runbook:
216+
type: octopusdeploy-run-runbook
217+
arguments:
218+
OCTOPUS_ACCESS_TOKEN: '${{OCTOPUS_ACCESS_TOKEN}}'
219+
OCTOPUS_URL: '${{OCTOPUS_URL}}'
220+
OCTOPUS_SPACE: Spaces 1
221+
PROJECT: Project Name
222+
NAME: Runbook Name
223+
ENVIRONMENTS:
224+
- Development
225+
```
226+
227+
173228
### Deploy a tenanted release
174229

175230
To deploy a tenanted release, use the `octopusdeploy-deploy-release-tenanted` step. Define the tenants to deploy to using either tenants or tenant tags.
176231
For an untenanted release, see [Deploy a release](#deploy-a-release).
177232

178233
Customize the deployment of the tenanted release with prompted variable values, tenants, tenant tags, and guided failure mode. This step returns a json array of created deployments, with properties `DeploymentId` and `ServerTaskId`.
179234

180-
### Run a runbook
235+
### Run a Runbook
236+
237+
To run a Runbook, use the `octopusdeploy-run-runbook` step.
238+
239+
The step requires the name of the Runbook to run, the project and environment name(s). Optional arguments include variables to use within the Runbook, the option to run for specific tenants or tenant tags, as well as the option to use guided failure mode.
181240

182-
To run a runbook, use the `octopusdeploy-run-runbook` step.
183241

184-
The steprequires the nameofthe runbook to run, the projectandenvironment name(s). Optional arguments include variables to use within the runbook, the option to run for specific tenants or tenant tags, as well as the option to use guided failure mode.
242+
The stepreturns a JSON arrayofcreated Runbook runs, with properties `RunbookRunId`and`ServerTaskId`.
185243

186-
The step returns a JSON array of created runbook runs, with properties `RunbookRunId` and `ServerTaskId`.
187244

188245
### Push build information
189246

@@ -217,6 +274,7 @@ This step has no output.
217274
## Related articles
218275
[Steps in pipelines]({{site.baseurl}}/docs/pipelines/steps/)
219276
[Variables in pipelines]({{site.baseurl}}/docs/pipelines/variables/)
277+
[Marketplace:Octopus Deploy Log in](https://codefresh.io/steps/step/octopusdeploy-login){:target="\_blank"}
220278
[Marketplace:Octopus Deploy Create package](https://codefresh.io/steps/step/octopusdeploy-create-package){:target="\_blank"}
221279
[Marketplace:Octopus Deploy Push package](https://codefresh.io/steps/step/octopusdeploy-push-package){:target="\_blank"}
222280
[Marketplace:Octopus Deploy Create release](https://codefresh.io/steps/step/octopusdeploy-create-release){:target="\_blank"}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp