Updated `sirupsen`, `docker/cli`, `docker/libcompose` in `glide`,
Also changed `Sirupsen` with `sirupsen` in all kompose packages as well as in
`docker/distribution` packages
Moves the version information to a seperate file. This is mostly due to
import cycle errors occuring when using "import
github.com/kubernetes/kompose/cmd" in order to get the global variable
of VERSION and GITCOMMIT.
Update's the Makefile and other files accordingly.
If the version and commmit is unretriveable due to not being able to
find the kompose binary, the one from pkg/version/version.go will be
used.
This command will add `kompose command` used to generate artifacts as well as `kompose version`,
for ex,
```
metadata:
annotations:
kompose.cmd: kompose convert -f /home/snarwade --stdout
kompose.version: 1.0.0 (HEAD)
```
For functional test, Now each test has template like,
```
"annotations": {
"kompose.cmd": "%CMD%",
"kompose.version": "%VERSION%"
```
Because, for every machine these values will be different.
Updated functional test with new annotations
This adds support for building and pushing docker containers
when you perform either `kompose convert` or `kompose up`.
Docker Compose files who have build parameters with their respective
image and build keys will automatically be both built and pushed.
Adds the provider name to the file output. For example:
```sh
INFO OpenShift file "frontend-service.yaml" created
INFO OpenShift file "redis-master-service.yaml" created
INFO OpenShift file "redis-slave-service.yaml" created
INFO OpenShift file "frontend-deploymentconfig.yaml" created
INFO OpenShift file "frontend-imagestream.yaml" created
INFO OpenShift file "redis-master-deploymentconfig.yaml" created
INFO OpenShift file "redis-master-imagestream.yaml" created
INFO OpenShift file "redis-slave-deploymentconfig.yaml" created
INFO OpenShift file "redis-slave-imagestream.yaml" created
```
This PR uses the "SelectorFromSet()" function which takes alabel or
selector as an argument returns all the object that uses that label or
selector. Once we get the object that uses a particular label we can
further do the delete operation on them. This is similar to "kubectl
delete <object> --selector=<key>=<value>". Also the label has been
modified from service to io.kompose.service.
This commit refactors the code to remove more or less
all occurences of logrus.Fatalf() from the code under
pkg/ except for app.go where all the errors are being
handled currently.
This is being done since random logrus.Fatalf() calls
all around the code was making handling the errors,
unit testing and troubleshooting a bit more painful.
logrus.Fatalf() calls are either replaced by
return errors.New("new error")
or
return errors.Wrap(err, "annonate error")
calls, and the function signatures are accordingly
changed to accomodate the new return values.
The unit tests which previously used to check
if logrus.Fatalf() calls worked fine have also
been fixed to only check for errors now.
Fixes#416
When kompose convert -o artifacts is run, then if artifacts is a directory,
kompose stores all the resulting files inside it, and if it's not a directory,
it stores the artifacts in a single file.
Fixes#209