-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Theia Helm chart to release (#69)
Signed-off-by: Yanjun Zhou <[email protected]>
- Loading branch information
Showing
7 changed files
with
127 additions
and
3 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
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 |
---|---|---|
@@ -1,6 +1,10 @@ | ||
USERID := $(shell id -u) | ||
GRPID := $(shell id -g) | ||
|
||
VERSION := $(shell head -n 1 ../../VERSION | cut -c 2-) | ||
|
||
.PHONY: helm-docs | ||
helm-docs: | ||
docker run --rm --volume "$(CURDIR):/helm-docs" --user=$(USERID):$(GRPID) jnorwood/helm-docs:v1.7.0 | ||
sed -i.bak "s/0.0.0/$(VERSION)/g" theia/README.md # replace version placeholder | ||
sed -i.bak "s/-dev-informational/--dev-informational/g" theia/README.md # fix img.shields.io badge URLs |
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 |
---|---|---|
@@ -1 +1,5 @@ | ||
Theia has been successfully installed. | ||
Theia has been successfully installed | ||
|
||
You are using version {{ .Chart.Version }} | ||
|
||
For the Antrea documentation, please visit https://antrea.io |
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,93 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright 2022 Antrea Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
set -eo pipefail | ||
|
||
function echoerr { | ||
>&2 echo "$@" | ||
} | ||
|
||
_usage="Usage: $0 [--mode (dev|release)] --out <DIR> | ||
Package the Theia chart into a chart archive. | ||
Environment variable VERSION must be set. | ||
--out <DIR> Output directory for chart archive | ||
--help, -h Print this message and exit | ||
You can set the HELM environment variable to the path of the helm binary you want us to | ||
use. Otherwise we will download the appropriate version of the helm binary and use it." | ||
|
||
function print_usage { | ||
echoerr "$_usage" | ||
} | ||
|
||
function print_help { | ||
echoerr "Try '$0 --help' for more information." | ||
} | ||
|
||
MODE="dev" | ||
OUT="" | ||
|
||
while [[ $# -gt 0 ]] | ||
do | ||
key="$1" | ||
|
||
case $key in | ||
--mode) | ||
MODE="$2" | ||
shift 2 | ||
;; | ||
--out) | ||
OUT="$2" | ||
shift 2 | ||
;; | ||
-h|--help) | ||
print_usage | ||
exit 0 | ||
;; | ||
*) # unknown option | ||
echoerr "Unknown option $1" | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
|
||
if [ -z "$VERSION" ]; then | ||
echoerr "Environment variable VERSION must be set" | ||
print_help | ||
exit 1 | ||
fi | ||
|
||
if [ "$OUT" == "" ]; then | ||
echoerr "--out is required to provide output path" | ||
print_help | ||
exit 1 | ||
fi | ||
|
||
THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
|
||
source $THIS_DIR/verify-helm.sh | ||
|
||
if [ -z "$HELM" ]; then | ||
HELM="$(verify_helm)" | ||
elif ! $HELM version > /dev/null 2>&1; then | ||
echoerr "$HELM does not appear to be a valid helm binary" | ||
print_help | ||
exit 1 | ||
fi | ||
|
||
THEIA_CHART="$THIS_DIR/../build/charts/theia" | ||
$HELM package --app-version $VERSION --version $VERSION $THEIA_CHART | ||
mv "theia-$VERSION.tgz" "$OUT/theia-chart.tgz" |
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