-
Notifications
You must be signed in to change notification settings - Fork 745
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #353 from ywk253100/190916_ci
Enable Travis CI to do the basic verification for PRs
- Loading branch information
Showing
5 changed files
with
52 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
docs/* | ||
.git/* | ||
.gitignore | ||
CONTRIBUTING.md | ||
CONTRIBUTING.md | ||
.travis.yaml | ||
test/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
dist: xenial | ||
language: minimal | ||
matrix: | ||
include: | ||
- name: "helm v2" | ||
env: HELM_VERSION=2 | ||
- name: "helm v3" | ||
env: HELM_VERSION=3 | ||
before_install: | ||
- test/install_helm.sh | ||
before_script: | ||
# rename the "harbor-helm" folder to "harbor" to avoid the helm lint failure | ||
- cd ..; mv harbor-helm harbor; cd harbor | ||
script: | ||
- test/verify.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#/bin/bash | ||
set -e | ||
version=${HELM_VERSION} | ||
if [ "$version" = "2" ] | ||
then | ||
dist="helm-v2.8.0-linux-amd64.tar.gz" | ||
# as the helm v3 removes tiller, here appends the "-c" option | ||
# to args only when running helm v2 to display the client version | ||
version_args="-c" | ||
elif [ "$version" = "3" ] | ||
then | ||
# the "template" command doesn't work for helm beta3: | ||
# https://github.com/helm/helm/issues/6404, use the beta2 for now | ||
dist="helm-v3.0.0-beta.2-linux-amd64.tar.gz" | ||
else | ||
echo "unsupported helm version: $version" | ||
exit 1 | ||
fi | ||
wget -O /tmp/${dist} https://get.helm.sh/${dist} | ||
tar -zxvf /tmp/${dist} -C /tmp/ | ||
|
||
sudo mv /tmp/linux-amd64/helm /usr/local/bin/helm | ||
helm version $version_args | ||
echo "Helm installed" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#/bin/bash | ||
set -e | ||
|
||
helm lint . | ||
# expose the service via ingress, this disables the deployment of nginx | ||
helm template --set "expose.type=ingress" --output-dir /tmp/ . | ||
# expose the service via node port, this enables the deployment of nginx | ||
helm template --set "expose.type=nodePort,expose.tls.commonName=127.0.0.1" --output-dir /tmp/ . |