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

release: Add template output options for release info #321

Merged
merged 2 commits into from Feb 26, 2020

Conversation

smarterclayton
Copy link
Contributor

Allow -o template={{...}} and -o jsonpath={...} templates in info so a user can run things like:

oc adm release info -o jsonpath={.image}

and extract things from json without a third party command.

Also, fix where oc adm release info supports a default argument implied by the current cluster. If there is a connection error or generic failure we should print the generic message vs the longer error: "info expects one argument, or a connection to an openshift server" instead of "...: unable to contact server ....: connection refused". Print the error at -v=2 instead.

oc adm release info supports a default argument implied by the
current cluster. If there is a connection error or generic failure
we should print the generic message vs the longer error:

"info expects one argument, or a connection to an openshift server"

instead of "...: unable to contact server ....: connection refused".

Print the error at -v=2 instead.
Allow `-o template={{...}}` and `-o jsonpath={...}` templates in
info so a user can run things like:

  oc adm release info -o jsonpath={.image}

and extract things from json without a third party command.
@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 25, 2020
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 25, 2020
@smarterclayton
Copy link
Contributor Author

/retest

Copy link
Member

@soltysh soltysh left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 26, 2020
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: smarterclayton, soltysh

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [smarterclayton,soltysh]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit f46bfa8 into openshift:master Feb 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants