1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-22 11:45:59 +01:00

Add EE specific web container image (#3604)

* Add build command for ee

* Add config for ee

* Add build workflow for ee

* Change build pipeline for web ee

* Fix name of workflow in trigger

* Build ee image in web build workflow

* Fix name on matrix

* FIx name of the artifact

* Comment out zip extract

* Add zip extract

* All listing dir before unzip

* Add pwd

* Comment out unzipping

* Fix

* Add matrix instead of two stages

* Remove build web ee workflow

* Fix name
This commit is contained in:
Michał Chęciński 2022-09-29 12:21:47 +02:00 committed by GitHub
parent 24a7abbba7
commit b91e2919b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 39 additions and 27 deletions

View File

@ -1,16 +0,0 @@
---
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'

View File

@ -80,6 +80,8 @@ jobs:
npm_command: "dist:bit:selfhost"
- name: "cloud-QA"
npm_command: "build:bit:qa"
- name: "ee"
npm_command: "build:bit:ee"
steps:
- name: Checkout repo
@ -234,12 +236,20 @@ jobs:
- name: Log out of Docker
run: docker logout
build-qa:
name: Build Docker images for QA environment
build-containers:
name: Build Docker images for bitwardenqa
runs-on: ubuntu-22.04
needs:
- setup
- build-artifacts
strategy:
fail-fast: false
matrix:
include:
- artifact_name: cloud-QA
image_name: web
- artifact_name: ee
image_name: web-ee
env:
_VERSION: ${{ needs.setup.outputs.version }}
steps:
@ -254,17 +264,17 @@ jobs:
- name: Log into container registry
run: az acr login -n bitwardenqa
- name: Download cloud-QA artifact
- name: Download ${{ matrix.artifact_name }} artifact
uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741
with:
name: web-${{ env._VERSION }}-cloud-QA.zip
name: web-${{ env._VERSION }}-${{ matrix.artifact_name }}.zip
path: apps/web/build
- name: Build Docker image
working-directory: apps/web
run: |
docker --version
docker build -t bitwardenqa.azurecr.io/web .
docker build -t bitwardenqa.azurecr.io/${{ matrix.image_name }} .
- name: Get image tag
id: image-tag
@ -286,25 +296,30 @@ jobs:
- name: Tag image
env:
IMAGE_TAG: ${{ steps.image-tag.outputs.value }}
run: docker tag bitwardenqa.azurecr.io/web "bitwardenqa.azurecr.io/web:$IMAGE_TAG"
IMAGE_NAME: ${{ matrix.image_name }}
run: docker tag bitwardenqa.azurecr.io/$IMAGE_NAME "bitwardenqa.azurecr.io/$IMAGE_NAME:$IMAGE_TAG"
- name: Tag dev
if: github.ref == 'refs/heads/master'
run: docker tag bitwardenqa.azurecr.io/web bitwardenqa.azurecr.io/web:dev
env:
IMAGE_NAME: ${{ matrix.image_name }}
run: docker tag bitwardenqa.azurecr.io/web "bitwardenqa.azurecr.io/$IMAGE_NAME:dev"
- name: Push image
env:
IMAGE_TAG: ${{ steps.image-tag.outputs.value }}
run: docker push "bitwardenqa.azurecr.io/web:$IMAGE_TAG"
IMAGE_NAME: ${{ matrix.image_name }}
run: docker push "bitwardenqa.azurecr.io/$IMAGE_NAME:$IMAGE_TAG"
- name: Push dev images
if: github.ref == 'refs/heads/master'
run: docker push bitwardenqa.azurecr.io/web:dev
env:
IMAGE_NAME: ${{ matrix.image_name }}
run: docker push "bitwardenqa.azurecr.io/$IMAGE_NAME:dev"
- name: Log out of Docker
run: docker logout
crowdin-push:
name: Crowdin Push
if: github.ref == 'refs/heads/master'
@ -355,8 +370,8 @@ jobs:
- cloc
- setup
- build-artifacts
- build-containers
- build-commercial-selfhost-image
- build-qa
- crowdin-push
steps:
- name: Check if any job failed

12
apps/web/config/ee.json Normal file
View File

@ -0,0 +1,12 @@
{
"dev": {
"proxyApi": "http://localhost:4001",
"proxyIdentity": "http://localhost:33657",
"proxyEvents": "http://localhost:46274",
"proxyNotifications": "http://localhost:61841",
"port": 8081
},
"flags": {
"showTrial": false
}
}

View File

@ -15,6 +15,7 @@
"build:bit:selfhost:watch": "cross-env ENV=selfhosted npm run build:bit:watch",
"build:oss:selfhost:prod": "cross-env ENV=selfhosted NODE_ENV=production npm run build:oss",
"build:bit:selfhost:prod": "cross-env ENV=selfhosted NODE_ENV=production npm run build:bit",
"build:bit:ee": "cross-env NODE_ENV=production ENV=ee npm run build:bit",
"clean:l10n": "git push origin --delete l10n_master",
"dist:bit:cloud": "npm run build:bit:cloud",
"dist:oss:selfhost": "npm run build:oss:selfhost:prod",