This PS updates cmd related to root, completion, document and
version subcommands. It also updates minor details in other
subcommands.
The description and examples are updated for the airshipctl
commands, which will be inturn used for generating documentation.
Please ignore the .md file changes in this PS. They are added for zuul
gates to pass. Here is the PS with generated documention
files https://review.opendev.org/c/airship/airshipctl/+/789250
Relates-To: #280
Change-Id: I562c15c0d25b2e9731c0eb03854d1d348eb435f2
Now the target path for the default manifest is
$HOME/.airship/default. This is reasonable default
location.
The target path is a mandatory field in the
definition of a manifest. If a user wants
to use her current working directory as a location
the manifests, then it must be properly configured
in the $HOME/.airship/config.
Relates-To: #416
Relates-To: #417
Change-Id: I96601803939df5c7369d1580842dfabeb19aa017
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>
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
This patch refactors some code and adds useful debug/info log output.
Change-Id: I590f6e5c300e5c91443af0a8fdb1073229602a67
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #278
Change 725820 [1] configured airshipctl to fail an airship config file
isn't present. The present change makes an exception to that behavior
for the document plugin subcommand, and moves the plugin loading from
the parent document command into the pull subcommand.
There are multiple reasons we don't want config enforcement in place for plugins:
- If a non-standard config file location is configured via an environment variable,
the plugin won't know about it (since it's invoked separately by kustomize), and it
would look for a potentially non-existant default config file, and fail.
- If a user is using the kustomize cli by hand along with airshipctl plugins
(as opposed to driving the process via airshipctl itself), then they do not
need the config anyway -- the plugin subcommand doesn't actually use it.
Forcing the user to create a config file seems awkward here.
[1]: https://review.opendev.org/#/c/725820/16
Change-Id: Ic1b652efb14439ed2757eb9fb0a86feb8b3ef21c
This commit cleans up the command constructors in an attempt to make the
codebase more uniform and approachable. This includes several refactors:
* Removed the FlagConstants - this makes the help messages and examples
significantly more readable without needed to compile and run
airshipctl
* Long help messages and examples are now constant
* Short, Long, and Examples all begin with a capitol letter
* Flag descriptions begin with a lowercase letter. This matches the flag
description for the builtin "help" flag, making formatting uniform for
all flags
* Removed redundant unit tests on non-leaf commands
This change also updates the documentation for the affected commands.
Change-Id: I8b9dcbfd9846b3deaab06dec17f80643dae78de9
* 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
Adds `airshipctl document pull` command that will check the current
manifest specified by the config and download it to the config specified
target path.
Change-Id: I493564c056225ff1e19f5d1aecb8c187683529ec