-
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.
Merge pull request #4392 from wireapp/staging
chore: Release 2024-11-06
- Loading branch information
Showing
96 changed files
with
25,315 additions
and
14,605 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# This job will automatically create a cherry pick PR from any release/* branch to the staging branch | ||
# It allows the staging branch to stay up-to-date with fixes made to specific release branches | ||
name: Cherry pick to staging | ||
on: | ||
push: | ||
branches: | ||
- release/* | ||
jobs: | ||
cherry_pick: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Create PR to branch | ||
uses: gorillio/github-action-cherry-pick@master | ||
with: | ||
pr_branch: 'staging' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.OTTO_THE_BOT_GH_TOKEN }} |
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,85 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [staging, main] | ||
tags: | ||
- v* | ||
pull_request: | ||
branches: [staging, main, release/*] | ||
|
||
jobs: | ||
test_build_deploy: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
DISTRIBUTION: ['DISTRIBUTION_0'] | ||
|
||
env: | ||
TEST_COVERAGE_FAIL_THRESHOLD: 10 | ||
TEST_COVERAGE_WARNING_THRESHOLD: 50 | ||
DEPLOYMENT_RECOVERY_TIMEOUT_SECONDS: 150 | ||
AWS_APPLICATION_NAME: Account | ||
AWS_BUILD_ZIP_PATH: 'wire-account.zip' | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set environment variables | ||
env: | ||
# DISTRIBUTIONS are saved in the format `distribution-{name}` | ||
DISTRIBUTION: ${{secrets[matrix.DISTRIBUTION]}} | ||
run: | | ||
echo "BRANCH_NAME=$(git branch --show-current)" >> $GITHUB_ENV | ||
echo "TAG=$(git tag --points-at ${{github.sha}})" >> $GITHUB_ENV | ||
echo "COMMIT_MESSAGE=$(git log --format=%B -n 1 ${{github.event.after}} | head -n 1)" >> $GITHUB_ENV | ||
echo "DISTRIBUTION=${DISTRIBUTION/distribution-/}" >> $GITHUB_ENV | ||
- name: Set TITLE | ||
env: | ||
PR_TITLE: ${{github.event.pull_request.title || env.COMMIT_MESSAGE}} | ||
run: echo "TITLE=$PR_TITLE" >> $GITHUB_ENV | ||
|
||
- name: Print environment variables | ||
env: | ||
GITHUB_CONTEXT: ${{toJson(github)}} | ||
run: | | ||
echo -e "BRANCH_NAME = ${BRANCH_NAME}" | ||
echo -e "TAG = ${TAG}" | ||
echo -e "TITLE = ${TITLE}" | ||
echo -e "COMMIT_MESSAGE = ${COMMIT_MESSAGE}" | ||
echo -e "GITHUB_CONTEXT = ${GITHUB_CONTEXT}" | ||
- name: Skip CI | ||
if: contains(env.TITLE || env.COMMIT_MESSAGE, '[skip ci]') || contains(env.TITLE || env.COMMIT_MESSAGE, '[ci skip]') | ||
uses: andymckay/[email protected] | ||
|
||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{github.token}} | ||
|
||
- name: Yarn cache | ||
uses: c-hive/[email protected] | ||
|
||
- name: Authenticate git clone | ||
env: | ||
GH_TOKEN: ${{secrets.OTTO_THE_BOT_GH_TOKEN}} | ||
run: echo -e "machine github.com\n login ${GH_TOKEN}" > ~/.netrc | ||
|
||
- name: Install JS dependencies | ||
run: yarn --immutable | ||
|
||
- name: Test | ||
run: yarn test | ||
|
||
- name: Monitor coverage | ||
if: github.event_name == 'pull_request' && ! contains(github.event.pull_request.user.login, 'dependabot[bot]') | ||
uses: slavcodev/[email protected] | ||
with: | ||
github_token: ${{github.token}} | ||
coverage_path: 'coverage/clover.xml' | ||
threshold_alert: ${{env.TEST_COVERAGE_FAIL_THRESHOLD}} | ||
threshold_warning: ${{env.TEST_COVERAGE_WARNING_THRESHOLD}} |
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,56 @@ | ||
name: Deploys to testing environments | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
env: | ||
description: 'The environment the branch should be deployed to' | ||
required: true | ||
type: choice | ||
options: | ||
- wire-account-staging-al2 | ||
- wire-account-prod-al2 | ||
|
||
concurrency: | ||
group: ci-${{ github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
env: | ||
DEPLOYMENT_RECOVERY_TIMEOUT_SECONDS: 150 | ||
AWS_APPLICATION_NAME: Account | ||
AWS_BUILD_ZIP_PATH: wire-account.zip | ||
steps: | ||
- name: Print environment variables | ||
run: | | ||
echo -e "branch = ${GITHUB_REF_NAME}" | ||
echo -e "env = ${ENV}" | ||
env: | ||
ENV: ${{inputs.env}} | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18.x | ||
cache: 'yarn' | ||
- name: Install JS dependencies | ||
run: yarn --immutable | ||
- name: Build | ||
run: yarn bundle:prod | ||
- name: Deploy to Elastic Beanstalk | ||
uses: einaregilsson/beanstalk-deploy@v22 | ||
with: | ||
application_name: ${{env.AWS_APPLICATION_NAME}} | ||
aws_access_key: ${{secrets.WEBTEAM_AWS_ACCESS_KEY_ID}} | ||
aws_secret_key: ${{secrets.WEBTEAM_AWS_SECRET_ACCESS_KEY}} | ||
deployment_package: ${{env.AWS_BUILD_ZIP_PATH}} | ||
environment_name: ${{inputs.env}} | ||
region: eu-central-1 | ||
use_existing_version_if_available: true | ||
version_description: ${{github.sha}} | ||
version_label: ${{github.run_id}} | ||
wait_for_deployment: false | ||
wait_for_environment_recovery: ${{env.DEPLOYMENT_RECOVERY_TIMEOUT_SECONDS}} |
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 |
---|---|---|
|
@@ -11,29 +11,29 @@ jobs: | |
|
||
steps: | ||
- name: 'Checkout Git repository with history for all branches and tags' | ||
uses: actions/checkout@v2.3.4 | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: 'Set current Git tag' | ||
run: echo "CURRENT_TAG=$(git tag --points-at ${{github.sha}})" >> "$GITHUB_ENV" | ||
|
||
- name: 'Set previous Git tag' | ||
run: echo "PREVIOUS_TAG=$(git describe --tags --abbrev=0 --exclude ${{env.CURRENT_TAG}})" >> "$GITHUB_ENV" | ||
run: echo "PREVIOUS_TAG=$(git describe --tags --abbrev=0 --exclude ${CURRENT_TAG})" >> "$GITHUB_ENV" | ||
|
||
- name: 'Print environment variables' | ||
run: | | ||
echo -e "PREVIOUS_TAG = ${{env.PREVIOUS_TAG}}" | ||
echo -e "CURRENT_TAG = ${{env.CURRENT_TAG}}" | ||
echo -e "PREVIOUS_TAG = ${PREVIOUS_TAG}" | ||
echo -e "CURRENT_TAG = ${CURRENT_TAG}" | ||
echo -e "Node.js version = $(node --version)" | ||
- name: 'Generate changelog' | ||
run: | | ||
echo "{}" > ./package.json | ||
npx [email protected] -t ${{env.PREVIOUS_TAG}}...${{env.CURRENT_TAG}} | ||
npx [email protected] -t ${PREVIOUS_TAG}...${CURRENT_TAG} | ||
- name: 'Attach changelog to tag' | ||
uses: softprops/action-gh-release@v1 | ||
uses: softprops/action-gh-release@v2 | ||
env: | ||
GITHUB_TOKEN: ${{github.token}} | ||
with: | ||
|
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
Oops, something went wrong.