diff --git a/.github/workflows/deploy-stockflow.yml b/.github/workflows/deploy-stockflow.yml index 2e0f450..b66472a 100644 --- a/.github/workflows/deploy-stockflow.yml +++ b/.github/workflows/deploy-stockflow.yml @@ -27,5 +27,6 @@ jobs: SF_API_KEY: ${{ secrets.SF_API_KEY }} OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} + SLACK_WEBHOOK_STOCKFLOW: ${{ secrets.SLACK_WEBHOOK_STOCKFLOW }} run: | cd helm/ && bash deploy_helm.sh "${{ secrets.OPENAI_API_KEY }}" "${{ secrets.SMTP_PASSWORD }}" "${{ secrets.SF_API_KEY }}" "${{ inputs.namespace || 'dev' }}" "${{ inputs.image-version || 'dev' }}" "${{ secrets.GEMINI_API_KEY }}" diff --git a/helm/Chart.lock b/helm/Chart.lock new file mode 100644 index 0000000..d94812d --- /dev/null +++ b/helm/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: event-dispatcher + repository: file://../event-dispatcher/helm + version: 26.3.4-1 +digest: sha256:66440893d0609da4e140c52439f0f58d4abc986a3d83394507976f768900be9b +generated: "2026-05-30T06:51:28.2920955Z" diff --git a/helm/Chart.yaml b/helm/Chart.yaml index 9da43eb..6ceacca 100755 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -2,5 +2,10 @@ apiVersion: v2 name: stockflow description: A Helm chart for Stockflow type: application -version: 26.5.24-1 +version: 26.5.30-1 appVersion: "26.5.23" +dependencies: + - name: event-dispatcher + repository: "file://../event-dispatcher/helm" + version: 26.3.4-1 + diff --git a/helm/deploy_helm.sh b/helm/deploy_helm.sh index 774f240..fc7b6c0 100755 --- a/helm/deploy_helm.sh +++ b/helm/deploy_helm.sh @@ -7,6 +7,15 @@ log_message(){ echo "[$time]----[$type]---- $message" } +log_message "INFO" "Pulling Helm chart dependencies" + +mkdir -p ../event-dispatcher +git clone -b release_26.3.4 https://github.com/tekpeek/event-dispatcher.git/ ../event-dispatcher + +log_message "INFO" "Building Helm chart dependencies" + +helm dependency build . + log_message "INFO" "Starting deployment" export OPENAI_API_KEY=$1 @@ -29,7 +38,11 @@ if [ "$NAMESPACE" == "default" ]; then --set apiKey=$API_KEY \ --set namespace=$NAMESPACE \ --set imageVersion=$IMAGE_VERSION \ - --set geminiApiKey=$GEMINI_API_KEY + --set geminiApiKey=$GEMINI_API_KEY \ + --set event-dispatcher.namespace=$NAMESPACE \ + --set event-dispatcher.imageVersion=26.3.4 \ + --set event-dispatcher.slackWebhookStockflow=$SLACK_WEBHOOK_STOCKFLOW + else helm upgrade stockflow --install . -n $NAMESPACE \ --set openaiApiKey=$OPENAI_API_KEY \ @@ -38,10 +51,19 @@ else --set namespace=$NAMESPACE \ --set apiPrefix="/$NAMESPACE" \ --set imageVersion=$IMAGE_VERSION \ - --set geminiApiKey=$GEMINI_API_KEY + --set geminiApiKey=$GEMINI_API_KEY \ + --set event-dispatcher.namespace=$NAMESPACE \ + --set event-dispatcher.imageVersion=26.3.4 \ + --set event-dispatcher.slackWebhookStockflow=$SLACK_WEBHOOK_STOCKFLOW fi log_message "INFO" "Deployment completed." +# Clean up +rm -rf ../event-dispatcher +rm -rf charts + +log_message "INFO" "Clean up completed." + # Execution command ### ./deploy_helm.sh "$OPENAI_API_KEY" "$SMTP_PASSWORD" "$API_KEY" "dev" "dev" "$GEMINI_API_KEY" \ No newline at end of file