-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue publshing umbrella charts (#15)
- Loading branch information
1 parent
e16a013
commit 47025c7
Showing
1 changed file
with
32 additions
and
8 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 |
---|---|---|
|
@@ -8,11 +8,6 @@ on: | |
branches: | ||
- main | ||
|
||
env: | ||
CHARTS_REPO_URL: https://charts.aetherproject.org | ||
CHARTS_DIR: charts | ||
REF_CHARTS_DIR: charts-ref | ||
|
||
jobs: | ||
# CAUTION: Other actions depend on this name "tag-github" | ||
tag-github: | ||
|
@@ -70,6 +65,11 @@ jobs: | |
runs-on: ubuntu-latest | ||
needs: tag-github | ||
if: needs.tag-github.outputs.changed == 'true' | ||
env: | ||
CHARTS_REPO_URL: https://charts.aetherproject.org | ||
CHARTS_DIR: charts | ||
REF_CHARTS_DIR: charts-ref | ||
UMBRELLA_CHARTS: ./sdcore-helm-charts | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
|
@@ -81,14 +81,14 @@ jobs: | |
|
||
- name: Get current Index.yaml | ||
run: | | ||
mkdir -p ${{ env.REF_CHARTS_DIR }} | ||
rm -rf ${{ env.REF_CHARTS_DIR }} && mkdir -p ${{ env.REF_CHARTS_DIR }} | ||
curl -o ${{ env.REF_CHARTS_DIR }}/index.yaml ${{ env.CHARTS_REPO_URL }}/index.yaml | ||
- name: Find all Charts and Package them | ||
run: | | ||
mkdir -p ${{ env.CHARTS_DIR }} | ||
rm -rf ${{ env.CHARTS_DIR }} && mkdir -p ${{ env.CHARTS_DIR }} | ||
for dir in $(find . -maxdepth 1 -mindepth 1 -type d); do | ||
if [[ -f "$dir/Chart.yaml" ]]; then | ||
if [[ -f "$dir/Chart.yaml" ]] && [[ "$dir" != ${{ env.UMBRELLA_CHARTS }} ]]; then | ||
echo "Packaging charts for: $dir" | ||
helm dependency update "$dir" | ||
helm package "$dir" --destination ${{ env.CHARTS_DIR }} | ||
|
@@ -117,6 +117,30 @@ jobs: | |
remote_key: ${{ secrets.JENKINS_SSHKEY }} | ||
remote_key_pass: ${{ secrets.JENKINS_PASSPHRASE }} | ||
|
||
- name: Get current Index.yaml | ||
run: | | ||
rm -rf ${{ env.REF_CHARTS_DIR }} && mkdir -p ${{ env.REF_CHARTS_DIR }} | ||
curl -o ${{ env.REF_CHARTS_DIR }}/index.yaml ${{ env.CHARTS_REPO_URL }}/index.yaml | ||
- name: Find all Charts and Package them | ||
run: | | ||
rm -rf ${{ env.CHARTS_DIR }} && mkdir -p ${{ env.CHARTS_DIR }} | ||
echo "Packaging charts for: ${{ env.UMBRELLA_CHARTS }}" | ||
helm dependency update "${{ env.UMBRELLA_CHARTS }}" | ||
helm package "${{ env.UMBRELLA_CHARTS }}" --destination ${{ env.CHARTS_DIR }} | ||
helm repo index ${{ env.CHARTS_DIR }} --url ${{ env.CHARTS_REPO_URL }} --merge ${{ env.REF_CHARTS_DIR }}/index.yaml | ||
- name: rsync deployments | ||
uses: burnett01/[email protected] | ||
with: | ||
switches: -avh | ||
path: ${{ env.CHARTS_DIR }} | ||
remote_path: /srv/sites/charts.aetherproject.org/ | ||
remote_host: static.opennetworking.org | ||
remote_user: ${{ secrets.JENKINS_USERNAME }} | ||
remote_key: ${{ secrets.JENKINS_SSHKEY }} | ||
remote_key_pass: ${{ secrets.JENKINS_PASSPHRASE }} | ||
|
||
update-version: | ||
runs-on: ubuntu-latest | ||
needs: tag-github | ||
|