11 Commits

Author SHA1 Message Date
Dmitry Ukov
9c69138990 Remove document plugin subcommand
This change finalises shift to new version of kustomize plugins

Change-Id: Ie47f42a9e2c4dc03fc4dca437020ad71a564d894
2020-11-11 14:59:14 +04:00
Ruslan Aliev
d8a6139e81 Add document pull step to gate script runner
Currently we don't test document pull step by rewriting
manifest_directory variable as current source path, which
makes a mess in target_path, manifest_path and related paths
(concatenation of target_path+manifest_path won't return
an existing and proper location). This patch organizes
mentioned variables and enables document pull step which
starts working properly. The latest repo state used as
git source for this command.

Change-Id: I5abce73877441c7529f2f77add79cf410e2226d8
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
2020-09-25 00:39:28 -05:00
Ruslan Aliev
fba618225a Remove AirshipCTLSettings from root level cmd
AirshipCTLSettings will no longer be used by any command, so this
patch removes it from root level.

Change-Id: I2aa1d80ab0785b498af1ac2c86334f9b0d9ff047
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #327
2020-09-03 23:52:49 -05:00
Ruslan Aliev
285aeeba8c Refactor document pull command
This command was refactored for usage with new config factory.
Config object now is being initialized in pkg module on demand,
which provides more flexibility and cleaner code.

Change-Id: Iff75eb66db2fee922e6db1bf2930892c02c3b601
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #327
2020-09-02 23:41:05 -05:00
Ruslan Aliev
f1b606f8bf Fix cmd document pull with help test
Previously it was not executed due to typo.

Change-Id: I91e166ded37e818ae1836cc33295579af068bd53
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
2020-09-02 23:41:05 -05:00
Ruslan Aliev
78364d7d44 Refactor document plugin command
AirshipCTLSettings are not used here, so it was removed.

Change-Id: If4bf64b9991b4ac05898632c79bacbacd7872635
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #327
2020-09-01 10:15:58 -05:00
Dmitry Ukov
6d05ae69ee Implement document rendering sub-command
Kustomize filtering and rendering mechanisms are used.

Related: #14
Related: #15
Related: #16
Relates-To: #247
Closes: #247
Co-authored-by: Ruslan Aliev <raliev@mirantis.com>
Change-Id: Ied06b95577772cc51f51f3ebb3acd441388d5cda
2020-05-22 12:05:44 +04:00
Ian Howell
95a768e366 Increase code coverage
This adds coverage to:

* NewDocumentCommand
* NewBaremetalCommand

Change-Id: I7ece84cd36a4df07dc4c2e7437175484ced9b802
2020-04-28 13:46:06 -05:00
Kostiantyn Kalynovskyi
f34c900ecc Uplift cobra dependency to v0.0.6
This version is required to integrate with clusterctl.
Starting v0.0.6 cobra Execute() method returns ErrSubCommandRequired if
command is executed when its not runnable (Run or RuneE == nil), hence
all tests that invoke such commands need to be either remove or adjusted
to expect these errors

Change-Id: Ia7935c1bf83d47b3a7d3a6c03d1989d53ad57a9a
Relates-To: #187
2020-04-23 10:47:46 -05:00
Yasin, Siraj (SY495P)
c25d223c7b Add copyright for missing files
* added license templates for go, bash & yaml in tools dir
* added a script that will add license information for all
    missing files. Type:  go, yaml, yml, sh
* skip adding license for all files within testdata
* Syntax:
   > ./tools/add_license.sh

* Skip license for manifests folder
* Added one extra line after licene for yaml files
* Added License after Hashbang for bash.
* Add an extra line after hashbang and before license
* Updated the go template to use multiline comments

New Files:
  1. tools/add_license.sh
  2. tools/license_go.txt
  3. tools/license_yaml.txt
  4. tools/license_bash.txt

Change-Id: Ia4da5b261e7cd518d446896b72c810421877472a
Realtes-To:#147
2020-04-09 08:35:59 -05:00
Dmitry Ukov
ff917e5a49 Add render sub-command frame
Render command filters documents and prints them to user-defined
output in a form of multi-document YAML.

Sub-command receives following document filter flags:
 * label
 * annotation
 * apiVersion (a.k.a group-version)
 * kind
 * filter

Related: #16
Change-Id: I7efb0a478e1070efd1791ab10d7c3946c8c28630
2020-02-17 11:27:22 +00:00