OCM-AddOns plug-in
Overview
OCM-CLI plugin to be used when working with add-ons.
Installation
Option 1: Install using go install
Execute the following go install
command to build and install the ocm-addons
command at $GOPATH/bin
.
go install github.com/mt-sre/ocm-addons/cmd/ocm-addons@latest
Option 2: Build and install from source
Clone this repository to your local machine.
git clone git@github.com/mt-sre/ocm-addons.git
Run ./mage install
under the repository root to build the plug-in binary and
add it to your $GOPATH/bin
.
If you have not added $GOPATH/bin
to your $PATH
, then you may
alternatively run ./mage build
and manually move the bin/ocm-addons
binary to any other directory in your $PATH
.
Usage
Install the ocm-cli
and ensure that you are able to log in to an active OCM environment.
Run ocm login ...
to establish a login session with your chosen OCM environment.
Once logged in the plug-in can be accessed by running ocm addons
which will
display command information.
Note: the plug-in requires that an ocm.json
file exist which the OCM-CLI
will generate upon login and will remove upon logout. In the current state
$OCM_TOKEN
will be ignored if present in the environment.
Development
Create a fork of this repository and clone that fork to your local machine.
All development tooling can be accessed through mage and simply running
./mage
will list all targets with additional information for each target
available by running ./mage -h [target]
.
Additionally you should install pre-commit to
ensure code quality with every commit. Once installed run pre-commit install
in your local copy of this repository to initialize the pre-commit hooks.
Configuration
Adding New Customer Notifications
See this document for information
regarding the addition of new customer notifications.
Known Issues
No issues have been reported at this time.
License
Apache License 2.0, see LICENSE.