This adds an env var-driven configuration for the filesystem path
in which kustomize should expect its plugins (including airshipctl)
to be. The value defaults to a subfolder off the `.airshipit` folder.
The config is persisted as a singleton rather than a member of
AirshipCTLSettings (or the Config) because
1. the settings object would have had to have been passed around
a couple dozen additional files/functions,
2. it's reasonable to expect the plugin location to be consistent
across threads in a multi-threaded, airshipctl-as-library context.
Settings_test.go was moved in to an environment_test package to avoid
a circular import dependency.
Change-Id: Icdd21bd3687ef42492e388af982d7b490af3eff3
* invoke EnsureComplete before document pull to make sure
all expected sections (cluster, context, authinfo, currentcontext)
of config are present
Change-Id: If2ef4611cddc6ae96797dc26675551ef81ca8768
Closes: #215
`airshipctl config init` command, generates default Airshipctl config
with mutually exclusive checkout options.
This CR fixing config generation by setting the only branch.
The `commitHash` and `tag` remain empty as an example in config file..
Change-Id: I12ec9b713e8f6769ddbd5301e000ab0242ea8ff4
Closes: #233
This change creates a tool that generates CLI documentation each time
`make update-golden` is executed.
Change-Id: I4bcdf299cd424f4cff1ecf6503822d304e9a3947
Signed-off-by: Drew Walters <andrew.walters@att.com>
Initial schema is created during container building by rpm scripts.
Since db file path has changed we need to create schema explicitly
Change-Id: I13ef02fac31ad8ca01549efa5b44394bbd8016e1
Problems description:
Once we execute airshipctl config init, the default config in
~/.airship/config doesn't contain default values for:
currentContext: ~
clusters:
default:
clusterType:
target:
bootstrapInfo: ~
managementConfiguration: ~
---
This PS set default values for Airshipctl config to use it
out of the box.
Closes: #234
Change-Id: I57449e678f19ab1c0e2212c38b01ea195f62aa44
Ironic uses SQLite as database. SQLite does not support ALTER which is used
in alembic migration.
Change-Id: I3495f7eae9a9e22175052005314e82ab280bfdf2
Closes: #235
The ReplacementTransformer already checks for the error condition where
a replacement source doesn't match any of the input documents.
This change adds similar error handling for missing replacement
target documents, and tweaks the naming/messages to make it clear
which situation is encountered.
This will make it easier for manifest engineers to catch typos
in their RT rules, or documents that have failed to be kustomized in
or authored.
Change-Id: I0efbcfbc2952afae05e48b9ff8e0b3c67df7e7df
* Moving update-github-issues from post pipeline to
promote pipeline
* post pipeline config has a modified trigger to use updated refset.
Due to this the ref-url is opendev instead of review.opendev
* When job is triggered using ref from opendev the zuul.message is not available.
Even if we make zuul.message available for post jobs, it does not make sense to
read the commit message from a merge commit.
Change-Id: I5b4385e3d784f8b6bd514450eb05db273f68a083
Relates-To: #196
A change [0] recently merged that makes additional remote parameters
configurable; however, it changed the default wait value to two seconds
and made the wait value a duration in time between two nanoseconds.
This change restores the default wait value of thirty seconds and makes
the wait value representative of seconds again.
[0] https://review.opendev.org/717812
Change-Id: I9fad30d479419efe95fca7dc78154bfc3ca66697
Signed-off-by: Drew Walters <andrew.walters@att.com>
This explicitly writes errors to stderr, for the benefit of the
document plugin subcommand. This is needed so that errors are displayed
to end users of kustomize, and can be used to debug manifest issues.
When sent to stdout, the error message gets swallowed/hidden by kustomize.
Change-Id: I49b668e5e71fbe4662fe3aec7bad4ebccadebd64
This change updates the stale README and makes it the landing page of
our new documentation. This change also makes several formatting changes
to make our documentation fit the new docs.airshipit.org framework.
Lastly, some items from the original README have been updated for
accuracy and moved to a separate page of the documentation.
Change-Id: Iae898b36034640df4d35a430eb28fbda028f10dd
Signed-off-by: Drew Walters <andrew.walters@att.com>
There are several commands which do not require to load config:
completion, help, secret, version. Hovewer, PersistentPreRun call
at root level forces airshipctl to load config anyway. Therefore,
we can observe unnecessary config load errors instead of actual result.
This patch moves config load to subcommand level where it is necessary.
Change-Id: I774a7d038c408e71688f7bf04f1cb87a2132a342
By specifying any other branch rather than master in airshipctl config,
`airshipctl document pull` command failing with `reference not found`
error.
The resulted target dir, after execution, still pointing to master.
The idea of this change is to use checkout options during the clone
stage, so we will be clonning the specific branch.
Added debug log about cloning default(master) branch in case of
missing checkout options.
Enabled validation for incompatible parameters in checkout options.
Aligned unit tests with code changes.
Closes: #197
Change-Id: I50ac18289a8f02997d5b90c82f1688083cff8bf3
This commit changes airshipctl-publish-images role to upload images
to quay.io
Closes: #217
Change-Id: I67b3e07ddc170da6df7c34dce929356449863c10
Signed-off-by: Sreejith Punnapuzha <sreejith.punnapuzha@outlook.com>
Changed systemwide-executable to run in local_src_dir because the script needs
to build airshipctl binary first, before doc pull command can be invoked and populate
the remote_work_dir. Changed the order of the roles to allow systemwide-executable
to run before test-config and pull-docs.
Change-Id: Ia47423d91cdfb2dbbf0259344daab1c7b8cd47f5
Signed-off-by: James Gu <james.gu@att.com>
OpenStack infra has created Zuul project templates that will enable us
to push our documentation to Read the Docs and the Airship website.
While adding a tox file to this project is not ideal, it appears to be
the only way to leverage these jobs at the moment.
This change adds a tox.ini file to airshipctl to build our documentation
and removes the venv solution. The Airship Working Committee will work
with the OpenStack infra team, if possible, to make the publish jobs
more flexible in the future and remove the tox.ini file.
Change-Id: I274cf69a7c79e0aad1d4c9b1decfaf5630f0b18f
Signed-off-by: Drew Walters <andrew.walters@att.com>
This Commit updated credentials for accessing quay.io to publish
docker images. Encrypted Secret was received from working committee.
Change-Id: Ibd503a8464a3abaf3c9e3e777b403c6731bffa0c
Signed-off-by: Sreejith Punnapuzha <sreejith.punnapuzha@outlook.com>
* encoding while saving credentials in authInfo
* decoding while fethcing credentials from authInfo
* Credentials are found only in ~/.airship/kubeconfig, so did not find
anything in ~/.airship/config to be encoded.
Change-Id: I13f3d49b2ad7ccd1388cabd015fe5a93be2c7b96
Closes: #155
Remove constants and define these parameteres
in config file for remote configuration.
Closes: #138
Change-Id: Ib9250b8d39c01ef43a1262b62e4d37215481bc43
Attempts to write to a nil map will cause a runtime panic,
since we don't have explicit checks whether the map is nil
or not - they were added with proper initialization using make.
Appropriate test configuration was added.
Change-Id: Ib50686de44b782fdc881bd4608dd74588fce93bd
Relates-To: #190
Closes: #190