Skip to content

Commit

Permalink
a few changes to e2e tests and cert-manager-setup:
Browse files Browse the repository at this point in the history
cert-manager-setup changed to include a dns solver test
cert-manager-setup README adjusted
e2e tests should only run the pre-test-script on a chart that has changed
circleci should shellcheck only the pre-test-script.sh in any chart
  • Loading branch information
lucasreed committed Sep 17, 2019
1 parent 66d0518 commit f886553
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- run:
name: lint-pre-scripts
command: |
for script in $(find incubator stable -type f -name "*.sh"); do
for script in $(find incubator stable -type f -name pre-test-script.sh); do
shellcheck -x $script
done
lint-charts:
Expand Down
4 changes: 2 additions & 2 deletions incubator/cert-manager-setup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ The following table lists the configurable parameters of the chart and their def
| `clusterIssuers.selfsigned.solvers.http.enabled` | Enables http01 validation on selfsigned issuer | `false` | yes |
| `clusterIssuers.selfsigned.solvers.http.ingressClass` | Use http01 solver with a specific ingress class | `""` | no |
| `clusterIssuers.selfsigned.solvers.http.ingressName` | Use this solver with a specific ingress name | `""` | no |
| `clusterIssuers.selfsigned.solvers.dns` | List of DNS solvers and optional selectors for each. See below for configuration | `[]` | yes |
| `clusterIssuers.selfsigned.solvers.dns` | List of DNS solvers and optional selectors for each. See below for configuration | `[]` | no |
| `clusterIssuers.primary.clusterIssuerName` | Name of the selfsigned clusterIssuer | `Release.Name-primary-valid` | no |
| `clusterIssuers.primary.enabled` | Whether or not the selfsigned ClusterIssuer is installed | `false` | yes |
| `clusterIssuers.primary.issuerUrl` | The URL to use for ACME | `https://acme-v02.api.letsencrypt.org/directory` | yes |
| `clusterIssuers.primary.email` | The email used for ACME registration | `someone@example.com` | yes |
| `clusterIssuers.primary.solvers.http.enabled` | Enables http01 validation on primary issuer | `false` | yes |
| `clusterIssuers.primary.solvers.http.ingressClass` | Use http01 solver with a specific ingress class | `""` | no |
| `clusterIssuers.primary.solvers.http.ingressName` | Use this solver with a specific ingress name | `""` | no |
| `clusterIssuers.primary.solvers.dns` | List of DNS solvers and optional selectors for each. See below for configuration | `[]` | yes |
| `clusterIssuers.primary.solvers.dns` | List of DNS solvers and optional selectors for each. See below for configuration | `[]` | no |

## DNS Solvers Configuration

Expand Down
3 changes: 3 additions & 0 deletions incubator/cert-manager-setup/ci/test-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ clusterIssuers:
solvers:
http:
enabled: true
dns:
- type: route53
hostedZoneID: TESTING
selfsigned:
enabled: true
email: someone@example.com
10 changes: 2 additions & 8 deletions scripts/pre-test-script-runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,12 @@ set -o errexit
set -o nounset
set -x

SCRIPT_PATH="$(cd "$(dirname "$0")" || return ; pwd -P)"
CI_DIR="ci"
SCRIPT_NAME="pre-test-script.sh"
SCRIPT="$CI_DIR/$SCRIPT_NAME"
CHANGED="$(git diff master --name-only incubator/*/ stable/*/ | awk -F"/" '{print $1"/"$2}' | sort -u)"

for chart in "$SCRIPT_PATH"/../incubator/* ; do
if test -f "$chart/$SCRIPT"; then
"$chart/$SCRIPT"
fi
done

for chart in "$SCRIPT_PATH"/../stable/* ; do
for chart in $CHANGED; do
if test -f "$chart/$SCRIPT"; then
"$chart/$SCRIPT"
fi
Expand Down

0 comments on commit f886553

Please sign in to comment.