3719 Commits

Author SHA1 Message Date
Suraj Narwade
0e7240f41d Fixed getting started guide
replacing `--dir` with `--local`, since `--dir` is invalid now
2018-03-27 16:21:21 +05:30
Suraj Narwade
22756bcaae Fixed newline issue in ocdev project get
Fixed issue #269
2018-03-27 15:44:11 +05:30
Tomas Kral
7a5083356e Merge pull request #268 from ashetty1/tests2
Adding tests for `project create`, `component list`
2018-03-27 11:43:04 +02:00
Anush Shetty
b441f0f7bf Adding tests for project create, component list 2018-03-26 23:49:57 +05:30
Shubham
b4b1f977df Merge pull request #252 from containscafeine/add-url-story
Add `ocdev url` command
2018-03-26 17:09:20 +05:30
Shubham Minglani
011a805eb7 Add ocdev url command
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.
2018-03-26 16:27:07 +05:30
Tomas Kral
c95f488f4e Merge pull request #243 from containscafeine/catalog-search
Add ocdev catalog command
2018-03-26 12:42:52 +02:00
Shubham
d0c8d048b1 Merge pull request #247 from kadel/rename-dir-to-local
Rename --dir flag to --local and add help messages for component commands.
2018-03-26 16:09:39 +05:30
Shubham Minglani
024c7a2b17 Add ocdev catalog list, ocdev catalog search
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.
2018-03-26 15:52:45 +05:30
Tomas Kral
80e85c5732 Rename --dir flag to --local and add help messages. 2018-03-26 12:20:06 +02:00
Shubham Minglani
e74e858bc1 Add service-catalog to vendor/
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.
2018-03-26 15:25:36 +05:30
Shubham
a429d11c38 Merge pull request #246 from kadel/smart-push
Make push smart
2018-03-26 15:24:38 +05:30
Tomas Kral
3bc4aeb768 Merge pull request #237 from containscafeine/prompt-component-delete
Prompt before deleting component
2018-03-22 13:44:47 +01:00
Shubham Minglani
40dadbb18d Prompt before deleting component
The user will be prompted before deletion of a component, unless
overriden using --force/-f.

Fixes #200
2018-03-22 17:36:00 +05:30
Tomas Kral
2684b14d86 Merge pull request #248 from mik-dass/list_app_fix
Fix of the app list command
2018-03-22 11:24:13 +01:00
mdas
3b0d5d85f3 Fix of the app list command 2018-03-22 15:32:29 +05:30
Tomas Kral
72207aa98b Merge pull request #239 from mik-dass/project_get
Added the ocdev project get command
2018-03-22 09:50:23 +01:00
mdas
09ab5fc660 Added the ocdev project get command
Signed-off-by: mdas <mrinald7@gmail.com>
2018-03-22 12:57:43 +05:30
Tomas Kral
935c85ce09 Merge pull request #242 from ashetty1/e2e_tests_travis
OCDEV e2e tests on travis:
2018-03-22 07:47:37 +01:00
Anush Shetty
69d7cac992 Minor fixes 2018-03-21 23:50:08 +05:30
Tomas Kral
6324787dff Make push smart
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.)
2018-03-21 16:29:00 +01:00
Tomas Kral
1fb4059a2b Merge pull request #245 from containscafeine/refactor-occlient-initialization
Refactor to add initialization to occlient
2018-03-21 14:38:12 +01:00
Shubham Minglani
e296c3495f Refactor to add initialization to occlient
This commit refactors the code to add a New() function to the
occlient package, and then modifies function signatures to take
client as a parameter.
2018-03-21 18:04:37 +05:30
Anush Shetty
6ff2d4680e Add dependencies for e2e tests 2018-03-21 14:40:00 +05:30
Anush Shetty
9c51e36f58 OCDEV e2e tests on travis:
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
2018-03-21 14:15:51 +05:30
Shubham
00f5c03e83 Merge pull request #241 from kadel/use-client-go
Use client go
2018-03-20 17:24:09 +05:30
Tomas Kral
aab6e804d7 add openshift/client-go to vendor 2018-03-19 17:03:58 +01:00
Tomas Kral
59a372c952 Use openshift/client-go for NewAppS2I and StartBuild 2018-03-19 17:03:52 +01:00
Shubham
679cfa79f5 Merge pull request #240 from kadel/switch-from-dep-to-glide
Switch from dep to glide
2018-03-19 17:55:48 +05:30
Shubham
b5ac2d486d Merge pull request #236 from kadel/decouple-create-and-set
decouple Create and SetCurrent for app and component
2018-03-19 16:44:07 +05:30
Tomas Kral
7e7f0deec6 decouple Creating and SetCurrent in app and component 2018-03-19 11:08:32 +01:00
Shubham
1a2c976163 Merge pull request #225 from kadel/component-list
implement 'ocdev component list'
2018-03-19 12:31:49 +05:30
Tomas Kral
2ba1fe6c41 update vendor with glide 2018-03-16 15:05:37 +01:00
Tomas Kral
17b88a4f73 Switch from dep to glide.
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.
2018-03-16 15:02:04 +01:00
Shubham
d54a26449f Merge pull request #181 from kadel/bump-version
add bump-version.sh script and update contributing.md
2018-03-14 22:06:13 +05:30
Tomas Kral
809eda2246 Merge pull request #235 from containscafeine/confirm-application-delete
Confirm before deleting application
2018-03-14 13:50:17 +01:00
Shubham Minglani
3bfc43bcf4 Confirm before deleting application
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.
2018-03-14 14:55:44 +05:30
Tomas Kral
82db8c2eaa Merge pull request #233 from containscafeine/add-missing-break
add missing break statement
2018-03-13 12:23:39 +01:00
Tomas Kral
0314bea7ac Merge pull request #234 from containscafeine/update-cli-structure
Update CLI structure in README.md
2018-03-13 12:22:48 +01:00
Shubham Minglani
e5b26840b3 Update CLI structure in README.md
This commit updates the outdated CLI structure in README.md with
the current structure generated using `make generate-cli-docs`.
2018-03-13 15:54:53 +05:30
Shubham Minglani
5d763a23db add missing break statement 2018-03-13 15:48:33 +05:30
Tomas Kral
633e6ccffd Merge pull request #215 from kadel/fix-app-get
fix application list and get
2018-03-13 09:53:48 +01:00
Tomas Kral
676c73ba43 implement 'ocdev component list' 2018-03-13 09:50:58 +01:00
Tomas Kral
d07aef313e fix application list and get
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.
2018-03-13 09:45:48 +01:00
Shubham
dc4530a1eb Merge pull request #224 from kadel/use-current-pwd-for-create
change `ocdev create` (`ocdev component create`) behaviour
2018-03-13 13:55:05 +05:30
Tomas Kral
8a3cb97c91 Merge pull request #187 from containscafeine/add-occlient-init
Add init() to package occlient
2018-03-12 10:12:11 +01:00
Shubham Minglani
b2b3c182c3 Add initialize() to package occlient
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 :)
```
2018-03-09 17:50:33 +05:30
Shubham
d4cda6e9db Merge pull request #223 from kadel/fix-isLoggedIn
if 'oc whoami' retruns error assume that user is not logged in
2018-03-09 17:16:24 +05:30
Tomas Kral
4e181edb10 change ocdev create (ocdev component create) behaviour
default behaviour for `ocdev create <type>` is the same as running
`ocdev create <type> --dir ./`
2018-03-09 12:36:48 +01:00
Tomas Kral
921a722500 if 'oc whoami' retruns error assume that user is not logged in 2018-03-09 12:26:49 +01:00