Skip to content

Commit

Permalink
Merge branch 'master' into EC-377-transition-policy-service-into-prov…
Browse files Browse the repository at this point in the history
…iding-observables
  • Loading branch information
r-tome committed Sep 27, 2022
2 parents b654fd3 + 5ffa3cc commit 3bf3523
Show file tree
Hide file tree
Showing 285 changed files with 6,569 additions and 1,213 deletions.
35 changes: 33 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"browser": true,
"webextensions": true
},
"plugins": ["@typescript-eslint", "rxjs", "rxjs-angular"],
"plugins": ["@typescript-eslint", "rxjs", "rxjs-angular", "import"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": ["./tsconfig.eslint.json"],
Expand All @@ -18,6 +18,16 @@
"prettier",
"plugin:rxjs/recommended"
],
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts"]
},
"import/resolver": {
"typescript": {
"alwaysTryTypes": true
}
}
},
"rules": {
"@typescript-eslint/no-explicit-any": "off", // TODO: This should be re-enabled
"@typescript-eslint/no-unused-vars": ["error", { "args": "none" }],
Expand Down Expand Up @@ -65,6 +75,27 @@
"selector": "CallExpression[callee.name='svgIcon']"
}
],
"curly": ["error", "all"]
"curly": ["error", "all"],
"import/namespace": ["off"], // This doesn't resolve namespace imports correctly, but TS will throw for this anyway
"import/no-restricted-paths": [
"error",
{
"zones": [
// Do not allow angular/node/electron code to be imported into common
{
"target": "./libs/common/**/*",
"from": "./libs/angular/**/*"
},
{
"target": "./libs/common/**/*",
"from": "./libs/node/**/*"
},
{
"target": "./libs/common/**/*",
"from": "./libs/electron/**/*"
}
]
}
]
}
}
16 changes: 16 additions & 0 deletions .github/workflows/build-web-ee.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Build Web for EE

on:
workflow_dispatch:

jobs:
stub:
name: stub
runs-on: ubuntu-20.04
steps:
- name: Checkout repo
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2

- name: Stub
run: print 'This is only a stub'
22 changes: 7 additions & 15 deletions .github/workflows/build-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,11 @@ jobs:
working-directory: apps/web
run: npm run ${{ matrix.npm_command }}

- name: Package ${{ matrix.name }} artifact
working-directory: apps/web
run: zip -r web-$_VERSION-${{ matrix.name }}.zip build

- name: Upload ${{ matrix.name }} artifact
uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535 # v3.0.0
with:
name: web-${{ env._VERSION }}-${{ matrix.name }}.zip
path: apps/web/web-${{ env._VERSION }}-${{ matrix.name }}.zip
path: apps/web/build
if-no-files-found: error

build-commercial-selfhost-image:
Expand Down Expand Up @@ -155,11 +151,7 @@ jobs:
uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741
with:
name: web-${{ env._VERSION }}-selfhosted-COMMERCIAL.zip
path: apps/web

- name: Extract selfhosted-COMMERCIAL artifact
working-directory: apps/web
run: unzip web-${{ env._VERSION }}-selfhosted-COMMERCIAL.zip
path: apps/web/build

- name: Build Docker image
working-directory: apps/web
Expand Down Expand Up @@ -266,11 +258,7 @@ jobs:
uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741
with:
name: web-${{ env._VERSION }}-cloud-QA.zip
path: apps/web

- name: Extract cloud-QA artifact
working-directory: apps/web
run: unzip web-${{ env._VERSION }}-cloud-QA.zip
path: apps/web/build

- name: Build Docker image
working-directory: apps/web
Expand Down Expand Up @@ -367,6 +355,7 @@ jobs:
- cloc
- setup
- build-artifacts
- build-commercial-selfhost-image
- build-qa
- crowdin-push
steps:
Expand All @@ -376,6 +365,7 @@ jobs:
CLOC_STATUS: ${{ needs.cloc.result }}
SETUP_STATUS: ${{ needs.setup.result }}
ARTIFACT_STATUS: ${{ needs.build-artifacts.result }}
BUILD_SELFHOST_STATUS: ${{ needs.build-commercial-selfhost-image.result }}
BUILD_QA_STATUS: ${{ needs.build-qa.result }}
CROWDIN_PUSH_STATUS: ${{ needs.crowdin-push.result }}
run: |
Expand All @@ -385,6 +375,8 @@ jobs:
exit 1
elif [ "$ARTIFACT_STATUS" = "failure" ]; then
exit 1
elif [ "$BUILD_SELFHOST_STATUS" = "failure" ]; then
exit 1
elif [ "$BUILD_QA_STATUS" = "failure" ]; then
exit 1
elif [ "$CROWDIN_PUSH_STATUS" = "failure" ]; then
Expand Down
84 changes: 1 addition & 83 deletions .github/workflows/release-qa-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,94 +2,12 @@
name: QA - Web Release

on:
workflow_dispatch:
inputs:
image_extension:
description: "Image tag extension"
required: false
azure_publish:
description: 'Release to Azure'
required: false
default: true
type: boolean
cloudflare_publish:
description: 'Release to Cloudflare'
required: false
default: true
type: boolean

env:
_QA_CLUSTER_RESOURCE_GROUP: "bw-env-qa"
_QA_CLUSTER_NAME: "bw-aks-qa"
_QA_K8S_NAMESPACE: "bw-qa"
_QA_K8S_APP_NAME: "bw-web"
workflow_dispatch: {}

jobs:
deploy:
name: Deploy QA Web
if: inputs.azure_publish
runs-on: ubuntu-20.04
steps:
- name: Checkout Repo
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2

- name: Setup
run: export PATH=$PATH:~/work/web/web

- name: Login to Azure
uses: Azure/login@ec3c14589bd3e9312b3cc8c41e6860e258df9010 # v1.1
with:
creds: ${{ secrets.AZURE_QA_KV_CREDENTIALS }}

- name: Retrieve secrets
id: retrieve-secrets
env:
KEYVAULT: bitwarden-qa-kv
SECRETS: |
qa-aks-kubectl-credentials
run: |
for i in ${SECRETS//,/ }
do
VALUE=$(az keyvault secret show --vault-name $KEYVAULT --name $i --query value --output tsv)
echo "::add-mask::$VALUE"
echo "::set-output name=$i::$VALUE"
done
- name: Login with qa-aks-kubectl-credentials SP
uses: Azure/login@ec3c14589bd3e9312b3cc8c41e6860e258df9010 # v1.1
with:
creds: ${{ env.qa-aks-kubectl-credentials }}

- name: Setup AKS access
run: |
echo "---az install---"
az aks install-cli --install-location ./kubectl --kubelogin-install-location ./kubelogin
echo "---az get-creds---"
az aks get-credentials -n $_QA_CLUSTER_NAME -g $_QA_CLUSTER_RESOURCE_GROUP
- name: Get image tag
id: image_tag
run: |
IMAGE_TAG=$(echo "${GITHUB_REF:11}" | sed "s#/#-#g")
TAG_EXTENSION=${{ github.event.inputs.image_extension }}
if [[ $TAG_EXTENSION ]]; then
IMAGE_TAG=$IMAGE_TAG-$TAG_EXTENSION
fi
echo "::set-output name=value::$IMAGE_TAG"
- name: Deploy Web image
env:
IMAGE_TAG: ${{ steps.image_tag.outputs.value }}
run: |
kubectl set image -n $_QA_K8S_NAMESPACE deployment/web web=bitwardenqa.azurecr.io/web:$IMAGE_TAG --record
kubectl rollout restart -n $_QA_K8S_NAMESPACE deployment/web
kubectl rollout status deployment/web -n $_QA_K8S_NAMESPACE
cfpages-deploy:
name: Deploy Web Vault to QA CloudFlare Pages branch
runs-on: ubuntu-20.04
if: inputs.cloudflare_publish
steps:
- name: Create GitHub deployment
uses: chrnorm/deployment-action@1b599fe41a0ef1f95191e7f2eec4743f2d7dfc48
Expand Down
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@ libs/.github

# Github Workflows
.github/workflows

# Forked library files
libs/common/src/types/deep-jsonify.ts
12 changes: 6 additions & 6 deletions apps/browser/src/_locales/ar/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -500,13 +500,13 @@
"message": "هل أنت متأكد من حذف هذا المجلّد؟"
},
"deletedFolder": {
"message": "Deleted folder"
"message": "تم حذف المجلد"
},
"gettingStartedTutorial": {
"message": "Getting Started Tutorial"
"message": "لنبدأ نتعلم معاً"
},
"gettingStartedTutorialVideo": {
"message": "Watch our getting started tutorial to learn how to get the most out of the browser extension."
"message": "مشاهدة دروس البَدْء تمكنك من الحصول على أقصى أستفادة من ملحق المتصفح."
},
"syncingComplete": {
"message": "تم إكمال المزامنة"
Expand All @@ -531,13 +531,13 @@
}
},
"newUri": {
"message": "New URI"
"message": "رابط جديد"
},
"addedItem": {
"message": "Added item"
"message": "تمت إضافة العنصر"
},
"editedItem": {
"message": "Edited item"
"message": "تم تعديل العنصر"
},
"deleteItemConfirmation": {
"message": "هل تريد حقاً أن ترسل إلى سلة المهملات؟"
Expand Down
Loading

0 comments on commit 3bf3523

Please sign in to comment.