Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Commit

Permalink
[test] Update to chart-testing v2.0.0 (#8745)
Browse files Browse the repository at this point in the history
Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
  • Loading branch information
unguiculus authored and k8s-ci-robot committed Nov 7, 2018
1 parent b1b3960 commit 408a5ab
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 32 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ jobs:
shellcheck -x test/repo-sync.sh
lint-charts:
docker:
- image: gcr.io/kubernetes-charts-ci/test-image:v2.0.5
- image: gcr.io/kubernetes-charts-ci/test-image:v3.0.0
steps:
- checkout
- run:
name: lint
command: |
git remote add k8s https://github.com/helm/charts
git fetch k8s master
chart_test.sh --config test/.testenv --no-install
ct lint --config test/ct.yaml
sync:
docker:
- image: google/cloud-sdk
Expand Down
2 changes: 1 addition & 1 deletion test/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
*
! .testenv
! *.yaml
23 changes: 0 additions & 23 deletions test/.testenv

This file was deleted.

2 changes: 1 addition & 1 deletion test/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM gcr.io/kubernetes-charts-ci/chart-testing:v1.0.5
FROM quay.io/helmpack/chart-testing:v2.0.0

ENV PATH /google-cloud-sdk/bin:$PATH
ARG CLOUD_SDK_VERSION=212.0.0
Expand Down
2 changes: 1 addition & 1 deletion test/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ set -o errexit
set -o nounset
set -o pipefail

readonly IMAGE_TAG=v2.0.5
readonly IMAGE_TAG=v3.0.0
readonly IMAGE_REPOSITORY="gcr.io/kubernetes-charts-ci/test-image"
readonly SCRIPT_DIR=$(dirname "$(readlink -f "$0")")

Expand Down
10 changes: 10 additions & 0 deletions test/ct.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
remote: k8s
target-branch: master
chart-dirs:
- stable
- incubator
excluded-charts:
- common
chart-repos:
- incubator=https://kubernetes-charts-incubator.storage.googleapis.com/
timeout: 10m
9 changes: 5 additions & 4 deletions test/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ set -o errexit
set -o nounset
set -o pipefail

readonly IMAGE_TAG=v2.0.5
readonly IMAGE_TAG=v3.0.0
readonly IMAGE_REPOSITORY="gcr.io/kubernetes-charts-ci/test-image"
readonly REPO_ROOT="${REPO_ROOT:-$(git rev-parse --show-toplevel)}"

Expand All @@ -37,8 +37,9 @@ main() {
git fetch k8s master

local config_container_id
config_container_id=$(docker run -ti -d -v "$GOOGLE_APPLICATION_CREDENTIALS:/service-account.json" -v "$REPO_ROOT:/workdir" \
-e "BUILD_ID=$JOB_TYPE-$PULL_INFO-$BUILD_ID" \
config_container_id=$(docker run -ti -d -v "$GOOGLE_APPLICATION_CREDENTIALS:/service-account.json" \
-v "$REPO_ROOT:/workdir" --workdir=/workdir \
-e "CT_BUILD_ID=$JOB_TYPE-$PULL_INFO-$BUILD_ID" \
"$IMAGE_REPOSITORY:$IMAGE_TAG" cat)

# shellcheck disable=SC2064
Expand All @@ -47,7 +48,7 @@ main() {
docker exec "$config_container_id" gcloud auth activate-service-account --key-file /service-account.json
docker exec "$config_container_id" gcloud container clusters get-credentials jenkins --project kubernetes-charts-ci --zone us-west1-a
docker exec "$config_container_id" kubectl cluster-info
docker exec "$config_container_id" chart_test.sh --config /workdir/test/.testenv
docker exec "$config_container_id" ct lint-and-install --config test/ct.yaml

echo "Done Testing!"
}
Expand Down

0 comments on commit 408a5ab

Please sign in to comment.