Skip to content

Commit

Permalink
feat(core): merge saas with os
Browse files Browse the repository at this point in the history
  • Loading branch information
Enkhtuvshin0513 committed Feb 20, 2024
1 parent b920839 commit 202405a
Show file tree
Hide file tree
Showing 305 changed files with 12,778 additions and 1,512 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/client_portal.yaml
Expand Up @@ -3,7 +3,7 @@ name: Client portal CI
on:
push:
branches:
- dev
- merge-xos
- master
- staging
- build-test
Expand All @@ -13,7 +13,7 @@ on:
pull_request:
branches:
- master
- dev
- merge-xos
- masterelop
- apm
- staging
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
yarn build
- name: Build docker image
if: github.event_name == 'push' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test' )
if: github.event_name == 'push' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/merge-xos' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test' )
run: |
cd client-portal
echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/core.yaml
Expand Up @@ -3,7 +3,7 @@ name: Api core CI
on:
push:
branches:
- dev
- merge-xos
- master
- staging
- build-test
Expand Down Expand Up @@ -46,9 +46,9 @@ jobs:
yarn build core
- name: Build docker image
if: github.event_name == 'push' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test' )
if: github.event_name == 'push' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/merge-xos' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test' )
run: |
cd dist/erxes
echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
docker buildx build -t erxes/core:${GITHUB_REF#refs/heads/} -f Dockerfile .
docker push erxes/core:${GITHUB_REF#refs/heads/}
docker buildx build -t erxes/core:merge-xos -f Dockerfile .
docker push erxes/core:merge-xos
15 changes: 11 additions & 4 deletions .github/workflows/coreui.yaml
Expand Up @@ -3,7 +3,7 @@ name: UI CI
on:
push:
branches:
- dev
- merge-xos
- master
- staging
- build-test
Expand Down Expand Up @@ -48,21 +48,28 @@ jobs:
yarn build
- name: Configure AWS credentials
if: github.event_name == 'push' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging')
if: github.event_name == 'push' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/merge-xos' || github.ref == 'refs/heads/staging')
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2

- name: Deploy locales
if: github.event_name == 'push' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging')
if: github.event_name == 'push' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/merge-xos' || github.ref == 'refs/heads/staging')
run: |
tar -cf locales.tar --directory=packages/core-ui/public/locales .
aws s3 cp locales.tar s3://erxes-${GITHUB_REF#refs/heads/}-plugins/locales.tar
- name: Deploy Core UI
if: github.event_name == 'push' && (github.ref == 'refs/heads/merge-xos')
run: |
tar -czf build.tar --directory=packages/core-ui/dist .
cp build.tar packages/core-ui/dist
aws s3 sync packages/core-ui/dist s3://erxes-merge-xos-plugins/uis/core-ui --delete
- name: Build docker image
if: github.event_name == 'push' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging')
if: github.event_name == 'push' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/merge-xos' || github.ref == 'refs/heads/staging')
env:
BASE_IMAGE: erxes/erxes:base-1.18-alpine
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/crons.yaml
Expand Up @@ -3,7 +3,7 @@ name: Crons CI
on:
push:
branches:
- 'dev'
- 'merge-xos'
- master
- 'staging'
- build-test
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
yarn build crons
- name: Build docker image
if: github.event_name == 'push' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' )
if: github.event_name == 'push' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/merge-xos' || github.ref == 'refs/heads/staging' )
run: |
cd dist/erxes
echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/cypress.yaml
Expand Up @@ -3,7 +3,7 @@ name: Cypress Tests
on:
pull_request:
branches:
- 'dev'
- 'merge-xos'
- master
jobs:
runtest:
Expand Down Expand Up @@ -40,10 +40,10 @@ jobs:
cd packages/gateway
yarn install --save
- name: start with "dev --deps"
- name: start with "merge-xos --deps"
run: |
cd cli
./bin/erxes.js dev --deps
./bin/erxes.js merge-xos --deps
- run: sleep 30

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yaml
Expand Up @@ -10,7 +10,7 @@ on:
pull_request:
branches:
- erxes-docs-blog
- dev
- merge-xos
- masterelop
- master
paths:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/email_verifier.yaml
Expand Up @@ -3,7 +3,7 @@ name: Email Verifier CI
on:
push:
branches:
- dev
- merge-xos
- master
- staging
paths:
Expand All @@ -12,7 +12,7 @@ on:

pull_request:
branches:
- dev
- merge-xos
- master
- staging
paths:
Expand Down Expand Up @@ -63,9 +63,9 @@ jobs:
yarn build
- name: Build docker image
if: github.event_name == 'push' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' )
if: github.event_name == 'push' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/merge-xos' || github.ref == 'refs/heads/staging' )
run: |
cd email-verifier
echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
docker buildx build -t erxes/erxes-email-verifier:${GITHUB_REF#refs/heads/} -f Dockerfile .
docker push erxes/erxes-email-verifier:${GITHUB_REF#refs/heads/}
docker push erxes/erxes-email-verifier:${GITHUB_REF#refs/heads/}
6 changes: 3 additions & 3 deletions .github/workflows/essyncer.yaml
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- master
- dev
- merge-xos
- master
paths:
- 'essyncer/**'
Expand All @@ -13,7 +13,7 @@ on:
pull_request:
branches:
- master
- dev
- merge-xos
- masterelop
paths:
- 'essyncer/**'
Expand All @@ -27,7 +27,7 @@ jobs:
- uses: actions/checkout@v2

- name: Build docker image
if: github.event_name == 'push' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test' )
if: github.event_name == 'push' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/merge-xos' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test' )
run: |
cd essyncer
echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/exm.yaml
Expand Up @@ -3,7 +3,7 @@ name: EXM WEB CI
on:
push:
branches:
- dev
- merge-xos
- master
- staging
- exm-improve
Expand All @@ -13,7 +13,7 @@ on:

pull_request:
branches:
- dev
- merge-xos
- master
- staging
- exm-improve
Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:
yarn build
- name: Build docker image
if: github.event_name == 'push' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/exm-improve')
if: github.event_name == 'push' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/merge-xos' || github.ref == 'refs/heads/exm-improve')
run: |
cd exm-web
echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gateway.yaml
Expand Up @@ -3,7 +3,7 @@ name: Gateway CI
on:
push:
branches:
- 'dev'
- 'merge-xos'
- master
- 'staging'
- build-test
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
yarn build gateway
- name: Build docker image
if: github.event_name == 'push' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test' )
if: github.event_name == 'push' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/merge-xos' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test' )
run: |
cd dist/erxes
echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/mongobi-connector.yaml
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- master
- dev
- merge-xos
- master
paths:
- 'mongobi-connector/**'
Expand All @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v2

- name: Build docker image
if: github.event_name == 'push' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' )
if: github.event_name == 'push' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/merge-xos' )
run: |
cd mongobi-connector
echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/plugin-assets-api.yaml
Expand Up @@ -3,7 +3,7 @@ name: Plugin assets Api CI
on:
push:
branches:
- dev
- merge-xos
- master
- staging
- build-test
Expand All @@ -13,7 +13,7 @@ on:
- '.github/workflows/plugin-assets-api.yaml'
pull_request:
branches:
- dev
- merge-xos
- master
- staging
- build-test
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
yarn build plugin assets
- name: Build docker image
if: github.event_name == 'push' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test' )
if: github.event_name == 'push' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/merge-xos' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test' )
run: |
cd dist/erxes
echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/plugin-assets-ui.yaml
Expand Up @@ -3,7 +3,7 @@ name: Plugin assets UI CI
on:
push:
branches:
- dev
- merge-xos
- master
- staging
- build-test
Expand All @@ -27,7 +27,7 @@ on:
- '.github/workflows/plugin-assets-ui.yaml'
pull_request:
branches:
- dev
- merge-xos
- master
- staging
- build-test
Expand Down Expand Up @@ -80,20 +80,19 @@ jobs:
yarn install --frozen-lockfile
cd packages/plugin-assets-ui
yarn build
cp -r ./src/locales/ ./dist/locales 2>/dev/null || true
cp -r ./src/locales/ ./dist/locales 2>/merge-xos/null || true
- name: Configure AWS credentials
if: github.event_name == 'push' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test')
if: github.event_name == 'push' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/merge-xos' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test')
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2

- name: Deploy
if: github.event_name == 'push' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test')
if: github.event_name == 'push' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/merge-xos' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test')
run: |
tar -cf build.tar --directory=packages/plugin-assets-ui/dist .
cp build.tar packages/plugin-assets-ui/dist
rm -rf packages/plugin-assets-ui/dist/*.js
aws s3 sync packages/plugin-assets-ui/dist s3://erxes-${GITHUB_REF#refs/heads/}-plugins/uis/plugin-assets-ui --delete
6 changes: 3 additions & 3 deletions .github/workflows/plugin-automations-api.yaml
Expand Up @@ -3,7 +3,7 @@ name: Plugin automations Api CI
on:
push:
branches:
- dev
- merge-xos
- master
- staging
- build-test
Expand All @@ -13,7 +13,7 @@ on:
- '.github/workflows/plugin-automations-api.yaml'
pull_request:
branches:
- dev
- merge-xos
- master
- staging
- build-test
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
yarn build plugin automations
- name: Build docker image
if: github.event_name == 'push' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test' )
if: github.event_name == 'push' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/merge-xos' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test' )
run: |
cd dist/erxes
echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/plugin-automations-ui.yaml
Expand Up @@ -3,7 +3,7 @@ name: Plugin automations UI CI
on:
push:
branches:
- dev
- merge-xos
- master
- staging
- build-test
Expand All @@ -27,7 +27,7 @@ on:
- '.github/workflows/plugin-automations-ui.yaml'
pull_request:
branches:
- dev
- merge-xos
- master
- staging
- build-test
Expand Down Expand Up @@ -80,20 +80,19 @@ jobs:
yarn install --frozen-lockfile
cd packages/plugin-automations-ui
yarn build
cp -r ./src/locales/ ./dist/locales 2>/dev/null || true
cp -r ./src/locales/ ./dist/locales 2>/merge-xos/null || true
- name: Configure AWS credentials
if: github.event_name == 'push' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test')
if: github.event_name == 'push' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/merge-xos' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test')
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2

- name: Deploy
if: github.event_name == 'push' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test')
if: github.event_name == 'push' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/merge-xos' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test')
run: |
tar -cf build.tar --directory=packages/plugin-automations-ui/dist .
cp build.tar packages/plugin-automations-ui/dist
rm -rf packages/plugin-automations-ui/dist/*.js
aws s3 sync packages/plugin-automations-ui/dist s3://erxes-${GITHUB_REF#refs/heads/}-plugins/uis/plugin-automations-ui --delete

0 comments on commit 202405a

Please sign in to comment.