-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chart(build): Push chart to Docker Hub OCI-based registry (#2319)
Signed-off-by: Viet Nguyen Duc <[email protected]>
- Loading branch information
Showing
5 changed files
with
80 additions
and
17 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
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,22 @@ | ||
#!/bin/bash | ||
set -x | ||
|
||
NAMESPACE=${NAMESPACE:-"selenium"} | ||
# Function to be executed on command failure | ||
on_failure() { | ||
local exit_status=$? | ||
echo "There is step failed with exit status $exit_status" | ||
exit $exit_status | ||
} | ||
|
||
# Trap ERR signal and call on_failure function | ||
trap 'on_failure' ERR | ||
|
||
CHART_PACKAGE_PATH=$(cat /tmp/selenium_chart_version) | ||
if [ -z "${CHART_PACKAGE_PATH}" ] || [ ! -f "${CHART_PACKAGE_PATH}" ]; then | ||
echo "Chart package path is empty. Please trigger chart_build.sh before this script." | ||
exit 1 | ||
fi | ||
|
||
echo "Pushing chart package to the registry" | ||
helm push ${CHART_PACKAGE_PATH} oci://registry-1.docker.io/${NAMESPACE} |