Skip to content

Commit

Permalink
chore: merge with dev
Browse files Browse the repository at this point in the history
  • Loading branch information
tlebon committed Oct 23, 2023
2 parents 2f6c9d7 + dc9fef4 commit d500b7f
Show file tree
Hide file tree
Showing 515 changed files with 31,407 additions and 35,015 deletions.
2 changes: 1 addition & 1 deletion .env.localhost
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ APP_BASE="https://local.zinfra.io:8081"

FORCED_CONFIG_URL="https://github.com/wireapp/wire-web-config-wire"

CSP_EXTRA_CONNECT_SRC="http://localhost:32123, ws://localhost:32123, https://*.zinfra.io, https://*.wire.link, https://*.wire.com, https://api.raygun.io, wss://*.zinfra.io, wss://*.wire.link, wss://prod-nginz-ssl.wire.com, https://wire.count.ly"
CSP_EXTRA_CONNECT_SRC="http://localhost:32123, ws://localhost:32123, https://*.zinfra.io, https://*.wire.link, https://*.wire.com, https://api.raygun.io, wss://*.zinfra.io, wss://*.wire.link, wss://prod-nginz-ssl.wire.com, https://wire.count.ly, https://balderdash.hogwash.work:9000, https://balderdash.hogwash.work:5556, https://accounts.google.com, https://oauth2.googleapis.com/token"
CSP_EXTRA_IMG_SRC="https://*.zinfra.io, https://*.wire.com, https://*.wire.link"
CSP_EXTRA_SCRIPT_SRC="http://localhost:32123, https://*.zinfra.io, https://*.wire.com, https://*.wire.link, https://api.raygun.io"
ENFORCE_HTTPS="false"
Expand Down
17 changes: 17 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## Description

## Screenshots/Screencast (for UI changes)

## Checklist

- [ ] PR has been self reviewed by the author;
- [ ] Hard-to-understand areas of the code have been commented;
- [ ] If it is a core feature, unit tests have been added;

### Important details for the reviewers

(Delete this section if unnecessary)

- use (x) data
- can be reviewed commit-by-commit
- be sure to look at ...
22 changes: 5 additions & 17 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,13 @@ updates:
open-pull-requests-limit: 99
labels:
- 'type: chore 🧹'
groups:
eslint:
patterns:
- '*eslint*'

ignore:
- dependency-name: core-js
versions:
- '>= 3.a'
- dependency-name: webrtc-adapter
versions:
- '>= 7.a'
- dependency-name: 'less'
versions:
- '>= 4'
- dependency-name: 'husky'
versions:
- '>= 5.a'
- dependency-name: 'tsyringe'
versions:
- '> 4.3.0'
- dependency-name: '@wireapp/avs'
- dependency-name: 'autoprefixer'
- dependency-name: 'cssnano'

# Server dependencies
- package-ecosystem: npm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
language: ['javascript']
steps:
- name: 'Checkout repository'
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: 'Initialize CodeQL'
uses: github/codeql-action/init@v2
with:
Expand Down
37 changes: 31 additions & 6 deletions .github/workflows/create_docker_image.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
name: Create Docker image
name: Create Release Artifact

on:
workflow_dispatch:
inputs:
tag:
description: 'tagname for the Docker image'
description: 'tagname for the Artifact'
required: true
type: string

create_release:
description: 'Wether or not a release entry should be created on github'
required: false
default: true
type: boolean

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
test_build_deploy:
create_image:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -32,13 +38,32 @@ jobs:
run: yarn --immutable

- name: Test
run: yarn test --coverage --coverage-reporters=lcov --detectOpenHandles=false
run: |
set -o pipefail
yarn test --coverage --coverage-reporters=lcov --detectOpenHandles=false 2>&1 | tee ./unit-tests.log
- name: Build
run: yarn build:prod

- name: Set short sha
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

- name: Push Docker image
env:
DOCKER_PASSWORD: ${{secrets.WEBTEAM_QUAY_PASSWORD}}
DOCKER_USERNAME: ${{secrets.WEBTEAM_QUAY_USERNAME}}
run: yarn docker '' "${{inputs.tag}}"
run: yarn docker "${{inputs.tag}}-${{ steps.vars.outputs.sha_short }}"

- name: Create GitHub release
if: ${{inputs.create_release}}
id: create_release_production
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{github.token}}
with:
tag_name: ${{inputs.tag}}
name: ${{inputs.tag}}
files: ./unit-tests.log
draft: false
prerelease: true
2 changes: 1 addition & 1 deletion .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1.5.1
uses: dependabot/fetch-metadata@v1.6.0
with:
github-token: '${{secrets.WEBTEAM_AUTOMERGE_TOKEN}}'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: 'Dependency Review'
uses: actions/dependency-review-action@v3
3 changes: 1 addition & 2 deletions .github/workflows/deploy-to-test-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:
type: choice
options:
- wire-webapp-qa-al2-migration
- wire-webapp-edge-al2
- wire-webapp-mls-al2

concurrency:
Expand All @@ -32,7 +31,7 @@ jobs:
echo -e "env = ${{inputs.env}}"
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/jira-lint-and-link.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
add-jira-description:
runs-on: ubuntu-latest
steps:
- uses: cakeinpanic/jira-description-action@v0.4.0
- uses: cakeinpanic/jira-description-action@v0.7.0
name: jira-description-action
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

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

- name: Setup Node.js
uses: actions/setup-node@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/semantic-commit-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
# Please look up the latest version from
# https://github.com/amannn/action-semantic-pull-request/releases
- name: Run Semantic Commint Linter
uses: amannn/action-semantic-pull-request@v5.2.0
uses: amannn/action-semantic-pull-request@v5.3.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
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 @@ -17,7 +17,7 @@ jobs:

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

- name: Setup Node.js
uses: actions/setup-node@v3
Expand All @@ -37,7 +37,7 @@ jobs:
run: yarn translate:merge

- name: Download translations
uses: crowdin/github-action@v1.11.0
uses: crowdin/github-action@v1.13.1
env:
GITHUB_TOKEN: ${{secrets.OTTO_THE_BOT_GH_TOKEN}}
CROWDIN_PROJECT_ID: 342359
Expand Down
36 changes: 30 additions & 6 deletions .github/workflows/test_build_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down Expand Up @@ -93,11 +93,19 @@ jobs:
key: '${{github.ref}}'
map: |
{
"edge": { "dev_env": "wire-webapp-edge-al2" },
"dev": { "dev_env": "wire-webapp-dev-al2" },
"master": { "dev_env": "wire-webapp-master-al2" }
}
- uses: kanga333/variable-mapper@master
with:
# We try to map a branch to a dev environment
key: '${{github.ref}}'
map: |
{
"dev": { "preprod_env": "wire-webapp-edge-al2" }
}
- uses: kanga333/variable-mapper@master
with:
# We try to map a tag to a dev environment
Expand Down Expand Up @@ -147,6 +155,22 @@ jobs:
wait_for_deployment: false
wait_for_environment_recovery: ${{env.DEPLOYMENT_RECOVERY_TIMEOUT_SECONDS}}

- name: Deploy to pre-prod env
if: env.preprod_env
uses: einaregilsson/beanstalk-deploy@v21
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: ${{env.preprod_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}}

- name: Deploy to prod env
if: env.prod_env
uses: einaregilsson/beanstalk-deploy@v21
Expand All @@ -172,21 +196,21 @@ jobs:
env:
DOCKER_PASSWORD: ${{secrets.WEBTEAM_QUAY_PASSWORD}}
DOCKER_USERNAME: ${{secrets.WEBTEAM_QUAY_USERNAME}}
run: yarn docker '' "${{env.BRANCH_NAME}}"
run: yarn docker "${{env.BRANCH_NAME}}"

- name: Push staging Docker image
if: contains(env.TAG, 'staging')
env:
DOCKER_PASSWORD: ${{secrets.WEBTEAM_QUAY_PASSWORD}}
DOCKER_USERNAME: ${{secrets.WEBTEAM_QUAY_USERNAME}}
run: yarn docker '' staging "$TAG"
run: yarn docker staging "$TAG"

- name: Push production Docker image
if: contains(env.TAG, 'production')
env:
DOCKER_PASSWORD: ${{secrets.WEBTEAM_QUAY_PASSWORD}}
DOCKER_USERNAME: ${{secrets.WEBTEAM_QUAY_USERNAME}}
run: yarn docker '' production "$TAG"
run: yarn docker production "$TAG"

- name: Generate changelog for production release
if: contains(env.TAG, 'production')
Expand Down Expand Up @@ -287,7 +311,7 @@ jobs:
echo "::set-output name=releaseInfo::$(cat ${ARTIFACT_LOCAL_PATH})"
- name: Checking out 'wire-server'
uses: actions/checkout@v3
uses: actions/checkout@v4
if: ${{ steps.release-info-file.outputs.exists == 'true' }}
with:
repository: 'wireapp/wire-server'
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install lint-staged && yarn check:circular-dependencies
yarn lint-staged
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20-alpine
FROM node:21-alpine

# For some extra dependencies...
RUN apk add --no-cache dumb-init git bash
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Wire™

[![We are hiring](https://github.com/wireapp/wire/blob/master/assets/header-small.png?raw=true)](https://wire.softgarden.io/en/vacancies)
[![We are hiring](https://github.com/wireapp/wire/blob/master/assets/header-small.png?raw=true)](https://www.linkedin.com/company/wire-secure-communication/jobs/)

This repository is part of the source code of Wire. You can find more information at [wire.com](https://wire.com) or by contacting [email protected].

Expand Down
4 changes: 2 additions & 2 deletions app-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"dependencies": {
"wire-web-config-default-master": "https://github.com/wireapp/wire-web-config-wire#v0.31.16-0",
"wire-web-config-default-staging": "https://github.com/wireapp/wire-web-config-default#v0.31.15"
"wire-web-config-default-master": "https://github.com/wireapp/wire-web-config-wire#v0.31.19-0",
"wire-web-config-default-staging": "https://github.com/wireapp/wire-web-config-default#v0.31.18"
}
}
20 changes: 8 additions & 12 deletions bin/push_docker.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,18 @@ require('dotenv').config();
* Note: You must run "yarn build:prod" before creating the Docker image, otherwise the compiled JavaScript code (and other assets) won't be part of the bundle.
*
* Demo execution:
* yarn docker '' staging '2021-08-25' '1240cfda9e609470cf1154e18f5bc582ca8907ff'
* yarn docker staging '2021-08-25' '1240cfda9e609470cf1154e18f5bc582ca8907ff'
*/

/** Either empty (for our own cloud releases) or a suffix (i.e. "ey") for custom deployments */
const distributionParam = process.argv[2] || '';
/** Either "staging" (for internal releases / staging bumps) or "production" (for cloud releases) */
const stageParam = process.argv[3] || '';
const stageParam = process.argv[2] || '';
/** Version tag of webapp (i.e. "2021-08-25") */
const versionParam = process.argv[4] || '';
const versionParam = process.argv[3] || '';
/** Commit ID of https://github.com/wireapp/wire-webapp (i.e. "1240cfda9e609470cf1154e18f5bc582ca8907ff") */
const commitSha = process.env.GITHUB_SHA || process.argv[5];
const commitSha = process.env.GITHUB_SHA || process.argv[4];
const commitShortSha = commitSha.substring(0, 7);
/** Defines which config version (listed in "app-config/package.json") is going to be used */
const configurationEntry = `wire-web-config-default-${
distributionParam || stageParam === 'production' ? 'master' : 'staging'
}`;
const configVersion = appConfigPkg.dependencies[configurationEntry].split('#')[1];
const dockerRegistryDomain = 'quay.io';
const repository = `${dockerRegistryDomain}/wire/webapp${distributionParam ? `-${distributionParam}` : ''}`;
const repository = `${dockerRegistryDomain}/wire/webapp`;

const tags = [];

Expand All @@ -61,6 +54,9 @@ if (stageParam) {
}

if (['production', 'staging'].includes(stageParam)) {
/** Defines which config version (listed in "app-config/package.json") is going to be used */
const configurationEntry = `wire-web-config-default-${stageParam === 'production' ? 'master' : 'staging'}`;
const configVersion = appConfigPkg.dependencies[configurationEntry].split('#')[1];
tags.push(`${repository}:${versionParam}-${configVersion}-${commitShortSha}`);
}

Expand Down
Loading

0 comments on commit d500b7f

Please sign in to comment.