Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional fields to json output when listing workers #287

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

hnrkndrssn
Copy link
Contributor

@hnrkndrssn hnrkndrssn commented Oct 31, 2023

I missed adding URI, Tentacle version, SSH runtime architecture, Account and Proxy details to the JSON output when listing workers in #284.

This PR adds these additional fields.

Listening Worker

octopus worker list --space Default --output-format json | jq '.[] | select(.Name == "WorkerL0")'
{
  "Id": "Workers-1",
  "Name": "WorkerL0",
  "Type": "TentaclePassive",
  "HealthStatus": "Healthy",
  "StatusSummary": "Octopus was able to successfully establish a connection with this machine on Tuesday, 31 October 2023 12:06:43 pm +10:00",
  "WorkerPools": [
    {
      "Id": "WorkerPools-1",
      "Name": "Default Worker Pool"
    }
  ],
  "URI": "https://localhost:10000/",
  "Version": "0.0.0-local",
  "Proxy": "None"
}

SSH Worker

octopus worker list --space Default --output-format json | jq '.[] | select(.Name == "SshWorker")'
{
  "Id": "Workers-21",
  "Name": "SshWorker",
  "Type": "Ssh",
  "HealthStatus": "Healthy",
  "StatusSummary": "Octopus was able to successfully establish a connection with this machine on Tuesday, 31 October 2023 3:33:06 pm +10:00",
  "WorkerPools": [
    {
      "Id": "WorkerPools-1",
      "Name": "Default Worker Pool"
    }
  ],
  "URI": "ssh://localhost:22/",
  "Runtime": "linux-x64",
  "Account": {
    "Id": "Accounts-101",
    "Name": "Local Worker"
  },
  "Proxy": "None"

When running octopus worker view we include a web URL for the worker, I have not included that as part of JSON output.

[sc-63235]

@hnrkndrssn hnrkndrssn requested a review from a team October 31, 2023 06:06
@hnrkndrssn hnrkndrssn self-assigned this Oct 31, 2023
@shortcut-integration
Copy link

Copy link
Contributor

@benPearce1 benPearce1 left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks

@hnrkndrssn hnrkndrssn merged commit dc2b5c6 into main Oct 31, 2023
4 checks passed
@hnrkndrssn hnrkndrssn deleted the henrik/fix/workerdetails branch October 31, 2023 06:47
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.

None yet

2 participants