1
0
mirror of https://github.com/helm/chartmuseum.git synced 2026-02-05 06:45:56 +01:00

Various v0.14.0 prep items (#527)

- Update version to v0.14.0
- Fix readme for push plugin (in place of #513)
- Upgrade Go modules, Go version in CI
- Use Helm 3.8 in acceptance tests
- Remove bad semever chart tests and testdata
- Support for M1 Macs local dev
- Add SECURITY.md

Signed-off-by: Josh Dolitsky <josh@dolit.ski>
This commit is contained in:
Josh Dolitsky
2022-01-25 08:18:40 -06:00
committed by GitHub
parent c08bf65f2f
commit 4412d39346
15 changed files with 495 additions and 267 deletions

View File

@@ -14,7 +14,7 @@ jobs:
- name: setup go environment
uses: actions/setup-go@v2
with:
go-version: '1.17.0'
go-version: '1.17.6'
- name: download dependencies
run: make bootstrap
- name: run unit tests
@@ -24,13 +24,13 @@ jobs:
- name: run acceptance tests
run: sudo pip install virtualenv && make acceptance
- name: upload coverage report
uses: actions/upload-artifact@master
uses: actions/upload-artifact@main
with:
name: chartmuseum-coverage-report-${{ github.sha }}
path: .cover/
if: always()
- name: upload acceptance test report
uses: actions/upload-artifact@master
uses: actions/upload-artifact@main
with:
name: chartmuseum-acceptance-report-${{ github.sha }}
path: .robot/

View File

@@ -16,7 +16,7 @@ jobs:
- name: setup go environment
uses: actions/setup-go@v2
with:
go-version: '1.17.0'
go-version: '1.17.6'
- name: download dependencies
run: make bootstrap
- name: run unit tests
@@ -81,13 +81,13 @@ jobs:
run: |
rm -f ${HOME}/.docker/config.json
- name: upload coverage report
uses: actions/upload-artifact@master
uses: actions/upload-artifact@main
with:
name: chartmuseum-coverage-report-${{ github.sha }}
path: .cover/
if: always()
- name: upload acceptance test report
uses: actions/upload-artifact@master
uses: actions/upload-artifact@main
with:
name: chartmuseum-acceptance-report-${{ github.sha }}
path: .robot/

View File

@@ -2,7 +2,7 @@
FROM golang:alpine
ARG version=0.13.1
ARG version=0.14.0
ARG revision=main

View File

@@ -1,4 +1,4 @@
VERSION ?= 0.13.1
VERSION ?= 0.14.0
REVISION := $(shell git rev-parse --short HEAD;)
BINDIR := $(CURDIR)/bin

View File

@@ -71,7 +71,7 @@ curl -F "chart=@mychart-0.1.0.tgz" -F "prov=@mychart-0.1.0.tgz.prov" http://loca
You can also use the [helm-push plugin](https://github.com/chartmuseum/helm-push):
```
helm push mychart/ chartmuseum
helm cm-push mychart/ chartmuseum
```
## Installing Charts into Kubernetes
@@ -97,7 +97,7 @@ Install binary using [GoFish](https://gofi.sh/):
```
gofish install chartmuseum
==> Installing chartmuseum...
🐠 chartmuseum 0.13.1: installed in 95.431145ms
🐠 chartmuseum 0.14.0: installed in 95.431145ms
```
or you can use the installer script:
@@ -478,7 +478,7 @@ docker run --rm -it \
-e STORAGE=local \
-e STORAGE_LOCAL_ROOTDIR=/charts \
-v $(pwd)/charts:/charts \
ghcr.io/helm/chartmuseum:v0.13.1
ghcr.io/helm/chartmuseum:v0.14.0
```
Example usage (S3):
@@ -491,7 +491,7 @@ docker run --rm -it \
-e STORAGE_AMAZON_PREFIX="" \
-e STORAGE_AMAZON_REGION="us-east-1" \
-v ~/.aws:/home/chartmuseum/.aws:ro \
ghcr.io/helm/chartmuseum:v0.13.1
ghcr.io/helm/chartmuseum:v0.14.0
```
### Helm Chart

3
SECURITY.md Normal file
View File

@@ -0,0 +1,3 @@
# Helm Security Reporting and Policy
The Helm project has [a common process and policy that can be found here](https://github.com/helm/community/blob/master/SECURITY.md).

View File

@@ -12,7 +12,7 @@ class Helm(common.CommandRunner):
self.run_command('helm repo remove %s' % common.HELM_REPO_NAME)
def search_for_chart(self, chart):
self.run_command('helm search %s/%s' % (common.HELM_REPO_NAME, chart))
self.run_command('helm search repo %s/%s' % (common.HELM_REPO_NAME, chart))
def update_chart_repos(self):
# "| awk 'NR>1{print buf}{buf = $0}'" prevents UnicodeDecodeError

139
go.mod
View File

@@ -2,74 +2,68 @@ module helm.sh/chartmuseum
go 1.17
replace (
github.com/NetEase-Object-Storage/nos-golang-sdk => github.com/karuppiah7890/nos-golang-sdk v0.0.0-20191116042345-0792ba35abcc
go.etcd.io/etcd => github.com/eddycjy/etcd v0.5.0-alpha.5.0.20200218102753-4258cdd2efdf
google.golang.org/grpc => google.golang.org/grpc v1.29.1
)
require (
github.com/alicebob/miniredis v2.5.0+incompatible
github.com/chartmuseum/auth v0.5.0
github.com/chartmuseum/storage v0.11.0
github.com/chartmuseum/storage v0.12.0
github.com/ghodss/yaml v1.0.0
github.com/gin-contrib/size v0.0.0-20210429000130-f8b4345c9ddf
github.com/gin-gonic/gin v1.7.4
github.com/gin-contrib/size v0.0.0-20220102055520-f75bacbc2df3
github.com/gin-gonic/gin v1.7.7
github.com/go-redis/redis v6.15.9+incompatible
github.com/gofrs/uuid v4.0.0+incompatible
github.com/gofrs/uuid v4.2.0+incompatible
github.com/prometheus/client_golang v1.12.0
github.com/sirupsen/logrus v1.8.1
github.com/spf13/viper v1.8.1
github.com/spf13/viper v1.10.1
github.com/stretchr/testify v1.7.0
github.com/urfave/cli v1.22.2
github.com/urfave/cli v1.22.5
github.com/zsais/go-gin-prometheus v0.1.0
go.uber.org/zap v1.17.0
helm.sh/helm/v3 v3.7.2
go.uber.org/zap v1.20.0
helm.sh/helm/v3 v3.8.0
)
require (
cloud.google.com/go v0.93.3 // indirect
cloud.google.com/go/storage v1.16.1 // indirect
github.com/Azure/azure-sdk-for-go v57.1.0+incompatible // indirect
cloud.google.com/go v0.100.2 // indirect
cloud.google.com/go/compute v0.1.0 // indirect
cloud.google.com/go/iam v0.1.1 // indirect
cloud.google.com/go/storage v1.18.2 // indirect
github.com/Azure/azure-sdk-for-go v61.3.0+incompatible // indirect
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
github.com/Azure/go-autorest/autorest v0.11.20 // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.13 // indirect
github.com/Azure/go-autorest/autorest v0.11.24 // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.18 // indirect
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
github.com/Azure/go-autorest/logger v0.2.1 // indirect
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
github.com/Masterminds/semver/v3 v3.1.1 // indirect
github.com/Microsoft/go-winio v0.4.17 // indirect
github.com/Microsoft/hcsshim v0.8.21 // indirect
github.com/NetEase-Object-Storage/nos-golang-sdk v0.0.0-00010101000000-000000000000 // indirect
github.com/NetEase-Object-Storage/nos-golang-sdk v0.0.0-20191125093154-335c2b73bf6b // indirect
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a // indirect
github.com/aliyun/aliyun-oss-go-sdk v2.1.10+incompatible // indirect
github.com/aws/aws-sdk-go v1.40.37 // indirect
github.com/baidubce/bce-sdk-go v0.9.86 // indirect
github.com/aliyun/aliyun-oss-go-sdk v2.2.0+incompatible // indirect
github.com/aws/aws-sdk-go v1.42.40 // indirect
github.com/baidubce/bce-sdk-go v0.9.104 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/containerd/containerd v1.5.7 // indirect
github.com/containerd/continuity v0.1.0 // indirect
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e // indirect
github.com/containerd/containerd v1.5.9 // indirect
github.com/coreos/etcd v3.3.27+incompatible // indirect
github.com/coreos/go-semver v0.3.0 // indirect
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf // indirect
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/docker/cli v20.10.7+incompatible // indirect
github.com/docker/cli v20.10.11+incompatible // indirect
github.com/docker/distribution v2.7.1+incompatible // indirect
github.com/docker/docker v17.12.0-ce-rc1.0.20200618181300-9dc6525e6118+incompatible // indirect
github.com/docker/docker-credential-helpers v0.6.3 // indirect
github.com/docker/docker v20.10.12+incompatible // indirect
github.com/docker/docker-credential-helpers v0.6.4 // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-metrics v0.0.1 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/evanphx/json-patch v4.11.0+incompatible // indirect
github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-errors/errors v1.0.1 // indirect
github.com/go-logr/logr v0.4.0 // indirect
github.com/go-logr/logr v1.2.0 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.19.5 // indirect
github.com/go-openapi/swag v0.19.14 // indirect
@@ -78,6 +72,7 @@ require (
github.com/go-playground/validator/v10 v10.4.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/golang-jwt/jwt/v4 v4.2.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/gomodule/redigo v1.8.2 // indirect
@@ -87,9 +82,9 @@ require (
github.com/google/gofuzz v1.1.0 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/google/uuid v1.2.0 // indirect
github.com/googleapis/gax-go/v2 v2.1.0 // indirect
github.com/googleapis/gax-go/v2 v2.1.1 // indirect
github.com/googleapis/gnostic v0.5.5 // indirect
github.com/gophercloud/gophercloud v0.20.0 // indirect
github.com/gophercloud/gophercloud v0.24.0 // indirect
github.com/gorilla/mux v1.8.0 // indirect
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
@@ -98,75 +93,79 @@ require (
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.11.13 // indirect
github.com/klauspost/compress v1.13.6 // indirect
github.com/leodido/go-urn v1.2.0 // indirect
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
github.com/magiconair/properties v1.8.5 // indirect
github.com/mailru/easyjson v0.7.6 // indirect
github.com/mattn/go-isatty v0.0.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/mitchellh/mapstructure v1.4.1 // indirect
github.com/mitchellh/mapstructure v1.4.3 // indirect
github.com/moby/locker v1.0.1 // indirect
github.com/moby/term v0.0.0-20210610120745-9d4ed1856297 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/mozillazg/go-httpheader v0.2.1 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.1 // indirect
github.com/opencontainers/runc v1.0.2 // indirect
github.com/opencontainers/image-spec v1.0.2 // indirect
github.com/oracle/oci-go-sdk v24.3.0+incompatible // indirect
github.com/pelletier/go-toml v1.9.3 // indirect
github.com/pelletier/go-toml v1.9.4 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/russross/blackfriday/v2 v2.0.1 // indirect
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/spf13/afero v1.6.0 // indirect
github.com/spf13/cast v1.3.1 // indirect
github.com/spf13/cobra v1.2.1 // indirect
github.com/spf13/cast v1.4.1 // indirect
github.com/spf13/cobra v1.3.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.2.0 // indirect
github.com/tencentyun/cos-go-sdk-v5 v0.7.30 // indirect
github.com/tencentyun/cos-go-sdk-v5 v0.7.33 // indirect
github.com/ugorji/go/codec v1.1.7 // indirect
github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca // indirect
github.com/yuin/gopher-lua v0.0.0-20210529063254-f4c35e4016d9 // indirect
go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489 // indirect
go.etcd.io/etcd v3.3.27+incompatible // indirect
go.etcd.io/etcd/api/v3 v3.5.1 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.5.1 // indirect
go.etcd.io/etcd/client/v3 v3.5.1 // indirect
go.opencensus.io v0.23.0 // indirect
go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a // indirect
golang.org/x/net v0.0.0-20210903162142-ad29c8ab022f // indirect
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3 // indirect
golang.org/x/net v0.0.0-20220121210141-e204ce36a2ba // indirect
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 // indirect
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect
golang.org/x/text v0.3.6 // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
google.golang.org/api v0.56.0 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/api v0.65.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71 // indirect
google.golang.org/grpc v1.40.0 // indirect
google.golang.org/genproto v0.0.0-20220111164026-67b88f271998 // indirect
google.golang.org/grpc v1.43.0 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.62.0 // indirect
gopkg.in/ini.v1 v1.66.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
k8s.io/api v0.22.4 // indirect
k8s.io/apimachinery v0.22.4 // indirect
k8s.io/cli-runtime v0.22.4 // indirect
k8s.io/client-go v0.22.4 // indirect
k8s.io/klog/v2 v2.9.0 // indirect
k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c // indirect
k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a // indirect
oras.land/oras-go v0.4.0 // indirect
sigs.k8s.io/kustomize/api v0.8.11 // indirect
sigs.k8s.io/kustomize/kyaml v0.11.0 // indirect
k8s.io/api v0.23.1 // indirect
k8s.io/apimachinery v0.23.1 // indirect
k8s.io/cli-runtime v0.23.1 // indirect
k8s.io/client-go v0.23.1 // indirect
k8s.io/klog/v2 v2.30.0 // indirect
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect
k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b // indirect
oras.land/oras-go v1.1.0 // indirect
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect
sigs.k8s.io/kustomize/api v0.10.1 // indirect
sigs.k8s.io/kustomize/kyaml v0.13.0 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect
sigs.k8s.io/yaml v1.2.0 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)

536
go.sum

File diff suppressed because it is too large Load Diff

View File

@@ -49,7 +49,6 @@ var otherTestTarballPath = "../../../../testdata/charts/otherchart/otherchart-0.
var otherTestProvfilePath = "../../../../testdata/charts/otherchart/otherchart-0.1.0.tgz.prov"
var badTestTarballPath = "../../../../testdata/badcharts/mybadchart/mybadchart-1.0.0.tgz"
var badTestProvfilePath = "../../../../testdata/badcharts/mybadchart/mybadchart-1.0.0.tgz.prov"
var badTestSemver2Path = "../../../../testdata/badcharts/mybadsemver2chart/mybadsemver2chart-0.x.x.tgz"
type MultiTenantServerTestSuite struct {
suite.Suite
@@ -995,14 +994,6 @@ func (suite *MultiTenantServerTestSuite) testAllRoutes(repo string, depth int) {
res = suite.doRequest(stype, "POST", fmt.Sprintf("%s/charts?force", apiPrefix), body, "")
suite.Equal(409, res.Status(), fmt.Sprintf("409 POST %s/charts?force", apiPrefix))
// with bad semver
content, err = ioutil.ReadFile(badTestSemver2Path)
suite.Nil(err, "no error opening bad semver2 path")
body = bytes.NewBuffer(content)
res = suite.doRequest(stype, "POST", fmt.Sprintf("%s/charts", apiPrefix), body, "")
suite.Equal(400, res.Status(), fmt.Sprintf("400 POST %s/charts", apiPrefix))
// POST /api/:repo/prov
content, err = ioutil.ReadFile(testProvfilePath)
suite.Nil(err, "no error opening test provenance file")

View File

@@ -1,6 +1,6 @@
#!/bin/bash -ex
PY_REQUIRES="requests==2.26.0 robotframework==4.1"
PY_REQUIRES="requests==2.27.1 robotframework==4.1.3"
REQUIRED_TEST_STORAGE_ENV_VARS=(
"TEST_STORAGE_AMAZON_BUCKET"
@@ -27,18 +27,23 @@ set -x
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR/../
ARCH="amd64"
if [ "$(uname)" == "Darwin" ]; then
PLATFORM="darwin"
if [ `uname -m` == 'arm64' ]; then
ARCH="arm64"
fi
else
PLATFORM="linux"
fi
export PATH="$PWD/testbin:$PWD/bin/$PLATFORM/amd64:$PATH"
export PATH="$PWD/testbin:$PWD/bin/$PLATFORM/$ARCH:$PATH"
mkdir -p .robot/
export HELM_HOME="$PWD/.helm"
helm init --client-only
export XDG_CACHE_HOME=${PWD}/.helm/cache && mkdir -p ${XDG_CACHE_HOME}
export XDG_CONFIG_HOME=${PWD}/.helm/config && mkdir -p ${XDG_CONFIG_HOME}
export XDG_DATA_HOME=${PWD}/.helm/data && mkdir -p ${XDG_DATA_HOME}
if [ ! -d .venv/ ]; then
virtualenv -p $(which python3) .venv/
.venv/bin/python .venv/bin/pip install $PY_REQUIRES

View File

@@ -1,6 +1,6 @@
#!/bin/bash -ex
HELM_VERSION="2.17.0"
HELM_VERSION="3.8.0"
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR/../
@@ -8,7 +8,9 @@ cd $DIR/../
export PATH="$PWD/testbin:$PATH"
main() {
export HELM_HOME="$PWD/.helm"
export XDG_CACHE_HOME=${PWD}/.helm/cache && mkdir -p ${XDG_CACHE_HOME}
export XDG_CONFIG_HOME=${PWD}/.helm/config && mkdir -p ${XDG_CONFIG_HOME}
export XDG_DATA_HOME=${PWD}/.helm/data && mkdir -p ${XDG_DATA_HOME}
install_helm
package_test_charts
}
@@ -17,7 +19,11 @@ install_helm() {
if [ ! -f "testbin/helm" ]; then
mkdir -p testbin/
[ "$(uname)" == "Darwin" ] && PLATFORM="darwin" || PLATFORM="linux"
TARBALL="helm-v${HELM_VERSION}-${PLATFORM}-amd64.tar.gz"
ARCH="amd64"
if [ `uname -m` == "arm64" ]; then
ARCH="arm64"
fi
TARBALL="helm-v${HELM_VERSION}-${PLATFORM}-${ARCH}.tar.gz"
wget "https://get.helm.sh/${TARBALL}" || \
curl -O "https://get.helm.sh/${TARBALL}"
tar -C testbin/ -xzf $TARBALL
@@ -28,10 +34,9 @@ install_helm() {
rm -rf $UNCOMPRESSED_DIR
chmod +x ./helm
popd
helm init --client-only
# remove any repos that come out-of-the-box (i.e. "stable")
helm repo list | sed -n '1!p' | awk '{print $1}' | xargs helm repo remove
helm repo list | sed -n '1!p' | awk '{print $1}' | xargs helm repo remove || true
fi
}
@@ -49,11 +54,7 @@ package_test_charts() {
pushd testdata/badcharts/
for d in $(find . -maxdepth 1 -mindepth 1 -type d); do
pushd $d
# TODO: remove in v0.14.0. We do not generate .prov file for this chart
# since prov validation is not enabled, and it breaks acceptance tests
if grep "mybadsemver2chart" Chart.yaml; then
helm package . || true
fi
helm package .
popd
done
}

View File

@@ -1,2 +0,0 @@
*.tgz
*.prov

View File

@@ -1,4 +0,0 @@
apiVersion: v1
name: mybadsemver2chart
version: 0.x.x

View File

@@ -1,9 +0,0 @@
apiVersion: v1
kind: Pod
metadata:
name: '{{- printf "%s-%s" .Release.Name .Chart.Name | trunc 63 | trimSuffix "-" -}}'
spec:
containers:
- image: busybox
name: '{{ .Chart.Name }}'
command: ['/bin/sh', '-c', 'while true; do echo {{ .Release.Name }}; sleep 5; done']