Commit Graph

447 Commits

Author SHA1 Message Date
Abhishek
cfcbfa8c6d make default kompose conversion YAML 2017-01-04 12:50:56 +05:30
Suraj Deshmukh
b059c44774 Merge pull request #312 from procrypt/multiple_files
added support for multiple-compose files
2017-01-03 17:45:48 +05:30
Abhishek
a5a3805760 added support for multiple-compose files 2017-01-03 17:18:34 +05:30
Suraj Deshmukh
9c3fdaa48d Merge pull request #206 from rtnpro/buildconfig
Generate buildconfig for Openshift
2016-12-28 21:08:38 +05:30
Ratnadeep Debnath
0d86f3e087 Updated docs for openshift buildconfig feature
- Added buildconfig doc in user guide.
- Add inline code documentation to explain why buildconfig
  object needs to be created after imagestream, because of
  https://github.com/openshift/origin/issues/4518
2016-12-28 19:24:45 +05:30
Ratnadeep Debnath
7c959b65d4 Fixed typos in openshift buildconfig
- spelling mistake
- pass compose file dir instead of compose file to initBuildConfig call
- Use as default value for cli --build-branch option
- Pass current build branch to buildconfig related functions instead of opt.BuildBranch
- Fix printing buildconfig source branch in logs.
2016-12-28 19:23:37 +05:30
Ratnadeep Debnath
4d3347d300 Remove dangling cli dir after rebase. 2016-12-28 17:02:33 +05:30
Ratnadeep Debnath
44f94cc072 Fixes/updates based on review. 2016-12-28 17:02:33 +05:30
Ratnadeep Debnath
d4561c6f51 Updated glide dependencies
Added:
- github.com/openshift/origin/pkg/build/api/install
- github.com/openshift/origin/pkg/build/api/v1
2016-12-28 17:02:33 +05:30
Ratnadeep Debnath
a753f35d42 Added docs for openshift unit tests. 2016-12-28 17:02:33 +05:30
Ratnadeep Debnath
4ead7156f4 Renamed pkg test to testutils. 2016-12-28 17:02:33 +05:30
Ratnadeep Debnath
b62fb02571 Fix openshift buildconfig info logs
based on review.
2016-12-28 17:02:33 +05:30
Ratnadeep Debnath
ec09ca428b Generate openshift imagestream when build is absent. 2016-12-28 17:02:33 +05:30
Ratnadeep Debnath
c8d8cbbba9 Added unittests for openshift buildconfig integration. 2016-12-28 17:02:32 +05:30
Ratnadeep Debnath
f0165d209f In buildconfig, get git's current remote URL instead of current branch's remote. 2016-12-28 17:00:34 +05:30
Ratnadeep Debnath
bbbd4037b4 Update command to fetch current git remote for buildconfig. 2016-12-28 17:00:33 +05:30
Ratnadeep Debnath
a1797a8d07 In buildconfig, detect current branch and it's remote url as defaults. 2016-12-28 17:00:33 +05:30
Ratnadeep Debnath
875c7d95dc Include buildconfigs in kompose deployment. 2016-12-28 17:00:33 +05:30
Ratnadeep Debnath
3b13dae515 Fix govet warning for openshift buildconfig.
Go vet warning was 'composite liternal uses unkeyed fields'.
2016-12-28 17:00:33 +05:30
Ratnadeep Debnath
d8ec3db673 Bugfix in specifying custom build repo for buildconfig. 2016-12-28 17:00:33 +05:30
Ratnadeep Debnath
ba9995c17b Update cmd to get git remote url for backwards compatibility
with older git-2.6.x
2016-12-28 17:00:33 +05:30
Ratnadeep Debnath
eb719f85c2 Fix tests for buildconfig support. 2016-12-28 17:00:33 +05:30
Ratnadeep Debnath
e83b454536 Bugfix: Accept abs path for compose file for buildconfig.
Change directory to compose file dir when resolving git remote.
2016-12-28 17:00:33 +05:30
Ratnadeep Debnath
bea50b1608 Fix tests for buildconfig. 2016-12-28 17:00:33 +05:30
Ratnadeep Debnath
1a7b19c070 Resolve/print buildconfig source repo info globally for compose project. 2016-12-28 17:00:33 +05:30
Ratnadeep Debnath
f5566d4097 Improve error handling and logging for openshift buildconfig creation.
- Error out on failure to create buildconfig, with meaningful error messages, e.g., git missing, error in fetching git remote, error in creating build context, etc.
- Add info log for build repo/branch being used.
2016-12-28 17:00:33 +05:30
Ratnadeep Debnath
6f3e670af1 Refactor openshift buildconfig CLI options.
- Remove --buildconfig, -bc option. Create buildconfig if service has build info
- Rename --branch to --build-branch
- Rename --repo to --build-repo
2016-12-28 17:00:33 +05:30
Ratnadeep Debnath
fa724fe12d Allow specifying repo,branch info for buildconfig over CLI. 2016-12-28 17:00:33 +05:30
Ratnadeep Debnath
a9241e6fe5 Added example for openshift buildconfig. 2016-12-28 17:00:33 +05:30
Ratnadeep Debnath
9e2849addf In Openshift, don't create imagestream tags for a service with build diretive. 2016-12-28 17:00:33 +05:30
Ratnadeep Debnath
6156d144f2 Fix generating project source repo URL in openshift buildconfig. 2016-12-28 17:00:33 +05:30
Ratnadeep Debnath
efc5203d82 Fix creating build context dir relative to project root dir. 2016-12-28 17:00:33 +05:30
Ratnadeep Debnath
f46274be38 In buildconfig, remove trailing newline from project's remote git repu URL. 2016-12-28 17:00:33 +05:30
Ratnadeep Debnath
6d8a6a3fc8 In buildconfig, only set strategy type as Docker
and do not set other details like imagestream to build from, etc.
2016-12-28 17:00:33 +05:30
Ratnadeep Debnath
a2a731f30c Generate context path relative to project root dir in buildconfig. 2016-12-28 17:00:33 +05:30
Ratnadeep Debnath
1215a6366e Updated Godeps and vendors.
Added:
- github.com/openshift/origin/pkg/build/api/install
- github.com/openshift/origin/pkg/build/api/v1
2016-12-28 17:00:32 +05:30
Ratnadeep Debnath
92b6678d1b Initial implementation of BuildConfig support for Openshift provider. 2016-12-28 17:00:32 +05:30
Suraj Deshmukh
c80735c1a5 Merge pull request #350 from containscafeine/stdin_tty
add stdin_open, tty support, add tests, fix #344
2016-12-28 16:18:25 +05:30
Shubham Minglani
6a151c6267 add stdin_open, tty support, add tests, fix #344
This adds supports for stdin_open: bool and
tty: bool support for kubernetes and openshift
providers in kompose. This maps to the
template.Spec.Containers[0].Stdin and
template.Spec.Containers[0].TTY in Kubernets
world.

Also, added tests.

Fixes #344
2016-12-28 15:58:45 +05:30
Suraj Deshmukh
0370d66357 Merge pull request #347 from surajssd/up_down_no_validation_needed
Flag validation called on up and down
2016-12-27 17:55:02 +05:30
Suraj Deshmukh
5625a97833 Flag validation called on up and down
On kompose up and kompose down flag validation
was done which is validating flags that are not there
in kompose up and kompose down
2016-12-27 15:59:07 +05:30
Suraj Deshmukh
73418310ac Merge pull request #304 from cdrage/switch-to-cobra
Switch to spf13/cobra from urfave/cli
2016-12-26 12:34:07 +05:30
Charlie Drage
1fdc1f648e Update vendoring 2016-12-22 09:18:22 -05:00
Charlie Drage
1b9228e696 Switch to spf13/cobra from urfave/cli
There's A LOT happening in this commit, so here's an outline:

First off, urfave/cli has been removed in favour of spf13/cobra. With
this, comes changes to the formatting as well as the help page for
Kompose.

Upon converting, I noticed a CLI flag was NOT appearing for OpenShift.
Specifically, --deploymentconfig. This has been added with a note
that says it is OpenShift only.

Exit codes have been fixed. If the conversion / down / up fails for
any reason, Kompose will exit with Code 1.

--verbose as well as --suppress-warnings can now be set at the
same time.

app_test.go in the cli directory has been moved to pkg/transformer
to better reflect the testing coverage.

version.go has been removed and converted to it's own CLI command in
conjuction with (most) Go software. A new CLI command has been
created. kompose version

--dab isn't a conventional way for short-form CLI paramters. This
has been shortened to -b for bundle.

CLI flags consisting of only two/three letters have been removed due to
it being unconventional for CLI. For example, --dc was removed in preference
for --deploymentconfig

--replicas has been added as an option when using kompose down or
kompose up. This has been added as previously in app.go the
replica amount was hard-coded as 1.

Differentiating names have been used for flags. For example,
persistent flags use the name Global (ex. GlobalOut). Command-specific
flags have their own names (ex. UpOpt).

Closes #239 #253
2016-12-22 08:15:51 -05:00
Suraj Deshmukh
240f150492 Merge pull request #285 from containscafeine/expose_service
expose service to outside, fix #140
2016-12-22 17:13:52 +05:30
Shubham Minglani
7e378cd546 implement expose service, add tests, fix #140
Implements a kompose specific docker compose label "kompose.service.expose" which can be used to expose the specified services externally. The accepted values are of type string.
If the value is set to "true", the provider sets the endpoint automatically, and for any other value, the value is set as the hostname. If multiple ports are defined in a service, the first one is chosen to be the exposed.

Unit tests, functional tests, glide updates and docs have also been added in this commit for the related feature.
2016-12-21 20:00:38 +05:30
Suraj Deshmukh
48e3ba88cd Merge pull request #324 from rtnpro/unsupported-keys-per-provider
Unsupported keys per provider
2016-12-21 19:08:42 +05:30
Suraj Deshmukh
5ddd48ee63 Merge pull request #337 from containscafeine/output_file_dir
implement storing to directory or file, add functional tests
2016-12-21 18:22:45 +05:30
Shubham Minglani
365fe81987 implement storing to dir/file, add tests
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
2016-12-21 18:12:43 +05:30
Tomas Kral
3419ae7fe1 few updates based on review 2016-12-20 16:58:28 +05:30