-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
64 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 |
---|---|---|
|
@@ -22,8 +22,7 @@ jobs: | |
|
||
outputs: | ||
wire_builds_target_branches: ${{ steps.output_target_branches.outputs.wire_builds_target_branches }} | ||
# chart_version: ${{ steps.publish_helm_chart.outputs.chart_version }} | ||
|
||
chart_version: ${{ steps.publish_helm_chart.outputs.chart_version }} | ||
|
||
steps: | ||
- name: Checkout | ||
|
@@ -209,3 +208,66 @@ jobs: | |
body_path: ./CHANGELOG.md | ||
draft: false | ||
prerelease: false | ||
|
||
publish_wire_builds: | ||
name: Bump account-pages chart in wire-builds | ||
runs-on: ubuntu-latest | ||
needs: test_build_deploy | ||
|
||
strategy: | ||
matrix: | ||
target_branch: ${{fromJSON(needs.test_build_deploy.outputs.wire_builds_target_branches)}} | ||
|
||
steps: | ||
- name: Check out wire-builds | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: wireapp/wire-builds | ||
token: ${{secrets.WIRE_BUILDS_WRITE_ACCESS_GH_TOKEN}} | ||
ref: ${{matrix.target_branch}} | ||
fetch-depth: 1 | ||
|
||
- name: Create new build in wire-build | ||
shell: bash | ||
run: | | ||
set -eo pipefail | ||
chart_version="${{needs.test_build_deploy.outputs.chart_version}}" | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Zebot" | ||
image_tag="${{needs.test_build_deploy.outputs.image_tag}}" | ||
for retry in $(seq 3); do | ||
( | ||
set -e | ||
if (( retry > 1 )); then | ||
echo "Retrying..." | ||
fi | ||
git fetch --depth 1 origin "${{ matrix.target_branch }}" | ||
git checkout "${{ matrix.target_branch }}" | ||
git reset --hard @{upstream} | ||
build_json=$(cat ./build.json | \ | ||
./bin/set-chart-fields webapp \ | ||
"version=$chart_version" \ | ||
"repo=https://s3-eu-west-1.amazonaws.com/public.wire.com/charts-webapp" \ | ||
"meta.appVersion=$image_tag" \ | ||
"meta.commitURL=${{github.event.head_commit.url}}" \ | ||
"meta.commit=${{github.event.head_commit.id}}" \ | ||
| ./bin/bump-prerelease ) | ||
echo "$build_json" > ./build.json | ||
git add build.json | ||
git commit -m "Bump account-pages to $chart_version" | ||
git push origin "${{ matrix.target_branch }}" | ||
) && break | ||
done | ||
if (( $? != 0 )); then | ||
echo "Retrying didn't help. Failing the step." | ||
exit 1 | ||
fi |