* Adding unit tests and mocks for interface and nested interface using gomock and testify
* Add testify latest verion in go mod
* Added vendor for dependencies
* Added examples with both gomock and testify for interface and embeded interface
* removed testify tests and mocks
* implement new project and starterProject git spec
* fix starter project overriding devfile
- The devfile is first downloaded and parsed in memory
- Starter project is donwloaded into the current directory
- Devfile is saved to the current directory
* perms 0644 for devfile is ok - nosec G306
* fix: not able to create component from local devfile
* fix: allow use of existing devfile
* fix: odo create in a directory with existing devfile
* fix: spinner not ended properly
* create and use ParseFromDataAndValidate
* show warning when someone uses revision
* remove events from parent
Events were removed from parent in Devfile spec.
* remove no longer used variable defaultGithubRef
* update unsuported devfile version message
* go mod tidy
* update vendor (go mod vendor)
* fix tests devfile
* temporary change registry in devfile test spec
* fix: add yaml tags to project git source
* fix: wrongly formated starter project in test devfile
* fix: integration tests
* update registry locations
* delete 2.0.0 types that are no longer used
* remove unused OverideEvents function
* fix: revision warning
* fix: typos
* fix: update GetDefaultSource unit tests
* roll back changes in default devfile registry
* switch to go modules
* update vendor (go mod vendor)
* swithing to go mod: update docs and makefile
* update goget-tools
* use go mod verify to check vendor
* Update goget-tools
- pin goget-tools versions
- update gikgo to 1.14.0
- reset GOFLAGS for goget-tools
- fix ginkgo get for Prow
* go mod: replace github.com/kr/pty with github.com/creack/pty
* update vendor (go mod vendor)
* fix make cross target
-mod=vendor was not used for corss compiling
* debuging timeout issue
* use httpcaching (15min) for registry related requests
* update vendor
* add RegistryCacheTime preference option
* fix preference unit test
* add DownloadFileWithCache function
* address PR review comments
* address PR review comments
* errors related to caching should not be fatal
* cleaner cache logging
* Add dependency on service binding operator
* Add extra dependencies for service binding operator
* Adds support for odo link between component and operator hub service
* Add owner reference for the link
* Deals with inability to install SBO the OLM way on k8s
https://github.com/redhat-developer/service-binding-operator/issues/536
* Adds and removes 'odo link' entry to/from env.yaml
* Makes odo push set appropriate "envFrom" for a podTemplateSpec
* Changes to unit test & those based on PR feedback
* Rebase and "glide update -v"
* Make the linter happy. Remove unused variables
* Fix unit test of envinfo to include 'link' paramter
* Move 'odo link' tests under operator hub tests
* Install SBO on the cluster
* Changes as per PR feedback
* Check for Operator before trying to create a link
* Change error message expected in tests
* Make example less confusing by using less 'example'
* feat: secure registry support
Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>
* test: fix TestDownloadFile test
Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>
* docs: update error message
Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>
* refactor: move credential prefix to util package
Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>
* feat: display and store registry type
Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>
* refactor: remove optional argumetns
Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>
* fix: unit test
Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>
* refactor: add unit test and refactor
Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>
* Add Devfile Parser V2, Update Common Structs (#3188)
* Add Devfile Parser for Version 2.0.0
Added Devfile V2 Go Structures
Added converter for v2 ro common types
Signed-off-by: adisky <adsharma@redhat.com>
* Add example V2 devfile
added example nodejs V2 devfile
* Add Common Types as V2
Add common types as v2
Add Converter from common to v1
* Updated example devfile with group
* Fixes command.go and kubernetes adapter (#3194)
Signed-off-by: mik-dass <mrinald7@gmail.com>
* Fixes utils of k8s adapter (#3195)
* Update Command Logic to use groups (#3196)
* Updates create logic to v2 (#3200)
* Fixes utils of docker docker adapter (#3198)
Signed-off-by: mik-dass <mrinald7@gmail.com>
* Update Docker and Kubernetes adapter to use groups (#3206)
* Update Docker and Kubernetes adapter to use groups
* Update Some Validation
Incorporate some review comments for commands Map
Update Some Validation logic
* Updated Logs for V2 (#3208)
Fixed interface implementation for v2
Updated logs
refactored commands.go
* Avoid String Pointers (#3209)
While converting v1 to v2 types, string pointers are prone to cause
null pointer error. This PR updates struct fields from string
pointers to string
* Update commands check
* Fixes lower and upper case for commands (#3219)
* Fixes type of project and components for devfile v1 (#3228)
* Update testing utils (#3220)
* Update command tests
Updated Command tests to v2
Removed some cases like command type validation, that will be
validated by schema only.
* Fix common adapters tests
All devfile.adapters.common unit tests are fixed
* Add tests for Mismatched type
Fix devfile.adapters.Kubernetes.Component unit tests
* Add TestCase for default command
* Design proposal: Event notification support for build and application status for IDE integration for devfile scenarios (#2550) (#3177)
* Add event notification proposal
[skip ci]
* Update event-notification.md
* Update event-notification.md
* Update event-notification.md
* Update event-notification.md
* Update event-notification.md
* Update event-notification.md
* Update event-notification.md
* Update event-notification.md
* Fix Integration tests for devfile v2 (#3236)
* Fix Integration tests
Correct volume structure
Fix supervisord binary insertion for docker
Insert command and args in build container fr docker
* Fix Integration tests
Revert commands, args removal
Add commands, args in v2 common structs
Fix duplicate volume error
* Fixes unit tests (#3240)
Signed-off-by: mik-dass <mrinald7@gmail.com>
* Add devfiles V2 examples (#3253)
Add devfiles v2 examples for springboot and nodejs
* Fix regression by sparse checkout dir PR (#3258)
fix regression caused by rebase to master.
Also add github, zip as supported project types.
* Address review comments (#3267)
* Address review comments part 2
fix log levels to v4
fix error formatting
add case no's in test cases
update some comments
* Address review comments part 2
Remove validation for group
Co-authored-by: Mrinal Das <mrinald7@gmail.com>
Co-authored-by: Jonathan West <jgwest@users.noreply.github.com>
* url list and describe
Signed-off-by: Stephanie <stephanie.cao@ibm.com>
* fix unit test failure, fix locally deleted url cannot get reflected on container
* add unit test and integration tests
Signed-off-by: Stephanie <stephanie.cao@ibm.com>
* add comments
Signed-off-by: Stephanie <stephanie.cao@ibm.com>
* fix unit test failure
Signed-off-by: Stephanie <stephanie.cao@ibm.com>
* fix unittest failure
Signed-off-by: Stephanie <stephanie.cao@ibm.com>
* use log.info instead of fprintf
Signed-off-by: Stephanie <stephanie.cao@ibm.com>
* fix unittest
Signed-off-by: Stephanie <stephanie.cao@ibm.com>
* fix test failure due to change of intergration test
* fix unit test failure due to api version change
* Add docker delete support
* On container delete, add deletion of projects volume
* Delete volumes only after deleting containers
* Update delete volume tests based on review comments
* Update delete volume tests based on review comments
* Rebase with latest from master
* Rebase with latest from master
* Rebase and update dependencies
* Rebase and update dependencies
* Adding dependencies
* Download project from Devfile
* Cleaning up and commenting
* Add link for unzip function
* Remove old devfile create test
* Convert to log.Error
* Fixing file permissions
* Limit size of zip files
* Fix error handling
* Requested Changes
* Fix wrap error
* Fix delete dir
* Removing component type devfile tests
* Commenting tests due to lack of interactive testing
* Fix expected files in test
* Change dir back to context
* Add go requirement in doc
* Vendor github.com/docker/docker
* Add other dependencies needed for Docker client
* First pass of a docker client in odo
Signed-off-by: John Collier <John.J.Collier@ibm.com>
* More unit tests
Signed-off-by: John Collier <John.J.Collier@ibm.com>
* Remove unneeded sections in fake docker client
Signed-off-by: John Collier <John.J.Collier@ibm.com>
* Remove extra line added
Signed-off-by: John Collier <John.J.Collier@ibm.com>
* Catch error
Signed-off-by: John Collier <John.J.Collier@ibm.com>
* Remove license that was added via copy and paste
Signed-off-by: John Collier <John.J.Collier@ibm.com>
* Address review comments
Signed-off-by: John Collier <John.J.Collier@ibm.com>
* Add dependency on operator-lifecycle-manager (release-4.1)
* Add Operator Hub client to kclient package
* Add function to list installed operators
To be more specific, it lists the `ClusterServiceVersions` in the
cluster. But a `ClusterServiceVersion` is available only when
Operator(s) is/are installed by the cluster admin.
* List the CSVs in the cluster using odo commands
* Add dependency on github.com/golang/groupcache
* Removes futile call to get services from catalog
We're already getting services from the catalog in `Complete` function
and storing it in `o.services`.
* List the Operators only if experimental mode is enabled
* Update CI cluster setup script to setup operators
* Add OperatorHub tests to test-cmd-service
* Integration tests for listing operators
* Remove specific CSV version to let it be automatically selected
* Add test suite for OperatorHub tests to run
* Separate PHONY for OperatorHub tests and run it on 4.x cluster
* Use a CRD's kind instead of DisplayName to make service creation simpler in future
* Set environment variable for experimental mode
* Modify cluster setup to install operators on 4.1
* Execute different steps to setup OperatorHub if running on OCP 4.1
* Fix operator setup script for OCP 4.x
* Changes as per the PR review
https://github.com/openshift/odo/pull/2593#pullrequestreview-363449893
* Added klog dependency through `glide update -v`
* Changes as per the PR review
https://github.com/openshift/odo/pull/2593#pullrequestreview-372480988https://github.com/openshift/odo/pull/2593#pullrequestreview-372484636
* odo delete --all only deletes the config directory if its empty
* better v4 log message
* add a filesystem interface for better testing
* use stat from fs too
* tighter file interface
* add unit tests
* add more comments
* add afero based filesystem in testutils
* capitalize comments
* integrate the filesystem package in the config and its unit tests
- Add missing methods in the testutil's filesystem package
- minor refactoring in the config package
- use of the new filesystem package in the config package's unit tests
* resolve failing unit test
* resolve charlie's comment
* resolve linting error
* lint issue - 2
* add source to the original filesystem package
* resolve empty componentContext when not provided as flag
* Vendoring for go-colorable
* Adds color support for Windows
This fixes the issue of ASCII characters not appearing correctly for
Windows users.
Changes with this PR:
- Odo will detect if Windows is used and use a non-Unicode spinner.
- Odo will also use "X" and "V" to indicate success and unsuccessful on Windows since "✓" is Unicode.
Closes issue: #https://github.com/redhat-developer/odo/issues/1072
* Initial implementation for service create interactive mode.
* Remove unneeded (and troublesome) raw extension unmarshalling.
* Update vendor.
* Isolate interactive mode implementation from command code.
* Unexport functions that don't need to be.
* Rename SelectServiceNameInteractively to EnterServiceNameInteractively.
Add documentation.
* Remove dependency on occlient in ui package.
* Format documentation according to conventions.
* Make todo more specific.
* If title doesn't exist use name instead.
* Actually, always use name and show title as additional info.
* Properly handle interrupts (ctrl-c).
* Improve handling of properties:
- Deal with optional properties
- Check (and ignore) extra provided properties
* Introduce Validator type.
* Improve UI.
* Add basic validation of input.
* Use init function and validators map.
* Initial implementation using survey instead of promptui.
* Update vendor.
* Address code style issues.
* Update glide and vendor.
* Fix improper pointer assignment.
* Proof of concept of promptui-like detail panel.
* Updated for new code organization. Needs lots of improvements.
* Extract ServicePlans creation into NewServicePlans function.
Simplify unmarshalling code.
* Use ServicePlans instead of dealing with info extraction here and remove
option to pass values to EnterServicePropertiesInteractively.
* Rename catalogUI to simply ui.
* Move ui package to where it's used and makes more sense.
* Make service plan parameters sortable by name.
* Make EnterServicePropertiesInteractively more easily testable.
* Extract fake plan details creation functions so that they can be reused.
* Add ui tests but it is currently failing… Update vendor dependencies.
* Disable color output to simplify testing.
* Duplicate survey test infrastructure and adapt ui_test accordingly.
* Remove now unneeded stdio function.
* Make providing value required.
* Only attempt to unmarshal extension if it exists.
* Fix crash if filtered entries resulted in empty pageEntries.
* Restore original template once we're done with the selection.
* Use a more explicit template function name and improve template changes.
* Use defer to restore template and template functions once done.
* Use survey.ComposeValidators and remove chainedValidator.
* Skip the test until we can figure out what is wrong with it.
* Fix improper imports.
* Fix style errors.
* Add documentation to exported functions.
* Rename ServicePlans to ServicePlan (no reason for it to be plural).
* Should error out if the service class is not found.
* Fix link.
* Add documentation.
* Fix missing display and potential panic.
* Service name was improperly validated.
* Remove additional information display as it's causing display issues.
* Update survey to latest version.
* Re-add service class detail since it is now fixed and improve output.
* Work around issue with repeated question when lines wrap in terminal.
* Update to survey 1.8.0.
* Use 1 error code.
* Create a constant for the default number of columns before text wraps.
* Add comments.
* Add comment for golint to pick up.
* Add comment.
* Add documentation to ServiceCreateOptions struct.
* Fix potentially invalid logic.
* Fix improper output (expected vs actual were reversed).
* Extract more common functions to services and add more tests.
* Delete unused function.
* Default to default column number if detected width is 0. Add tests.
* Update vendor information.
* Add more tests.
* Add documentation.
* Added glob support for watch.
Added the package for ** and other support for glob matching.
* Reads .gitignore file to get the ignore rules
Signed-off-by: mik-dass <mrinald7@gmail.com>
* Adds support for reading .odoignore file for getting the ignore rules
A function 'GetIgnoreRulesFromDirectory' is introduced to get the ignore rules from the source directory. If .odoignore is not found, .gitignore will be used. If both files don't exist, empty array would be returned.
* Fixed tests for isRegExpMatch
* Added tests for the GetIgnoreRulesFromDirectory()
Signed-off-by: mik-dass <mrinald7@gmail.com>
* Added more tests and added comments
* Added support for ignoring '#' line i.e comments in .gitignore and .odoignore
Signed-off-by: mik-dass <mrinald7@gmail.com>
* Fixed glob checks for folder
Signed-off-by: mik-dass <mrinald7@gmail.com>
* Fixed debug message and comment in CheckPathExists()
* Change rules appending behaviour and fixed comments
* Modified the return comment for isRegExpMatch
* Modified the comment structure for isGlobExpMatch()
Signed-off-by: mik-dass <mrinald7@gmail.com>
* Modified GetIgnoreRulesFromDirectory() to always include .git rule and modified tests accordingly
* Renamed to glob expressions in flag description
* Initial implementation setting up of smart completion.
* Initial implementation for service delete.
* Initial implementation for service create.
This doesn't work properly because we really need to be able to
distinguish between positional arguments.
* Clean-up.
* Add doc.
* Add doc.
* Refactor completion handler code to make it easier to test. Add tests.
* Update vendor.
* Filtering doesn't occur at the completion handler level at this point.
* Add test for delete completion.
* Update glide and vendor.
* Fix format.
* Fix format.
* Add MPL-2.0 to licenses.
* Revert to 1.1.2 version of complete library due to bug with 1.2.0.
See https://github.com/posener/complete/issues/74
* Fix odo -h.
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.