+3058
-1004
lines changedFilter options
+3058
-1004
lines changed Original file line number Diff line number Diff line change
@@ -1,14 +1,57 @@
1
1
version: 2
2
2
jobs:
3
-
build:
3
+
lint:
4
4
docker:
5
5
- image: koalaman/shellcheck-alpine
6
6
steps:
7
7
- checkout
8
8
- run:
9
9
name: lint
10
10
command: |
11
-
shellcheck -x lib/chartlib.sh
12
-
shellcheck -x chart_test.sh
13
-
shellcheck -x examples/docker-for-mac/my_test.sh
14
-
shellcheck -x examples/gke/my_test.sh
11
+
shellcheck -x build.sh
12
+
shellcheck -x tag.sh
13
+
build:
14
+
docker:
15
+
- image: golang:1.11.1-alpine3.8
16
+
working_directory: /go/src/github.com/helm/chart-testing
17
+
steps:
18
+
- setup_remote_docker
19
+
- run:
20
+
name: Install tools
21
+
command: |
22
+
apk add bash build-base ca-certificates curl docker git openssh
23
+
curl -SLO https://github.com/goreleaser/goreleaser/releases/download/v0.93.0/goreleaser_Linux_x86_64.tar.gz
24
+
mkdir -p /usr/local/goreleaser
25
+
tar -xzf goreleaser_Linux_x86_64.tar.gz -C /usr/local/goreleaser
26
+
ln -s /usr/local/goreleaser/goreleaser /usr/local/bin/goreleaser
27
+
rm -rf goreleaser_Linux_x86_64.tar.gz
28
+
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
29
+
- checkout
30
+
- run:
31
+
name: Build
32
+
command: |
33
+
set -e
34
+
set -u
35
+
36
+
if [[ -z "${CIRCLE_TAG:-}" ]]; then
37
+
echo "Building snapshot..."
38
+
./build.sh
39
+
else
40
+
echo "Building release $CIRCLE_TAG..."
41
+
echo $DOCKER_PASSWORD | docker login --username $DOCKER_USERNAME --password-stdin quay.io
42
+
./build.sh --release
43
+
fi
44
+
workflows:
45
+
version: 2
46
+
untagged-build:
47
+
jobs:
48
+
- lint
49
+
- build
50
+
tagged-build:
51
+
jobs:
52
+
- build:
53
+
filters:
54
+
tags:
55
+
only: /^v.*/
56
+
branches:
57
+
ignore: /.*/
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
1
+
.circleci
1
2
.history
2
3
.idea
3
-
.editorconfig
4
-
.gitignore
5
-
.git
6
-
Dockerfile
4
+
.vscode
Original file line number Diff line number Diff line change
@@ -9,6 +9,11 @@ trim_trailing_whitespace = true
9
9
insert_final_newline = true
10
10
charset = utf-8
11
11
12
-
[*.{yml,yaml}]
12
+
[*.{yml, yaml}]
13
13
indent_size = 2
14
14
15
+
[*.go]
16
+
indent_style = tab
17
+
18
+
[Makefile]
19
+
indent_style = tab
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
1
-
.history
2
1
.idea
3
-
.settings
4
2
.project
5
-
.classpath
3
+
.settings
4
+
.vscode
5
+
/dist
6
+
/config.*
7
+
/ct
8
+
vendor
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
1
+
project_name: chart-testing
2
+
builds:
3
+
- main: app/main.go
4
+
binary: ct
5
+
env:
6
+
- CGO_ENABLED=0
7
+
goarch:
8
+
- amd64
9
+
- arm
10
+
goos:
11
+
- linux
12
+
- darwin
13
+
- windows
14
+
ldflags:
15
+
- >-
16
+
-X github.com/helm/chart-testing/app/cmd.Version={{ .Tag }}
17
+
-X github.com/helm/chart-testing/app/cmd.GitCommit={{ .Commit }}
18
+
-X github.com/helm/chart-testing/app/cmd.BuildDate={{ .Date }}
19
+
archive:
20
+
format_overrides:
21
+
- goos: windows
22
+
format: zip
23
+
files:
24
+
- LICENSE
25
+
- README.md
26
+
- etc/chart_schema.yaml
27
+
- etc/lintconf.yaml
28
+
checksum:
29
+
name_template: 'checksums.txt'
30
+
snapshot:
31
+
name_template: "{{ .Tag }}-next"
32
+
changelog:
33
+
sort: asc
34
+
dockers:
35
+
- goos: linux
36
+
goarch: amd64
37
+
binary: ct
38
+
skip_push: false
39
+
dockerfile: Dockerfile
40
+
image_templates:
41
+
- quay.io/helmpack/chart-testing:{{ .Tag }}
42
+
- quay.io/helmpack/chart-testing:latest
43
+
build_flag_templates:
44
+
- --build-arg=dist_dir=
45
+
- --label=org.label-schema.schema-version=1.0
46
+
- --label=org.label-schema.version={{ .Version }}
47
+
- --label=org.label-schema.name={{ .ProjectName }}
48
+
- --label=org.label-schema.build-date={{ .Date }}
49
+
- --label=org.label-schema.description='ct - The chart testing tool'
50
+
- --label=org.label-schema.vendor=Helm
51
+
extra_files:
52
+
- etc/chart_schema.yaml
53
+
- etc/lintconf.yaml
Original file line number Diff line number Diff line change
@@ -1,40 +1,15 @@
1
-
# Copyright 2018 The Helm Authors. All rights reserved.
2
-
#
3
-
# Licensed under the Apache License, Version 2.0 (the "License");
4
-
# you may not use this file except in compliance with the License.
5
-
# You may obtain a copy of the License at
6
-
#
7
-
# http://www.apache.org/licenses/LICENSE-2.0
8
-
#
9
-
# Unless required by applicable law or agreed to in writing, software
10
-
# distributed under the License is distributed on an "AS IS" BASIS,
11
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
-
# See the License for the specific language governing permissions and
13
-
# limitations under the License.
14
-
15
-
FROM bash:4.4
1
+
FROM alpine:3.8
16
2
17
3
RUN apk --no-cache add \
18
4
curl \
19
5
git \
20
-
jq \
21
6
libc6-compat \
22
7
openssh-client \
23
8
python \
24
9
py-crcmod \
25
10
py-pip && \
26
11
pip install --upgrade pip==18.1
27
12
28
-
# Install YQ command line reader
29
-
ARG YQ_VERSION=2.7.0
30
-
RUN pip install "yq==$YQ_VERSION"
31
-
32
-
# Install SemVer testing tool
33
-
ARG VERT_VERSION=0.1.0
34
-
RUN curl -Lo vert "https://github.com/Masterminds/vert/releases/download/v$VERT_VERSION/vert-v$VERT_VERSION-linux-amd64" && \
35
-
chmod +x vert && \
36
-
mv vert /usr/local/bin/
37
-
38
13
# Install a YAML Linter
39
14
ARG YAML_LINT_VERSION=1.12.1
40
15
RUN pip install "yamllint==$YAML_LINT_VERSION"
@@ -44,22 +19,23 @@ ARG YAMALE_VERSION=1.7.0
44
19
RUN pip install "yamale==$YAMALE_VERSION"
45
20
46
21
# Install kubectl
47
-
ARG KUBECTL_VERSION=1.12.2
48
-
RUN curl -LO "https://storage.googleapis.com/kubernetes-release/release/v$KUBECTL_VERSION/bin/linux/amd64/kubectl" && \
22
+
ARG KUBECTL_VERSION=v1.12.2
23
+
RUN curl -LO "https://storage.googleapis.com/kubernetes-release/release/$KUBECTL_VERSION/bin/linux/amd64/kubectl" && \
49
24
chmod +x kubectl && \
50
25
mv kubectl /usr/local/bin/
51
26
52
27
# Install Helm
53
-
ARG HELM_VERSION=2.11.0
54
-
RUN curl -LO "https://kubernetes-helm.storage.googleapis.com/helm-v$HELM_VERSION-linux-amd64.tar.gz" && \
28
+
ARG HELM_VERSION=v2.11.0
29
+
RUN curl -LO "https://kubernetes-helm.storage.googleapis.com/helm-$HELM_VERSION-linux-amd64.tar.gz" && \
55
30
mkdir -p "/usr/local/helm-$HELM_VERSION" && \
56
-
tar -xzf "helm-v$HELM_VERSION-linux-amd64.tar.gz" -C "/usr/local/helm-$HELM_VERSION" && \
31
+
tar -xzf "helm-$HELM_VERSION-linux-amd64.tar.gz" -C "/usr/local/helm-$HELM_VERSION" && \
57
32
ln -s "/usr/local/helm-$HELM_VERSION/linux-amd64/helm" /usr/local/bin/helm && \
58
-
rm -f "helm-v$HELM_VERSION-linux-amd64.tar.gz"
59
-
60
-
COPY etc /testing/etc/
61
-
COPY lib /testing/lib/
62
-
COPY chart_test.sh /testing/
33
+
rm -f "helm-$HELM_VERSION-linux-amd64.tar.gz"
63
34
64
-
RUN ln -s /testing/chart_test.sh /usr/local/bin/chart_test.sh
35
+
# Goreleaser needs to override this because it builds the
36
+
# Dockerfile from a tmp dir with all files to be copied in the root
37
+
ARG dist_dir=dist/linux_amd64
65
38
39
+
COPY "$dist_dir/chart_schema.yaml" /etc/ct/chart_schema.yaml
40
+
COPY "$dist_dir/lintconf.yaml" /etc/ct/lintconf.yaml
41
+
COPY "$dist_dir/ct" /usr/local/bin/ct
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4