Commit Graph

1778 Commits

Author SHA1 Message Date
Shubham Minglani
a1bcecd52b Check if user is logged in to the cluster
This commit adds a function that checks if the user is logged
in to the cluster before running the commands.
2018-02-19 16:39:49 +05:30
Shubham Minglani
deab9c433b Check if OpenShift server is running
This commit adds an `IsServerUp()` function which checks if the
endpoint of the server is reachable before firing requests.
2018-02-19 16:39:43 +05:30
Tomas Kral
6eea89e6dc Show emtpy application in 'applications list' output 2018-02-19 09:10:10 +01:00
Tomas Kral
46a8394de2 Allow multiple applications in one OpenShift project
Applications are now grouped using labeles.
'app.kubernetes.io/name' is used for application grouping
'app.kubernetes.io/component-name' is used for component grouping

It is also possible to add additional labels to applications.
Currently there is 'app' label for OpenShift console.
2018-02-19 08:20:59 +01:00
Shubham Minglani
d197cde9b3 Deploy from current directory for component push 2018-02-12 17:05:38 +05:30
Shubham Minglani
84bdf25777 Implement oc storage list 2018-02-08 23:41:45 +05:30
Shubham Minglani
165dfdb011 Implement ocdev storage remove 2018-02-08 23:29:24 +05:30
Shubham Minglani
b76f47576f Rename component create to component add 2018-02-08 22:57:30 +05:30
Shubham Minglani
3af7c53150 Initital implementation of ocdev storage add 2018-02-08 22:47:24 +05:30
Shubham Minglani
452c7146ac Implement ocd component push
This commit implements `ocd component push` which lets the user
push the local or remote changes to the running application in
the OpenShift cluster.
2018-02-07 22:16:47 +05:30
Shubham Minglani
cbc797d919 Fix printing of oc project output in GetProjects
This commit removes the first line being printed at the top of the
output of `oc get project` in GetProjects() function.
2018-02-07 20:55:21 +05:30
Shubham Minglani
5a96d43376 Refactor running commands to avoid false positives
Till now we were getting non zero exit codes in case of running
commands like `ocdev component create nodejs --from-dir=...`
because it logged to STDERR as well as to STDOUT, while the
command still exited successfully.

This commit moves over to checking the exit code for the same
instead of relying on STDERR output.
2018-02-07 18:47:27 +05:30
Shubham Minglani
6c4e9a1c58 Fix flaky test due to map to string operation
This is a very poor fix for the flaky test, but I think this should
work for now. The test was "occasionally" failing because the order
in a map is not maintained, so the conversion to string was failing
at times. This commit fixes that.
2018-02-07 12:12:36 +05:30
Shubham Minglani
f6473ceed0 Refactor component to fix errors
This commit refactors the `ocdev component` parts to better print,
and also fixes the error when `ocdev component get` will not return
an error when no component is set
2018-02-06 21:48:18 +05:30
Shubham Minglani
f2bac3c3e5 Modify application create behavior
This commit moves the setting defaultApplication logic from
pkg/application/application.go to cmd/app.go. Also, pretty prints
the log messages now.
2018-02-06 18:31:42 +05:30
Shubham Minglani
754ca24948 implement ocdev application delete 2018-02-06 12:31:18 +05:30
Shubham Minglani
b04213c71c implement ocdev application list 2018-02-06 12:22:43 +05:30
Shubham Minglani
209435e111 Handle a couple of unhandled errors 2018-02-06 12:06:52 +05:30
Tomas Kral
d668716fc7 Component create and delete (#18)
Implement `oc component`
2018-02-06 12:03:46 +05:30
Tomas Kral
fb126ea50b remove unused reflect from config pkg 2018-02-05 19:10:27 +01:00
Shubham Minglani
b10abbca1d implement ocdev appliction get
This commit introduces the `ocdev application get` command which
returns the current active application.
2018-02-05 17:53:03 +05:30
Shubham Minglani
f7ceac9f6f make applications tied to OpenShift projects
This commit ties one application to one OpenShift project.
2018-02-05 17:46:56 +05:30
Shubham Minglani
3cd28f119c Implement application create
This commit implements "ocdev application create" which creates
an application and binds it to the current project.
2018-02-02 17:34:30 +05:30
Tomas Kral
c621c5a411 Merge pull request #22 from containscafeine/refactor-occlient
Modify occlient structure
2018-02-02 12:50:16 +01:00
Shubham Minglani
91d4d0e9cf Modify occlient structure
This commit modifies occlinet.go file to accept type OcClient as
input. Also adds a utility function to check for the current
project been set by the user.
2018-02-02 15:24:55 +05:30
Shubham Minglani
7fbd7a2bcf Add config package
This commit adds the config package which has all the methods
related to storing and retrieving ocdev configuration from disk.
Also adds some utility functions for the same.
2018-02-02 15:22:23 +05:30
Tomas Kral
366586e89f occlient - look for oc binary automaticaly 2018-02-01 13:58:42 +01:00
Tomas Kral
1b72e27ea7 create pkg/occliet
this is wrapper around oc command
use NewOcClient to create new OcClient instance
2018-01-31 15:10:52 +01:00