Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Products by brand and multi erkhet (#4718)
- Loading branch information
1 parent
fd63ef2
commit bbf4fd8
Showing
106 changed files
with
11,035 additions
and
52 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Plugin multierkhet Api CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
- master | ||
- staging | ||
- build-test | ||
paths: | ||
- 'packages/api-utils/**' | ||
- 'packages/plugin-multierkhet-api/**' | ||
- '.github/workflows/plugin-multierkhet-api.yaml' | ||
pull_request: | ||
branches: | ||
- dev | ||
- master | ||
- staging | ||
- build-test | ||
paths: | ||
- 'packages/api-utils/**' | ||
- 'packages/plugin-multierkhet-api/**' | ||
- '.github/workflows/plugin-multierkhet-api.yaml' | ||
|
||
jobs: | ||
api: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js 18.17.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.17.x | ||
|
||
# https://github.com/actions/cache/blob/main/examples.md#node---yarn | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | ||
|
||
- uses: actions/cache@v3 | ||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-api-plugin-multierkhet | ||
restore-keys: | | ||
${{ runner.os }}-yarn-api- | ||
${{ runner.os }}-yarn- | ||
- name: Build | ||
run: | | ||
cp -r builder dist | ||
cd dist | ||
yarn install | ||
yarn build plugin multierkhet | ||
- 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' ) | ||
run: | | ||
cd dist/erxes | ||
echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin | ||
docker buildx build -t erxes/plugin-multierkhet-api:${GITHUB_REF#refs/heads/} -f Dockerfile . | ||
docker push erxes/plugin-multierkhet-api:${GITHUB_REF#refs/heads/} |
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,99 @@ | ||
name: Plugin multierkhet UI CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
- master | ||
- staging | ||
- build-test | ||
paths: | ||
- 'packages/erxes-ui/**' | ||
- 'packages/ui-plugin-template/**' | ||
- 'packages/ui-cards/**' | ||
- 'packages/ui-forms/**' | ||
- 'packages/ui-inbox/**' | ||
- 'packages/ui-knowledgebase/**' | ||
- 'packages/ui-leads/**' | ||
- 'packages/ui-log/**' | ||
- 'packages/ui-notifications/**' | ||
- 'packages/ui-products/**' | ||
- 'packages/ui-segments/**' | ||
- 'packages/ui-settings/**' | ||
- 'packages/ui-team/**' | ||
- 'packages/ui-tags/**' | ||
- 'packages/ui-multierkhet/**' | ||
- 'packages/plugin-multierkhet-ui/**' | ||
- '.github/workflows/plugin-multierkhet-ui.yaml' | ||
pull_request: | ||
branches: | ||
- dev | ||
- master | ||
- staging | ||
- build-test | ||
paths: | ||
- 'packages/erxes-ui/**' | ||
- 'packages/ui-plugin-template/**' | ||
- 'packages/ui-cards/**' | ||
- 'packages/ui-forms/**' | ||
- 'packages/ui-inbox/**' | ||
- 'packages/ui-knowledgebase/**' | ||
- 'packages/ui-leads/**' | ||
- 'packages/ui-log/**' | ||
- 'packages/ui-notifications/**' | ||
- 'packages/ui-products/**' | ||
- 'packages/ui-segments/**' | ||
- 'packages/ui-settings/**' | ||
- 'packages/ui-team/**' | ||
- 'packages/ui-tags/**' | ||
- 'packages/ui-multierkhet/**' | ||
- 'packages/plugin-multierkhet-ui/**' | ||
- '.github/workflows/plugin-multierkhet-ui.yaml' | ||
|
||
jobs: | ||
ui: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js 18.17.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.17.x | ||
|
||
# https://github.com/actions/cache/blob/main/examples.md#node---yarn | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | ||
|
||
- uses: actions/cache@v3 | ||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn # since the yarn install runs at workspace level | ||
restore-keys: | | ||
${{ runner.os }}-yarn | ||
- name: Build | ||
run: | | ||
yarn install --frozen-lockfile | ||
cd packages/plugin-multierkhet-ui | ||
yarn build | ||
cp -r ./src/locales/ ./dist/locales 2>/dev/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') | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
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') | ||
run: | | ||
tar -cf build.tar --directory=packages/plugin-multierkhet-ui/dist . | ||
cp build.tar packages/plugin-multierkhet-ui/dist | ||
rm -rf packages/plugin-multierkhet-ui/dist/*.js | ||
aws s3 sync packages/plugin-multierkhet-ui/dist s3://erxes-${GITHUB_REF#refs/heads/}-plugins/uis/plugin-multierkhet-ui --delete |
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
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,25 @@ | ||
# general | ||
NODE_ENV=development | ||
PORT=4015 | ||
|
||
ENABLED_SERVICES_PATH= | ||
|
||
# public urls | ||
MAIN_API_DOMAIN=http://localhost:3300 | ||
|
||
# MongoDB | ||
MONGO_URL=mongodb://localhost/erxes_tags | ||
TEST_MONGO_URL=mongodb://localhost/erxes-tags-test | ||
API_MONGO_URL=mongodb://localhost/erxes | ||
|
||
# RabbitMQ | ||
RABBITMQ_HOST=amqp://localhost | ||
|
||
# Redis | ||
REDIS_HOST=localhost | ||
REDIS_PORT=6379 | ||
REDIS_PASSWORD=123 | ||
|
||
ERKHET_URL=https://erkhet.biz | ||
ERKHET_RABBITMQ_HOST=amqp://localhost | ||
ERKHET_MESSAGE_BROKER_PREFIX=1 |
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,11 @@ | ||
{ | ||
"name": "@erxes/plugin-multierkhet-api", | ||
"version": "1.0.0", | ||
"scripts": { | ||
"dev": "nodemon src/index.ts", | ||
"build" : "tsc" | ||
}, | ||
"dependencies": { | ||
"@erxes/api-utils": "*" | ||
} | ||
} |
Oops, something went wrong.