|
41 | 41 | # API URL parameter: --dfw-api-url http://localhost:8000 |
42 | 42 | # |
43 | 43 | # ============================================================================= |
| 44 | +# Required Secrets: |
| 45 | +# ============================================================================= |
| 46 | +# | Secret | Required | Description | |
| 47 | +# |------------------|----------|------------------------------------------| |
| 48 | +# | NVIDIA_API_KEY | Yes | NVIDIA API Key for hosted NIM services | |
| 49 | +# | NGC_API_KEY | Yes | NGC API Key for container registry | |
| 50 | +# | MONGO_USERNAME | Yes | MongoDB root username | |
| 51 | +# | MONGO_PASSWORD | Yes | MongoDB root password | |
| 52 | +# | REDIS_PASSWORD | Yes | Redis password | |
| 53 | +# | HF_TOKEN | No | Huggingface token (optional) | |
| 54 | +# | SMTP_USERNAME | No | Gmail for email notifications | |
| 55 | +# | SMTP_PASSWORD | No | Gmail app-specific password for SMTP | |
| 56 | +# |
| 57 | +# ============================================================================= |
44 | 58 |
|
45 | 59 | name: CI - Data Flywheel |
46 | 60 |
|
|
100 | 114 | # Test configuration |
101 | 115 | TEST_IMAGE: nvcr.io/rw983xdqtcdp/auto_test_team/blueprint-github-test-image:latest |
102 | 116 | DFW_API_URL: http://localhost:8000 |
103 | | - ENABLE_EMAIL_NOTIFICATION: false |
| 117 | + ENABLE_EMAIL_NOTIFICATION: true |
104 | 118 |
|
105 | 119 | jobs: |
106 | 120 | # =========================================================================== |
@@ -850,3 +864,49 @@ jobs: |
850 | 864 | echo "" |
851 | 865 | echo "--- Celery Worker Logs ---" |
852 | 866 | docker compose -f deploy/docker-compose.yaml logs celery_worker --tail=50 2>/dev/null || echo "No Celery logs available" |
| 867 | +
|
| 868 | + # ========================================================================= |
| 869 | + # Email Notification |
| 870 | + # ========================================================================= |
| 871 | + # Sends email notification with CI results to the QA team. |
| 872 | + # Requires secrets: SMTP_USERNAME, SMTP_PASSWORD |
| 873 | + # ========================================================================= |
| 874 | + - name: Set Result Output |
| 875 | + id: set_result |
| 876 | + if: always() |
| 877 | + run: | |
| 878 | + # Check if all required jobs passed |
| 879 | + if [ "${{ needs.preflight.result }}" == "success" ] && \ |
| 880 | + [ "${{ job.status }}" == "success" ]; then |
| 881 | + echo "RESULT=PASS" >> $GITHUB_OUTPUT |
| 882 | + else |
| 883 | + echo "RESULT=FAIL" >> $GITHUB_OUTPUT |
| 884 | + fi |
| 885 | +
|
| 886 | + - name: Send Email Notification |
| 887 | + uses: dawidd6/action-send-mail@6e71c855c9a091d80a519621b9fd3e8d252ca40c |
| 888 | + if: always() && env.ENABLE_EMAIL_NOTIFICATION == 'true' |
| 889 | + with: |
| 890 | + server_address: smtp.gmail.com |
| 891 | + server_port: 587 |
| 892 | + username: ${{ secrets.SMTP_USERNAME }} |
| 893 | + password: ${{ secrets.SMTP_PASSWORD }} |
| 894 | + subject: "CI Result: AI Model Distillation for Financial Data - ${{ steps.set_result.outputs.RESULT }}" |
| 895 | + |
| 896 | + |
| 897 | + html_body: | |
| 898 | + <h2>AI Model Distillation for Financial Data CI Notification</h2> |
| 899 | + |
| 900 | + <p><strong>Repository:</strong> ${{ github.repository }}</p> |
| 901 | + <p><strong>Branch:</strong> ${{ github.ref_name }}</p> |
| 902 | + <p><strong>Commit:</strong> ${{ github.sha }}</p> |
| 903 | + <p><strong>Result:</strong> <span style="color: ${{ steps.set_result.outputs.RESULT == 'PASS' && 'green' || 'red' }}; font-weight: bold;">${{ steps.set_result.outputs.RESULT }}</span></p> |
| 904 | + |
| 905 | + <h3>Job Results</h3> |
| 906 | + <table border="1" cellpadding="5" cellspacing="0"> |
| 907 | + <tr><th>Job</th><th>Status</th></tr> |
| 908 | + <tr><td>Preflight</td><td>${{ needs.preflight.result }}</td></tr> |
| 909 | + <tr><td>Deploy & Test</td><td>${{ job.status }}</td></tr> |
| 910 | + </table> |
| 911 | + |
| 912 | + <p><a href="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}">View Workflow Run</a></p> |
0 commit comments