This change causes the linter to be a bit more complainy. The hope is
that this will cut down on some of the more pedantic issues being caught
in code reviews, and thus reduce the overall time a change spends in the
review process.
This change includes various changes to the codebase to bring it up to
the new standards.
Change-Id: I570d304bca5554404354f972d8a2743279a0171b
Implements `make docs` command to create rtd-themed docs using Sphinx
from the existing Markdown documents in the docs directory.
Changes the `get-modules` command to `depend` to more closely match
OpenStack guidelines in [0].
Adds `fmt` command as specified in [0], currently referencing the `lint`
command.
Adds `godoc` command that will host a local godoc server instance with a
link directly to airshipctl technical documentation.
Adds `releasenotes` commands specified in [0], currently
noted as "TODO".
Adds `images` command as found in other Airship projects, referencing
`docker-image`.
[0] https://governance.openstack.org/tc/reference/pti/golang.html
Change-Id: I134fc2c2714bce6d23dc9cf8b86c3016d68def7e
Each of these include an option for --current-context that set or retrieves
the curret context
This patchset mainly creates the cmd/config and pkg/config require additions
Also includes a fync getCurrentContext(<CLUSTERTYPE>) in the config pkg
that other modules should rely on.
Introduces new ErrMissingConfig and ErrConfigFailed types been used by
set-context, will decimate through get/ and set/get cluster after this is
reviewed.
Change-Id: I501483a9db99f33f860eaf329a65bb0209b2aaff
- Links to CONTRIBUTORS.md and testing-guidelines.md were broken.
- Minor fix to escaping of the (c) bulletpoint in contribution
guidelines.
Change-Id: Iffb5233b50008a4e4e4fd17be483d7e8c1ee4856
Adds options relating to proxy settings in the Makefile to be used
during the execution of docker build. The settings are optional to be
used and are set up similarly to other Airship projects such as [0] and
[1].
To set proxy settings during docker build, execute the command as
follows:
```
make docker-image \
-e PROXY=<The proxy URL> \
-e NO_PROXY=<comma-separated list of URLs/IPs not using the proxy> \
-e USE_PROXY=true
```
[0] https://opendev.org/airship/pegleg/src/branch/master/Makefile
[1] https://opendev.org/airship/promenade/src/branch/master/Makefile
Change-Id: I92258465d9638b40797d38ba5d8b835fc38df23f
This patch makes minor documentation fixes:
1. Wording of make images
2. Document rendering of bullet point c instead of a copyright symbol
3. Fix broken link for contributing docs
4. Use https for quay link instead of http
5. Limit line lengths to 80 characters
Change-Id: I8c6d339251e454b357d6eaeb125b925c209e8577
This removes the SampleSystem testing variable and replaces it by a
function which generates the object. This guarantees that the test
system has the same initial configuration for each test regardless of
the order in which tests are run.
Change-Id: I9875723ac4194425674c2806cf099509f94ad771
This rearranges the Dockerfile to COPY over the go module files for
downloading prior to building, linting, and testing. This will allow
developers to more quickly test their code via Docker given that their
dependencies change infrequently.
Change-Id: I3650fbd9ca18d453921d25a536e8b4cf60ce1b5e
Adjust internal links to be relative to repository root, and change github
link to opendev link as project is hosted on opendev.org.
Change-Id: Icb5e3a378d600d087d6d97200d2c355d8619dc09
This changes the unit tests in ./cmd/config/get_cluster.go by swapping
out the `run` function for the pre-built CmdTest. This matches the
conventions of the existing test bed.
Change-Id: I4cecd211fe7ab74a1151635f29bda578887f400a
This commit adds the `tidy` target. This target will fail if the go.mod
or go.sum files are not up to date with the code. It will also be a
prerequisite to the `lint` command, implying that it will also be caught
by the Zuul gates.
Change-Id: Ie33de2d793beca100435670346eb0e2ea7b3b0dd
This commit changes several unit tests to set a "workspace" in a temp
directory. This completely isolates them from other tests as well as the
developer's environment.
Change-Id: Ifa1048c427dc3d69e15dae04318c7d8463b8f8e1
* This removes unneeded variables and complexity from the
reconcileClusters function.
* It also adds a unit test for said function, slightly increasing overall
unit test coverage
* Finally, this also addresses an issue in the rmConfigClusterStragglers
function in which the clusters entry was not cleaned up in spite of
being empty.
Change-Id: I9e7535305840db5f2fb763452d5e4ef46be467c9
Prior to this commit, NewConfig was setting up a new Config object and
filling it with a new kubeconfig object. The process for creating a
kubeconfig object has the potential to return an error. This commit
removes the creation of that object from NewConfig, delegating creation
of kubeconfig objects to more appropriate functions, such as LoadConfig.
Change-Id: I57a040f2e76bbc003eb82171f382e80425b37870
This commit removes any assertion from Go's "testing" package,
preferring instead to use an assertion from the testify package. All
tests now have uniformity.
This also decrease the number of iterations in the password generation
test, decreasing test runtime tenfold
Change-Id: I8799110e93dfa19bebe9050528e865b4c991c3df