Skip to content

Commit

Permalink
Merge branch 'next' into develop
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/deploy-pm4.yml
#	composer.json
#	composer.lock
  • Loading branch information
ryancooley committed Feb 23, 2024
2 parents 8bf8da7 + 56548da commit ebb3703
Show file tree
Hide file tree
Showing 555 changed files with 38,444 additions and 28,353 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ BROWSER_CACHE=true
VUE_APP_WEBSOCKET_PROVIDER=socket.io
VUE_APP_WEBSOCKET_PROVIDER_URL=ws:127.0.0.1:1234
VUE_APP_COLLABORATIVE_ENABLED=true
SAML_SP_DESTINATION="https://keycloak.processmaker.net/realms/realmname/broker/saml/endpoint"
30 changes: 15 additions & 15 deletions .github/workflows/deploy-pm4.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: deploy-k8s
run-name: ${{ github.actor }} send deploy EKS 🚀
on:
on:
pull_request:
types: [opened, reopened, synchronize, edited, closed]
#schedule:
Expand All @@ -10,7 +10,7 @@ on:
env:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
aws-region: ${{ secrets.AWS_REGION }}
AWS_URL: ${{ secrets.AWS_URL }}
pull_req_id: ${{github.event.pull_request.number}}
DATE: $(date -d '-1 day' '+%Y-%m-%d'|sed 's/-//g')
Expand All @@ -32,7 +32,7 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
imageEKS:
imageEKS:
name: build-docker-image-EKS
if: github.event.action != 'closed'
runs-on: ${{ vars.RUNNER }}
Expand All @@ -44,7 +44,7 @@ jobs:
- name: Clone repo K8S
run: |
echo "IMAGE: ${{ env.IMAGE }}"
git clone --depth 1 -b "$K8S_BRANCH" "https://[email protected]/ProcessMaker/pm4-k8s-distribution.git" pm4-k8s-distribution
git clone --depth 1 -b "$K8S_BRANCH" "https://[email protected]/ProcessMaker/pm4-k8s-distribution.git" pm4-k8s-distribution
- name: Generate image EKS
run: |
cd pm4-k8s-distribution/images
Expand Down Expand Up @@ -74,16 +74,16 @@ jobs:
- name: Push Enterprise Image to Harbor
run: |
docker tag processmaker/enterprise:${{env.IMAGE_TAG}} ${{ secrets.REGISTRY_HOST }}/processmaker/enterprise:${{env.IMAGE_TAG}}
docker push ${{ secrets.REGISTRY_HOST }}/processmaker/enterprise:${{env.IMAGE_TAG}}
docker push ${{ secrets.REGISTRY_HOST }}/processmaker/enterprise:${{env.IMAGE_TAG}}
deployEKS:
name: build-deploy-EKS
if: contains(github.event.pull_request.body, 'ci:deploy')
needs: imageEKS
runs-on: ${{ vars.RUNNER }}
steps:
steps:
- name: Clone private repository
run: |
git clone --depth 1 -b eng "https://[email protected]/ProcessMaker/argocd.git" argocd
git clone --depth 1 -b eng "https://[email protected]/ProcessMaker/argocd.git" argocd
- name: Install pm4-tools
run: |
git clone --depth 1 -b "$K8S_BRANCH" "https://[email protected]/ProcessMaker/pm4-k8s-distribution.git" pm4-k8s-distribution
Expand All @@ -103,7 +103,7 @@ jobs:
sudo mv kubectl /usr/local/bin/
- name: Authenticate with Amazon EKS
run: aws eks update-kubeconfig --region us-east-1 --name pm4-eng
- name: Deploy instance EKS
- name: Deploy instance EKS
run: |
cd argocd
deploy=$(echo -n ${{env.IMAGE_TAG}} | md5sum | head -c 10)
Expand Down Expand Up @@ -142,8 +142,8 @@ jobs:
name: Delete Instance
if: github.event.action == 'closed'
runs-on: self-hosted
steps:
- name: Delete instance EKS
steps:
- name: Delete instance EKS
run: |
deploy=$(echo -n $IMAGE_TAG | md5sum | head -c 10)
if kubectl get namespace/ci-$deploy-ns-pm4 ; then
Expand All @@ -152,20 +152,20 @@ jobs:
kubectl delete namespace ci-$deploy-ns-pm4
else
echo "The pull request does not have an instance on K8s [https://ci-$deploy.engk8s.processmaker.net] not found!!"
fi
runPhpUnit:
fi
runPhpUnit:
name: run-phpunit
if: github.event.action != 'closed'
needs: imageEKS
runs-on: ${{ vars.RUNNER }}
steps:
- name: Export Params
- name: Export Params
run: |
echo "IMAGE=${{ secrets.REGISTRY_HOST }}/processmaker/enterprise:${{env.IMAGE_TAG}}" >> $GITHUB_ENV
- name: Clone repo K8S
run: |
echo "IMAGE: ${{ env.IMAGE }}"
git clone --depth 1 -b "$K8S_BRANCH" "https://[email protected]/ProcessMaker/pm4-k8s-distribution.git" pm4-k8s-distribution
git clone --depth 1 -b "$K8S_BRANCH" "https://[email protected]/ProcessMaker/pm4-k8s-distribution.git" pm4-k8s-distribution
- name: Login to Harbor
uses: docker/login-action@v2
with:
Expand All @@ -178,4 +178,4 @@ jobs:
docker pull $IMAGE
docker-compose down -v
docker-compose build phpunit
docker-compose run phpunit
docker-compose run phpunit
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,10 @@ npm.sh
laravel-echo-server.lock
public/.htaccess
coverage
cypress/screenshots
cypress/videos
cypress/downloads
.phpunit.result.cache
.php-cs-fixer.cache
.phpunit.result.cache
.editorconfig
resources/lang/de
resources/lang/es
resources/lang/fr
resources/lang/fr
5 changes: 5 additions & 0 deletions ProcessMaker/Ai/Handlers/LanguageTranslationHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ public function setProcessId($processId)
$this->processId = $processId;
}

public function getPromptsPath()
{
return app_path() . '/Ai/Prompts/';
}

public function getPromptFile($type = null)
{
return file_get_contents($this->getPromptsPath() . 'language_translation_' . $type . '.md');
Expand Down
93 changes: 0 additions & 93 deletions ProcessMaker/Ai/Handlers/NlqToCategoryHandler.php

This file was deleted.

89 changes: 0 additions & 89 deletions ProcessMaker/Ai/Handlers/NlqToPmqlHandler.php

This file was deleted.

18 changes: 4 additions & 14 deletions ProcessMaker/Ai/Handlers/OpenAiHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ public function __construct()
{
}

public function getPromptsPath()
public function getConfig()
{
return app_path() . '/Ai/Prompts/';
return $this->config;
}

public function getConfig()
public function getQuestion()
{
return $this->config;
return $this->question;
}

public function setModel(String $model)
Expand Down Expand Up @@ -65,16 +65,6 @@ public function setPresencePenalty(float $presencePenalty)
$this->config['presence_penalty'] = $presencePenalty;
}

public function saveResponse(string $type, string $response)
{
$aiSearch = new AiSearch();
$aiSearch->type = $type;
$aiSearch->search = $this->question;
$aiSearch->response = $response;
$aiSearch->user_id = \Auth::user()->id;
$aiSearch->save();
}

abstract public function getPromptFile($type = null);

abstract public function generatePrompt(String $type = null, String $description);
Expand Down
16 changes: 0 additions & 16 deletions ProcessMaker/Ai/Prompts/nlq_to_category.md

This file was deleted.

Loading

0 comments on commit ebb3703

Please sign in to comment.