Zack Williams | be54231 | 2022-06-23 21:51:32 -0700 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | |
Joey Armstrong | 46bfeea | 2023-07-31 10:39:25 -0400 | [diff] [blame] | 3 | # Copyright 2020-2023 Open Networking Foundation (ONF) and the ONF Contributors |
Zack Williams | be54231 | 2022-06-23 21:51:32 -0700 | [diff] [blame] | 4 | # SPDX-License-Identifier: Apache-2.0 |
| 5 | |
| 6 | set -eu -o pipefail |
| 7 | |
| 8 | export OLD_REPO_DIR="cord-charts-repo" |
| 9 | |
| 10 | # Setup helm and external repos |
Joey Armstrong | 46bfeea | 2023-07-31 10:39:25 -0400 | [diff] [blame] | 11 | cat <<EOM |
| 12 | |
| 13 | ** ----------------------------------------------------------------------- |
| 14 | ** Configure helm and external repos |
| 15 | ** ----------------------------------------------------------------------- |
| 16 | EOM |
| 17 | |
Zack Williams | be54231 | 2022-06-23 21:51:32 -0700 | [diff] [blame] | 18 | helm repo add stable https://charts.helm.sh/stable |
| 19 | helm repo add rook-release https://charts.rook.io/release |
| 20 | helm repo add cord https://charts.opencord.org |
| 21 | |
Joey Armstrong | 46bfeea | 2023-07-31 10:39:25 -0400 | [diff] [blame] | 22 | ## Clone tool chain |
Zack Williams | be54231 | 2022-06-23 21:51:32 -0700 | [diff] [blame] | 23 | git clone ssh://jenkins@gerrit.opencord.org:29418/helm-repo-tools.git |
| 24 | ./helm-repo-tools/helmlint.sh clean |
| 25 | echo "*.lock" >> .gitignore |
| 26 | |
| 27 | # Specify the remote branch to compare against |
| 28 | export COMPARISON_BRANCH="origin/$GERRIT_BRANCH" |
Joey Armstrong | 46bfeea | 2023-07-31 10:39:25 -0400 | [diff] [blame] | 29 | ./helm-repo-tools/chart_version_check.sh # [TODO] make lint-chart |
Zack Williams | be54231 | 2022-06-23 21:51:32 -0700 | [diff] [blame] | 30 | |
| 31 | # Configure git |
| 32 | git config --global user.email "do-not-reply@opennetworking.org" |
| 33 | git config --global user.name "Jenkins" |
| 34 | |
| 35 | # Check for chart version conflicts by building the repo (don't upload) |
| 36 | git clone "ssh://jenkins@gerrit.opencord.org:29418/$OLD_REPO_DIR.git" |
Joey Armstrong | 46bfeea | 2023-07-31 10:39:25 -0400 | [diff] [blame] | 37 | |
| 38 | ./helm-repo-tools/helmrepo.sh # [TODO] make ??? |
| 39 | |
| 40 | # [EOF] |