This commit adds the `ocdev url create/delete/list` commands which
can be used to add URLs to components.
Underneath, these commands manage OpenShift route objects to
achieve this functionality.
This commit adds support for `ocdev catalog` command which
currently has 2 commands, list and search, to list all the
components and to search for a component.
To achieve this, the service catalog API has been used.
This commit adds github.com/kubernetes-incubator/service-catalog,
version: v0.1.9 and github.com/satori/go.uuid, version: v1.1.0 (
which is required by service-catalog) to the vendor directory.
The standard procedure of adding the dependencies to glide.yaml
and then running `glide update --strip-vendor` was followed.
When a component is created type and path to the source is saved to objects
annotations.
Later when `ocdev push` is called it detects what source was used and
uses the same source for a new build. (If it was a local source, the same dir is pushed to
BuildConfig, if it was built from remote git it starts new BuildConfig
with to rebuild from updated git.)
1. Pushing a separate PR with glide changes for depenedencies
2. The e2e tests are run with `oc cluster up` on travis:
(i) scripts/oc-cluster.sh is used to bring up an Openshift cluster.
(ii) scripts/travis-check-pods.sh is used to check if the router
and docker-register pods are running once the oc cluster is
up.
3. In `.travis.yml`, the e2e tests are run in parallel with the
other tests
Dep doesn't resolve specific versions of transitive dependecies.
This can make problems with some projects.
For example kubernetes/client-go doesn't not support dep currently.
This commit prompts the user before deleting the application when
`ocdev application delete name` command is run.
Also, a "--force/-f" flag has been introduced which skips this
prompt if set.
This fixes bug where default application was created when listing apps or
just getting the current app.
- If `ocdev app` is run and there are no applications, a message is shown
informing user about this fact. Previously it showed that default application is active.
- When `ocdev create ...` is run and there are no application, default
the application is automatically created and used.
This commit adds an initialize() function to the package occlient,
which does the initializations required for the package like
checking if the server is up, the user is logged in, and most
importantly sets the path for oc binary for the entire package to
use.
This is a significant improvement in performance because before
this commit, this logic was a part of the `runOcCommand()`, which
means that every time any part of code called this function, the
`oc` binary was found again in the $PATH and connection to the
server and user being logged in was always checked.
This also reduces the logging output by a lot, which now looks
pretty concise like the following.
```console
$ ocdev application list -v
DEBU[0000] running oc command with arguments: /usr/bin/oc project
DEBU[0000] running oc command with arguments: /usr/bin/oc project -q
DEBU[0000] running oc command with arguments: /usr/bin/oc get all
--selector app.kubernetes.io/name --namespace myproject -o
go-template={{range .items}}{{range $key, $value :=
.metadata.labels}}{{if eq $key "app.kubernetes.io/name"}}
{{$value}},{{end}}{{end}}{{end}}
ACTIVE NAME
hasd
asdas
* nodeapp
DEBU[0000] Could not get the latest release information in time. Never mind, exiting gracefully :)
```