Giter Site home page Giter Site logo

octopusdeploy / run-runbook-action Goto Github PK

View Code? Open in Web Editor NEW
18.0 17.0 8.0 2.2 MB

| Public | :octocat: GitHub Action to Run a Runbook in Octopus Deploy

Home Page: https://github.com/marketplace/actions/run-runbook-in-octopus-deploy

License: Other

TypeScript 95.28% JavaScript 4.72%
cli deployment octopus-deploy github-actions public

run-runbook-action's Introduction

run-runbook-action

This is a GitHub Action that will run a runbook in Octopus Deploy.

Migration Guide(s)

Please refer to the migration guide if moving between major versions of this action.

Examples

Incorporate the following actions in your workflow to push a package to Octopus Deploy using an API key, a target instance (i.e. server), and a project:

steps:
  - name: Run a runbook in Octopus Deploy ๐Ÿ™
    uses: OctopusDeploy/run-runbook-action@v3
    env:
      OCTOPUS_API_KEY: ${{ secrets.API_KEY  }}
      OCTOPUS_URL: ${{ secrets.SERVER }}
      OCTOPUS_SPACE: 'Outer Space'
    with:
      project: 'Test Project'
      runbook: 'Test Runbook'
      environments: |
        'Dev'
        'Test'

โœ๏ธ Environment Variables

Name Description
OCTOPUS_URL The base URL hosting Octopus Deploy (i.e. https://octopus.example.com). It is strongly recommended that this value retrieved from a GitHub secret.
OCTOPUS_API_KEY The API key used to access Octopus Deploy. It is strongly recommended that this value retrieved from a GitHub secret.
OCTOPUS_SPACE The Name of a space within which this command will be executed.

๐Ÿ“ฅ Inputs

Name Description
project Required. The name of the project associated with this runbook.
runbook Required. The name of the runbook.
environments Required. A list of environments in Octopus Deploy in which to run (i.e. Dev, Test, Prod). Each environment should be added on a new line.
variables A multi-line list of prompted variable values. Format: name:value.
server The instance URL hosting Octopus Deploy (i.e. "https://octopus.example.com/"). The instance URL is required, but you may also use the OCTOPUS_URL environment variable.
api_key The API key used to access Octopus Deploy. An API key is required, but you may also use the OCTOPUS_API_KEY environment variable. It is strongly recommended that this value retrieved from a GitHub secret.
space The name of a space within which this command will be executed. The space name is required, but you may also use the OCTOPUS_SPACE environment variable.

๐Ÿ“ค Outputs

Name Description
server_tasks JSON array of objects containing the Octopus Deploy server tasks Ids (serverTaskId) and environment name (environmentName), and tenant name (tenantName) if the run was for a tenant, for the executions tasks that were queued. Use the await-task-actionto wait for any/all of these tasks.

๐Ÿค Contributions

Contributions are welcome! โค๏ธ Please read our Contributing Guide for information about how to get involved in this project.

run-runbook-action's People

Contributors

benjimac93 avatar benpearce1 avatar borland avatar dependabot[bot] avatar domenicsim1 avatar geofflamrock avatar github-actions[bot] avatar harrisonmeister avatar hnrkndrssn avatar jbristowe avatar renovate-bot avatar slewis74 avatar team-integrations-fnm-bot avatar veochen-octopus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

run-runbook-action's Issues

[BUG] Input Parameter (Variable) Does Not Support Multiple Values

The input parameter, variable specifies a value for a prompted variable in the format, Name:Value. Currently, it does not support multiple values either through a delimited string or a multiline input. This issue proposes the creation of a new parameter, variables that would support this feature. The behaviour of variable would remain unchanged.

Add Job summary to Action

This is to add output and group custom Markdown content on the Actions run summary page. For more info see the Github announcement

This is very useful to:

  • Aggregate and display test results
  • Generate reports
  • Custom output independent of logs

Publish new snapshot

Is your feature request related to a problem? Please describe.
There is not action to Publish new snapshot

Describe the solution you'd like
After pushing packages I would like to Publish a new snapshot with the packages before running the runbook

Describe alternatives you've considered
Had to write our own powershell scripts calling your apis to do this

Additional context
none.

[BUG] JSON Serialization of Prompted Variables

Describe the bug
A bug in the TypeScript API client is preventing serialising prompted variables through to the Executions API as per #139.

Expected behavior
Prompted variables should be serialised as JSON on the wire if provided by the consumer.

Suggested Resolution
Bump the dependency tree to reflect fix in TypeScript API client (see above).

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/codeql-analysis.yml
  • actions/checkout v2
  • github/codeql-action v2
  • github/codeql-action v2
  • github/codeql-action v2
.github/workflows/dist.yml
  • actions/checkout v3
  • actions/setup-node v3
.github/workflows/no-build-required.yml
.github/workflows/release-please.yml
  • google-github-actions/release-please-action v3
  • actions/checkout v3
  • google-github-actions/release-please-action v3
.github/workflows/renovate-pull-request-automation.yml
.github/workflows/test.yml
  • actions/checkout v3
  • actions/setup-node v3
  • mcr.microsoft.com/mssql/server 2019-latest
.github/workflows/update-dependencies.yml
  • actions/checkout v3
  • renovatebot/github-action v39.0.6@0dbf03d3f50da30b8e523f51b628d2743c4934dc
npm
package.json
  • @actions/core 1.10.1
  • @octopusdeploy/api-client 3.2.0
  • @types/jest 29.5.12
  • @types/lodash 4.17.0
  • @types/node 20.12.7
  • @types/tmp 0.2.6
  • @typescript-eslint/eslint-plugin 5.62.0
  • @typescript-eslint/parser 5.62.0
  • @vercel/ncc 0.36.1
  • eslint 8.57.0
  • eslint-plugin-github 4.6.1
  • eslint-plugin-jest 27.9.0
  • jest 29.7.0
  • jest-circus 29.7.0
  • jest-junit 15.0.0
  • js-yaml 4.1.0
  • prettier 2.8.8
  • tmp 0.2.3
  • ts-jest 29.1.2
  • typescript 4.9.5

Add workflow to notify of Dependabot security alerts

We have Dependabot security alerts enabled on this repo, however have found that notifications for these can lost amongst the noise. We'd like to create a specific workflow that runs regularly to send a slack notification to the right channel to alert the team of any pending alerts so they can be actioned.

Support for tenants

Is your feature request related to a problem? Please describe.
We currently can't use this action to deploy runbooks as it does not support tenants

Describe the solution you'd like
Support deploying to tenants

Describe alternatives you've considered
We've have written our own powershell scripts against your api to do this. I would prefer not to have to support our custom code.

Additional context
nope

Replace Octopus CLI with API client

Currently, this action relies upon the Octopus CLI to perform its work. This is non-optimal.

This action should remove its dependency on the Octopus CLI and replace it with a TypeScript/Node.js-based API client.

Add environment variables to replace inputs

We currently are using inputs to collect values that should be done using environment variables. The replacement values are as follows:

Old Input Name Environment Variable Required
api_key OCTOPUS_API_KEY true
host OCTOPUS_HOST true
proxy OCTOPUS_PROXY false
proxy_password OCTOPUS_PROXY_PASSWORD false
proxy_username OCTOPUS_PROXY_USERNAME false
space OCTOPUS_SPACE true

TEST

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Runner OS (if applicable):

Additional context
Add any other context about the problem here.

Review code scanning schedule

We currently have code scanning enabled for this repo using a workflow, it only runs once a month on a schedule though. The default code scanning setup runs once a week, it would be good to review/adjust our schedule here to make sure that it lines up and adjust as necessary.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.