Code Monkey home page Code Monkey logo

install-octopus-cli-action's Introduction

install-octopus-cli-action

This is a GitHub Action to install the new Octopus CLI (octopus) on runners and self-hosted environments. Once installed, the Octopus CLI may be used to issue commands to Octopus Deploy. Subsequent actions may use the Octopus CLI, which is cached and available via PATH.

What is the Octopus CLI?

The Octopus CLI is a command line tool that builds on top of the Octopus REST API. It enables you to package applications for deployment and manage your environments, deployments, channels, projects, and workers in Octopus Deploy.

Features

  • Download, install, and cache Octopus CLI to be used in workflows
  • Supports SemVer-based version numbers with wildcards (i.e. 0.8.*) but not ranges

Migration Guide(s)

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

Examples

To install the latest version (i.e. * or latest) of the Octopus CLI:

- name: Install Octopus CLI ๐Ÿ™
  uses: OctopusDeploy/install-octopus-cli-action@v3
  with:
    version: '*'

To install a specific version of the Octopus CLI:

- name: Install Octopus CLI ๐Ÿ™
  uses: OctopusDeploy/install-octopus-cli-action@v3
  with:
    version: 0.8.0

Here's an example of invoking the account list command after installing the Octopus CLI:

- name: Install Octopus CLI ๐Ÿ™
  uses: OctopusDeploy/install-octopus-cli-action@v3
  with:
    version: 0.8.0
- name: list-octopusdeploy-accounts
  env:
    OCTOPUS_API_KEY: ${{ secrets.apiKey }}
    OCTOPUS_URL: ${{ secrets.serverURL }}
    OCTOPUS_SPACE: 'Outer Space'
  run: >
    octopus account list

๐Ÿ“ฅ Inputs

The following input is optional:

Name Description Default
version The release version number of the Octopus CLI to download and install (e.g. 0.8.0). * (latest)

๐Ÿค Contributions

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

install-octopus-cli-action's People

Contributors

adminturneddevops avatar benjimac93 avatar benpearce1 avatar dependabot[bot] avatar domenicsim1 avatar geofflamrock avatar github-actions[bot] avatar hnrkndrssn avatar isaaccalligeros95 avatar jbristowe avatar matt-richardson avatar octobob avatar renovate-bot avatar slewis74 avatar team-integrations-fnm-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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

install-octopus-cli-action's Issues

Install action is not getting latest cli version

Describe the bug
Using v1.1.10 of this action, passing latest into the version input is still getting v7.4.3663 of the cli.
Latest seems to be v9.0.0 per octopus.com/downloads

To Reproduce
Use the following:

      - name: Install Octopus CLI
        uses: OctopusDeploy/[email protected]
        with:
          version: latest

Expected behavior
Version 9.0.0 should be downloaded, installed, and used

Screenshots

image

Additional context
This is running on a self-hosted Windows Server 2019 machine.
Looks like there is a .json file living at https://download.octopusdeploy.com/octopus-tools/latest.json that is still referencing v7.4.3663

I'm not sure where that file is located or I would see about making a PR to update it.

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
.github/workflows/update-dependencies.yml
  • actions/checkout v3
  • renovatebot/github-action v39.2.4@f9c81dddc9b589e4e6ae0326d1e36f6bc415d230
npm
package.json
  • @actions/core 1.10.1
  • @actions/http-client 2.0.1
  • @actions/tool-cache 2.0.1
  • uuid 9.0.1
  • @types/jest 29.5.12
  • @types/node 20.12.7
  • @types/semver 7.5.8
  • @types/tmp 0.2.6
  • @types/uuid 9.0.8
  • @typescript-eslint/eslint-plugin 5.62.0
  • @typescript-eslint/parser 5.62.0
  • @vercel/ncc 0.36.1
  • eslint 8.57.0
  • 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

Install octopus CLI action fails on a self-hosted windows runner

Hi, I'm using the latest Octopus step (1.1.9) and I'm getting the error:

Cannot convert argument "entryNameEncoding", with value: "True", for "ExtractToDirectory" to type "System.Text.Encoding": "Cannot convert value "True" to type "System.Text.Encoding". Error: "Invalid cast from 'System.Boolean' to 'System.Text.Encoding'.""

Error: Error: The process 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' failed with exit code 1

To Reproduce

Use the following:

  - name: Install Octopus CLI
    uses: OctopusDeploy/[email protected]
    with:
      version: latest

We are using a self-hosted runner, sadly on Window server 2012 R2

Screenshots

image

Octopus CLI breaks in Github Actions, seemingly because https://raw.githubusercontent.com/OctopusDeploy/cli/main/releases.json doesn't contain a version field (anymore?)

Describe the bug
Octopus CLI is not able to install in GHA.

To Reproduce
Steps to reproduce the behavior:
Try to install octopus cli in GHA.

Expected behavior
It should install.

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows
  • Browser Edge

Additional context
I think the problem is at: https://github.com/OctopusDeploy/install-octopus-cli-action/blob/main/src/octopus-cli.ts#L60 where the file is downloaded and parsed. It looks like a version field is expected which seems to be missing from the file.

Use oc.to Service for Domain Queries

Our new short-link service (using short.io) under the https://oc.to/ domain (rather than g.octopushq.com) should go-live by May EOM. We need to switch over this once it's available.

  • ensure to use the NuGet package feed; not the JSON feed that we publish

Failed to install Octopus CLI

Describe the bug
Failed to install latest Octopus CLI

To Reproduce
Workflow

      - name: Install Octopus CLI
        uses: OctopusDeploy/[email protected]
        with:
          version: latest

Fails to execute with the following error:
Expand-Archive : is not a supported archive file format. .zip is the only supported archive file format.

Expected behavior
Installation of Octopus CLI should be successful

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows self-hosted runner

Update readme for converting to 3.x

I have spent quite a bit of time via trial and error to update to this new version.

For example:

  • command is no longer 'octo' but is now 'octopus'
  • command pack is no longer even an option?

It appears this is no really 'ready' as there are no docs on the new GO CLI and no docs on converting. I think this should have been released as a beta or something.

For now, I have rolled back to the 1.x versions to get it to work. Please advise on the desired path users should go.

Failed to Install Octopus CLI : Octopus CLI version not found: 1.7.1

Describe the bug
getting error message: Octopus CLI version not found: 1.7.1 when running install octopus CLI action on self-hosted linux runner

To Reproduce
Use the install octopus CLI action in a github action

Expected behavior
The latest Octopus CLI should install

Screenshots
image

Additional context
Self hosted Linux Runner

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.

Install octopus CLI action fails on a self-hosted windows runner

Describe the bug
Related to #139.

I'm using the latest Octopus step (1.1.8) and I'm still getting the error:

Expand-Archive : is not a supported archive file format. .zip is the only supported archive file format.

To Reproduce
Use the following:

      - name: Install Octopus CLI
        uses: OctopusDeploy/[email protected]
        with:
          version: latest

Expected behavior
Installation of Octopus CLI should be successful

Screenshots

image

Powershell Version:

5.1.17763.2268

API rate limit exceeded

Describe the bug
When using this action often, we intermittently get an error message about API throttling. We are not using this maliciously at all and the rate at which we build should be within the API limits.

Error: HttpClientError: API rate limit exceeded for #.#.#.#. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)

To Reproduce
Steps to reproduce the behavior:

  1. Use action enough to hit limit (not sure how often that is)

Expected behavior
I expect that the API call will not be rate limited.

Screenshots
image

Additional context
While looking through the code for the action it looks like it uses the github api to get the latest release. I don't see how it's sending any authentication which, according to the error message, may increase the api limits.

https://github.com/OctopusDeploy/install-octopus-cli-action/blob/main/src/octopus-cli.ts

18  const releasesUrl = `https://api.github.com/repos/OctopusDeploy/cli/releases
...
59  const releasesResponse = (await http.getJson<GitHubRelease[]>(releasesUrl)).result

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.