* Enhancing lint.sh with additional checks
* reverting post local testing changes
* addressing reviews.
removing yq installetion
chaning yq with yaml for Chart.yaml parsing.
modifing Erro message for not github account check.
also modifing lint.sh so it can be used locally
1. BUILD_NUMBER is deprecated and needed to be replaced for prow jobs
2. PULL_NUMBER is not available when batch jobs, including merges,
are executed. Need a fallback to avoid errors.
* Fixing orphaned helm deploys left by CI
The CI system has cases where helm delete and namespace cleanup
are skipped if there is an error getting logs on a pod. This causes
the pod logs to always return true and avoid a premature exit before
cleanup is run
* Fixing issue where pods not yet running to not have delay before rechecking
When pods are not yet in a running state there is no delay before
rechecking. This is causing timeouts to happen waiting for pods.
This fixes flaky readiness checks by double-checking readiness. It could
happen that the script deemed all pods ready when at the moment the
check is executed only ready pods are reported but not all replicas are
running yet.
This change does 3 things:
1. Gets the logs from the test pods
2. Prints the output of helm status
3. Gets the logs from the pods running for a release
When the array splitting happen there are cases where the patch
(maj.min.patch) is 0. Using ++ to increment that 0 causes a
return code of 1. Using +=1 instead increments the value but has
a return code of 0.
The bot that merges PRs re-runs the e2e job before merging a pull
request. By also having it here (circleci provides fast response
to PR authors) we make sure the version has been incremented in
the chart prior to it being merged.
The previous version of the sync script ran `helm dep update` which
would recreate the requirements.lock file. This caused new builds
of charts as a total package with different versions of dependencies
but the same chart version. The package was mutating.
This change works towards our goal of immutable charts for a chart
at a version.
Indentation checking was catching catching out the commenting of
whole sections of indented code in values.yaml files as being
errors. Yet, code editors and other tools automatically indented
to this level. Removing the check.
This commit does a couple things
1. It reformats the layout to have checks via self contained
functions rather than all in one loop.
2 Adds a check that the chart.version was incremented
Ref #2373
The changed.sh script tried to find the merge base but the merge
base branch was not available. This change provides it so that
a common ancestor can be found.
This does not lint yaml templates as they are templates rather
than valid yaml files. They cannot be linted with a normal linter
yamllint is used for linting. This is an existing Python project
https://github.com/adrienverge/yamllint
The rules are not the default rules and are stored in their
entirity so they can be controlled over time
The existance of a Chart.yaml file and values.yaml file is checked
and an error is thrown if one is missing. Helm lint will not
detect a chart if Chart.yaml is missing and if a values.yaml file
is missing it is noted as info.
The run function is introduced to enable running all the linters,
capturing non-zero exit codes, and exiting with a non-zdero code
if any of them fail. This is used instead of exiting when the
first failure happens to provide more feedback to chart developers.
The previous diff was a comparison against master. If master had
changed since the current PR was created the changed charts would
be re-tested. This could create a problem when helm was upgraded
and lint changed causing previously passing charts to fail. Since
they were not associated with the current PR it was an outlier
problem for the PR author.
The new diff does a comparison to the merge-base which ties to look
for changes introduced by the current pull request.
This change does the following:
- Adds a circleci config file
- Has 2 scripts. One for installing tools and a separate one for
executing tests
- Removes lint testing from the changed.sh script since it is
performed elsewhere
- For linting changes the git diff mechanism to look at the merge
base rather than all differences from master. The intent is to
look for changes in this request rather than including those
in PRs that may have already been merged to master while this
one lingered.
Ref #2337