Skip to content

Commit

Permalink
Merge pull request #4392 from wireapp/staging
Browse files Browse the repository at this point in the history
chore: Release 2024-11-06
  • Loading branch information
V-Gira authored Nov 6, 2024
2 parents 7de724c + 1a9dbc8 commit 219ef9b
Show file tree
Hide file tree
Showing 96 changed files with 25,315 additions and 14,605 deletions.
21 changes: 19 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"env": {
"jasmine": true
},
"parser": "@typescript-eslint/parser",
"plugins": ["jest"],
"extends": ["@wireapp/eslint-config", "plugin:jest/recommended"],
"overrides": [
Expand All @@ -10,16 +11,32 @@
"rules": {
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/typedef": "off",
"no-unused-vars": "off"
"no-unused-vars": "off",
"react/react-in-jsx-scope": "off"
}
}
],
"parserOptions": {
"project": ["./tsconfig.json", "./server/tsconfig.json"]
},
"rules": {
"sort-keys": "off",
"sort-keys-fix/sort-keys-fix": "off",
"id-length": [
"error",
{
"exceptions": ["t"]
}
],
"import/no-default-export": "off",
"jest/no-jasmine-globals": "warn",
"jest/no-try-expect": "off"
"jest/no-try-expect": "off",
"no-magic-numbers": "off",
"react/no-unknown-property": ["error", {"ignore": ["css"]}]
},
"settings": {
"react": {
"version": "detect"
}
}
}
22 changes: 22 additions & 0 deletions .github/workflows/cherry-pick-release-to-dev.yml
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 }}
85 changes: 85 additions & 0 deletions .github/workflows/ci.yml
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}}
5 changes: 2 additions & 3 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ permissions:
jobs:
activate-auto-merge:
runs-on: ubuntu-latest
if: ${{github.actor == 'dependabot[bot]'}}
if: ${{github.actor == 'dependabot[bot]' || github.actor == 'otto-the-bot'}}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1.3.2
uses: dependabot/fetch-metadata@v2.2.0
with:
github-token: '${{secrets.WEBTEAM_AUTOMERGE_TOKEN}}'

Expand All @@ -23,7 +23,6 @@ jobs:
GITHUB_TOKEN: '${{secrets.WEBTEAM_AUTOMERGE_TOKEN}}'

- name: Enable auto-merge for Dependabot PRs
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/deploy-to-test-env.yml
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}}
12 changes: 6 additions & 6 deletions .github/workflows/generate-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ jobs:

steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.10.0
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{github.token}}

- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Yarn cache
uses: c-hive/gha-yarn-cache@v1
uses: c-hive/gha-yarn-cache@v2

- name: Install JS dependencies
run: yarn --frozen-lockfile
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sync_translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Download translations
uses: crowdin/github-action@1.4.9
uses: crowdin/github-action@v2.3.0
env:
GITHUB_TOKEN: ${{github.token}}
CROWDIN_PROJECT_ID: 342361
Expand Down
Loading

0 comments on commit 219ef9b

Please sign in to comment.