Bug 1538969 - [APB] The apb tool should support display version info
Summary: [APB] The apb tool should support display version info
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Service Broker
Version: 3.9.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.9.0
Assignee: Dylan Murray
QA Contact: Jian Zhang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-26 09:48 UTC by Jian Zhang
Modified: 2018-03-28 14:23 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2018-03-28 14:23:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0489 0 None None None 2018-03-28 14:23:35 UTC

Comment 1 Dylan Murray 2018-01-30 16:44:27 UTC
Need to update the build scripts to set the version as a global veriable to do this properly. Will have a PR tomorrow printing this out once I get acclimated to the build process.

Comment 2 Dylan Murray 2018-01-31 15:50:35 UTC
https://github.com/ansibleplaybookbundle/ansible-playbook-bundle/pull/219

Didn't have to mess with the build scripts to get this working thankfully.

You can now do `apb version` and it will print out the current version.

Comment 4 Jian Zhang 2018-02-05 02:03:47 UTC
1, RPM installation:
[root@localhost jzhang]# rpm -qa|grep apb
apb-1.1.7-1.20180202175805.el7.centos.noarch
[root@localhost jzhang]# apb --help
usage: apb [-h] [--debug] [--project BASE_PATH]
           {relist,run,help,test,prepare,setup,bootstrap,list,remove,init,version,build,push,serviceinstance}
           ...

APB tooling for assisting in building and packaging APBs.

optional arguments:
  -h, --help            show this help message and exit
  --debug               Enable debug output
  --project BASE_PATH, -p BASE_PATH
                        Specify a path to your project. Defaults to CWD.

subcommand:
  {relist,run,help,test,prepare,setup,bootstrap,list,remove,init,version,build,push,serviceinstance}
    relist              Relist the APBs available within the Service Catalog
    run                 Run APB
    help                Display this help message
    test                Test the APB
    prepare             Prepare an ansible-container project for APB packaging
    setup               Initialize OpenShift with APB development environment
    bootstrap           Tell Ansible Service Broker to reload APBs from the
                        container repository
    list                List APBs from the target Ansible Service Broker
    remove              Remove APBs from the target Ansible Service Broker
    init                Initialize the directory for APB development
    version             Get current version of APB tool
    build               Build and package APB container
    push                Push local APB spec to an Ansible Service Broker
    serviceinstance     Create a ServiceInstance template based on apb.yaml

[root@localhost jzhang]# apb version
Version: apb-1.1.7

2, Running apb from a container:
[root@host-172-16-120-78 ~]# apb --help
groupadd: GID '0' already exists
usermod: group 'apb' does not exist
usage: apb [-h] [--debug] [--project BASE_PATH]
           
           {relist,run,help,test,prepare,setup,bootstrap,list,remove,init,version,build,push,serviceinstance}
           ...

APB tooling for assisting in building and packaging APBs.

optional arguments:
  -h, --help            show this help message and exit
  --debug               Enable debug output
  --project BASE_PATH, -p BASE_PATH
                        Specify a path to your project. Defaults to CWD.

subcommand:
  {relist,run,help,test,prepare,setup,bootstrap,list,remove,init,version,build,push,serviceinstance}
    relist              Relist the APBs available within the Service Catalog
    run                 Run APB
    help                Display this help message
    test                Test the APB
    prepare             Prepare an ansible-container project for APB packaging
    setup               Initialize OpenShift with APB development environment
    bootstrap           Tell Ansible Service Broker to reload APBs from the
                        container repository
    list                List APBs from the target Ansible Service Broker
    remove              Remove APBs from the target Ansible Service Broker
    init                Initialize the directory for APB development
    version             Get current version of APB tool
    build               Build and package APB container
    push                Push local APB spec to an Ansible Service Broker
    serviceinstance     Create a ServiceInstance template based on apb.yaml

[root@host-172-16-120-78 ~]# apb version
groupadd: GID '0' already exists
usermod: group 'apb' does not exist
Version: apb-1.1.7

The subcomamnd "version" works well! LGTM.

Comment 7 errata-xmlrpc 2018-03-28 14:23:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0489


Note You need to log in before you can comment on or make changes to this bug.