-
Notifications
You must be signed in to change notification settings - Fork 828
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(project): support America deploy (#1436)
- Loading branch information
1 parent
d0fed00
commit 53c84b1
Showing
62 changed files
with
381 additions
and
49 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,79 @@ | ||
name: Deploy Flat Web Dev | ||
on: | ||
push: | ||
branches: | ||
- "main" | ||
paths: | ||
- "config/**" | ||
- "web/flat-web/**" | ||
- "packages/flat-components/src/**" | ||
- "packages/flat-i18n/locales/**" | ||
- "packages/flat-types/src/**" | ||
- ".github/workflows/deploy-web-dev-us.yml" | ||
|
||
jobs: | ||
deploy-flat-web-dev: | ||
environment: development | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install dependencies | ||
run: | | ||
node ./scripts/ci/remove-workspace-packages.js web | ||
node ./scripts/ci/remove-package-scripts-hooks.js | ||
# failure automatically retries 3 times | ||
yarn run bootstrap || yarn run bootstrap || yarn run bootstrap | ||
- name: Build flat web development | ||
run: yarn workspace flat-web build:us -m development | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Reset dockerignore | ||
run: | | ||
echo "*" > .dockerignore | ||
echo "!web/flat-web/dist" >> .dockerignore | ||
echo "!web/flat-web/deploy/nginx" >> .dockerignore | ||
- name: Build and push images | ||
env: | ||
COMMIT_SHA_TAG: development-${{ github.sha }} | ||
LATEST_DEV_TAG: dev-latest | ||
PRIVATE_DOCKERHUB_REGISTRY: ${{ secrets.PRIVATE_DOCKERHUB_REGISTRY }} | ||
PRIVATE_DOCKERHUB_USERNAME: ${{ secrets.PRIVATE_DOCKERHUB_USERNAME }} | ||
PRIVATE_DOCKERHUB_PASSWORD: ${{ secrets.PRIVATE_DOCKERHUB_PASSWORD }} | ||
run: | | ||
docker build . -f web/flat-web/deploy/Dockerfile -t agoraflat/flat-web-us:$COMMIT_SHA_TAG -t agoraflat/flat-web-us:$LATEST_DEV_TAG -t $PRIVATE_DOCKERHUB_REGISTRY/agoraflat/flat-web-us:$COMMIT_SHA_TAG -t $PRIVATE_DOCKERHUB_REGISTRY/agoraflat/flat-web-us:$LATEST_DEV_TAG | ||
docker push agoraflat/flat-web-us:$COMMIT_SHA_TAG | ||
docker push agoraflat/flat-web-us:$LATEST_DEV_TAG | ||
docker login -u $PRIVATE_DOCKERHUB_USERNAME -p $PRIVATE_DOCKERHUB_PASSWORD $PRIVATE_DOCKERHUB_REGISTRY | ||
docker push $PRIVATE_DOCKERHUB_REGISTRY/agoraflat/flat-web-us:$COMMIT_SHA_TAG | ||
docker push $PRIVATE_DOCKERHUB_REGISTRY/agoraflat/flat-web-us:$LATEST_DEV_TAG | ||
- name: Prep helm chart | ||
env: | ||
DOCKER_IMAGE_NAME: ${{ secrets.PRIVATE_DOCKERHUB_REGISTRY }}/agoraflat/flat-web-us | ||
DOCKER_IMAGE_TAG: development-${{ github.sha }} | ||
run: | | ||
export APPVERSION=development-${{ github.sha }} | ||
export CHART=./web/flat-web/helm/Chart.yaml | ||
sed -i "s/^appVersion:.*$/appVersion: $APPVERSION/" $CHART | ||
export VALUE=./web/flat-web/helm/values.yaml | ||
sed -i "s|DOCKER_IMAGE_NAME|$DOCKER_IMAGE_NAME|" $VALUE | ||
sed -i "s|DOCKER_IMAGE_TAG|$DOCKER_IMAGE_TAG|" $VALUE | ||
- name: Deploy | ||
uses: WyriHaximus/github-action-helm3@v2 | ||
with: | ||
exec: helm upgrade flat-web ./web/flat-web/helm --install --wait --atomic --namespace=default | ||
kubeconfig: '${{ secrets.KUBECONFIG_US }}' |
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,79 @@ | ||
name: Deploy Flat Web Prod | ||
on: | ||
push: | ||
branches: | ||
- "stable" | ||
- "only-deploy-prod-web" | ||
paths: | ||
- "config/**" | ||
- "web/flat-web/**" | ||
- "packages/flat-components/src/**" | ||
- "packages/flat-i18n/locales/**" | ||
- "packages/flat-types/src/**" | ||
- ".github/workflows/deploy-web-prod-us.yml" | ||
|
||
jobs: | ||
deploy-flat-web-prod: | ||
environment: production | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install dependencies | ||
run: | | ||
node ./scripts/ci/remove-workspace-packages.js web | ||
node ./scripts/ci/remove-package-scripts-hooks.js | ||
# failure automatically retries 3 times | ||
yarn run bootstrap || yarn run bootstrap || yarn run bootstrap | ||
- name: Build flat web production | ||
run: yarn workspace flat-web build:us -m production | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Reset dockerignore | ||
run: | | ||
echo "*" > .dockerignore | ||
echo "!web/flat-web/dist" >> .dockerignore | ||
echo "!web/flat-web/deploy/nginx" >> .dockerignore | ||
- name: Build and push images production | ||
env: | ||
COMMIT_SHA_TAG: production-${{ github.sha }} | ||
LATEST_PROD_TAG: latest | ||
PRIVATE_DOCKERHUB_REGISTRY: ${{ secrets.PRIVATE_DOCKERHUB_REGISTRY }} | ||
PRIVATE_DOCKERHUB_USERNAME: ${{ secrets.PRIVATE_DOCKERHUB_USERNAME }} | ||
PRIVATE_DOCKERHUB_PASSWORD: ${{ secrets.PRIVATE_DOCKERHUB_PASSWORD }} | ||
run: | | ||
docker build . -f web/flat-web/deploy/Dockerfile -t agoraflat/flat-web-us:$COMMIT_SHA_TAG -t agoraflat/flat-web-us:$LATEST_PROD_TAG -t $PRIVATE_DOCKERHUB_REGISTRY/agoraflat/flat-web-us:$COMMIT_SHA_TAG -t $PRIVATE_DOCKERHUB_REGISTRY/agoraflat/flat-web-us:$LATEST_PROD_TAG | ||
docker push agoraflat/flat-web-us:$COMMIT_SHA_TAG | ||
docker push agoraflat/flat-web-us:$LATEST_PROD_TAG | ||
docker login -u $PRIVATE_DOCKERHUB_USERNAME -p $PRIVATE_DOCKERHUB_PASSWORD $PRIVATE_DOCKERHUB_REGISTRY | ||
docker push $PRIVATE_DOCKERHUB_REGISTRY/agoraflat/flat-web-us:$COMMIT_SHA_TAG | ||
docker push $PRIVATE_DOCKERHUB_REGISTRY/agoraflat/flat-web-us:$LATEST_PROD_TAG | ||
- name: Prep helm chart | ||
env: | ||
DOCKER_IMAGE_NAME: ${{ secrets.PRIVATE_DOCKERHUB_REGISTRY }}/agoraflat/flat-web-us | ||
DOCKER_IMAGE_TAG: production-${{ github.sha }} | ||
run: | | ||
export APPVERSION=production-${{ github.sha }} | ||
export CHART=./web/flat-web/helm/Chart.yaml | ||
sed -i "s/^appVersion:.*$/appVersion: $APPVERSION/" $CHART | ||
export VALUE=./web/flat-web/helm/values.yaml | ||
sed -i "s|DOCKER_IMAGE_NAME|$DOCKER_IMAGE_NAME|" $VALUE | ||
sed -i "s|DOCKER_IMAGE_TAG|$DOCKER_IMAGE_TAG|" $VALUE | ||
- name: Deploy | ||
uses: WyriHaximus/github-action-helm3@v2 | ||
with: | ||
exec: helm upgrade flat-web ./web/flat-web/helm --install --wait --atomic --namespace=default | ||
kubeconfig: '${{ secrets.KUBECONFIG_US }}' |
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 |
---|---|---|
|
@@ -122,9 +122,6 @@ dist | |
.yarn/install-state.gz | ||
.pnp.* | ||
|
||
# Icon must end with two \r | ||
Icon | ||
|
||
# Thumbnails | ||
._* | ||
|
||
|
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,32 @@ | ||
NETLESS_APP_IDENTIFIER=n9q1oBxDEeyuBMn1qc0iFw/fLgNSEvdwKjlig | ||
AGORA_APP_ID=931b86d6781e49a2a255db4ce6e8e804 | ||
GITHUB_CLIENT_ID=0ac608815326aead5db7 | ||
WECHAT_APP_ID=wx1133c2153a45e9b8 | ||
AGORA_OAUTH_CLIENT_ID=flat-dev | ||
|
||
CLOUD_STORAGE_OSS_ALIBABA_ACCESS_KEY=LTAI5t9Gb6tzQzzLmB6cTVf7 | ||
CLOUD_STORAGE_OSS_ALIBABA_BUCKET=flat-storage | ||
CLOUD_STORAGE_OSS_ALIBABA_REGION=oss-cn-hangzhou | ||
|
||
CLOUD_STORAGE_DOMAIN=https://flat-storage-[region].whiteboard.agora.io | ||
|
||
FLAT_SERVER_DOMAIN=api-dev.flat.agora.io | ||
UPDATE_DOMAIN=https://flat-storage.oss-cn-hangzhou.aliyuncs.com/versions-america | ||
FLAT_WEB_DOMAIN=web-dev.flat.agora.io | ||
|
||
FLAT_DOWNLOAD_URL=https://flat.whiteboard.agora.io/#download | ||
|
||
CLOUD_RECORDING_DEFAULT_AVATAR=https://flat-storage.oss-cn-hangzhou.aliyuncs.com/flat-resources/cloud-recording/default-avatar.jpg | ||
|
||
SKIP_MAC_NOTARIZE= | ||
APPLE_API_ISSUER= | ||
APPLE_API_KEY= | ||
|
||
WINDOWS_CODE_SIGNING_CA_PATH= | ||
WINDOWS_CODE_SIGNING_CA_PASSWORD= | ||
|
||
ARTIFACTS_ALIBABA_CLOUD_OSS_BUCKET= | ||
ARTIFACTS_ALIBABA_CLOUD_OSS_REGION= | ||
ARTIFACTS_ALIBABA_CLOUD_OSS_FOLDER=versions | ||
ARTIFACTS_ALIBABA_CLOUD_OSS_ACCESS_KEY= | ||
ARTIFACTS_ALIBABA_CLOUD_OSS_ACCESS_KEY_SECRET= |
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,32 @@ | ||
NETLESS_APP_IDENTIFIER=cFjxAJjiEeuUQ0211QCRBw/mO9uJB_DiCIqug | ||
AGORA_APP_ID=931b86d6781e49a2a255db4ce6e8e804 | ||
GITHUB_CLIENT_ID=da83d7e14217594fba46 | ||
WECHAT_APP_ID=wx96d522d69d384cce | ||
AGORA_OAUTH_CLIENT_ID=flat | ||
|
||
CLOUD_STORAGE_OSS_ALIBABA_ACCESS_KEY=LTAI5t9Gb6tzQzzLmB6cTVf7 | ||
CLOUD_STORAGE_OSS_ALIBABA_BUCKET=flat-storage | ||
CLOUD_STORAGE_OSS_ALIBABA_REGION=oss-cn-hangzhou | ||
|
||
CLOUD_STORAGE_DOMAIN=https://flat-storage-[region].whiteboard.agora.io | ||
|
||
FLAT_SERVER_DOMAIN=api.flat.agora.io | ||
UPDATE_DOMAIN=https://flat-storage.oss-cn-hangzhou.aliyuncs.com/versions-america | ||
FLAT_WEB_DOMAIN=web.flat.agora.io | ||
|
||
FLAT_DOWNLOAD_URL=https://flat.whiteboard.agora.io/#download | ||
|
||
CLOUD_RECORDING_DEFAULT_AVATAR=https://flat-storage.oss-cn-hangzhou.aliyuncs.com/flat-resources/cloud-recording/default-avatar.jpg | ||
|
||
SKIP_MAC_NOTARIZE= | ||
APPLE_API_ISSUER= | ||
APPLE_API_KEY= | ||
|
||
WINDOWS_CODE_SIGNING_CA_PATH= | ||
WINDOWS_CODE_SIGNING_CA_PASSWORD= | ||
|
||
ARTIFACTS_ALIBABA_CLOUD_OSS_BUCKET= | ||
ARTIFACTS_ALIBABA_CLOUD_OSS_REGION= | ||
ARTIFACTS_ALIBABA_CLOUD_OSS_FOLDER=versions | ||
ARTIFACTS_ALIBABA_CLOUD_OSS_ACCESS_KEY= | ||
ARTIFACTS_ALIBABA_CLOUD_OSS_ACCESS_KEY_SECRET= |
File renamed without changes.
File renamed without changes.
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,62 @@ | ||
appId: io.agora.flint | ||
productName: Flint | ||
artifactName: Flint-${version}.${ext} | ||
asar: true | ||
|
||
extraMetadata: | ||
main: main.js | ||
|
||
files: | ||
- filter: | ||
- package.json | ||
- from: ./dist | ||
|
||
mac: | ||
category: public.app-category.productivity | ||
hardenedRuntime: true | ||
entitlements: entitlements.mac.plist | ||
entitlementsInherit: entitlements.mac.plist | ||
gatekeeperAssess: false | ||
extendInfo: | ||
LSHasLocalizedDisplayName: true | ||
CFBundleURLTypes: | ||
- CFBundleURLName: x-agora-flat-client | ||
CFBundleURLSchemes: | ||
- x-agora-flat-client | ||
NSPrincipalClass: AtomApplication | ||
target: | ||
- dmg | ||
- zip | ||
|
||
dmg: | ||
contents: | ||
- { x: 130, y: 220 } | ||
- { x: 410, y: 220, type: link, path: /Applications } | ||
|
||
win: | ||
target: | ||
- target: zip | ||
- target: nsis | ||
arch: | ||
- ia32 | ||
|
||
protocols: | ||
- name: Agora Flat Client | ||
schemes: | ||
- x-agora-flat-client | ||
|
||
nsis: | ||
oneClick: false | ||
perMachine: true | ||
createDesktopShortcut: true | ||
createStartMenuShortcut: true | ||
allowToChangeInstallationDirectory: true | ||
installerIcon: resources/install.ico | ||
shortcutName: Flint | ||
artifactName: Flint-${version}.${ext} | ||
|
||
directories: | ||
buildResources: | ||
|
||
releaseInfo: | ||
releaseNotes: |
File renamed without changes.
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
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 |
---|---|---|
@@ -1,11 +1,5 @@ | ||
const path = require("path"); | ||
const semver = require("semver"); | ||
const packageJSON = require("../package.json"); | ||
|
||
const agoraElectronSdkPath = path.join(require.resolve("agora-electron-sdk"), "..", ".."); | ||
|
||
const prerelease = semver.prerelease(packageJSON.version); | ||
const releaseTag = prerelease === null ? "stable" : prerelease[0]; | ||
|
||
module.exports.agoraElectronSdkPath = agoraElectronSdkPath; | ||
module.exports.releaseTag = releaseTag; |
Oops, something went wrong.