CrashLoopBackOff fixed #7
This file contains hidden or 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
| name: Zero-Trust Trading Engine Pipeline | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| jobs: | |
| devsecops-pipeline: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: SAST Scan | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y cppcheck | |
| cppcheck --error-exitcode=1 --enable=all --suppress=missingIncludeSystem . | |
| - name: Build Container Image | |
| run: docker build -t trading-engine:${{ github.sha }} . | |
| - name: Container Image Scan | |
| uses: aquasecurity/trivy-action@master | |
| with: | |
| image-ref: 'trading-engine:${{ github.sha }}' | |
| format: 'table' | |
| exit-code: '1' | |
| ignore-unfixed: true | |
| vuln-type: 'os,library' | |
| severity: 'CRITICAL,HIGH' | |
| - name: Create Kubernetes Cluster | |
| uses: helm/kind-action@v1.8.0 | |
| - name: Load Image into Kubernetes | |
| run: | | |
| docker tag trading-engine:${{ github.sha }} trading-engine:latest | |
| kind load docker-image trading-engine:latest --name chart-testing | |
| - name: Deploy to Kubernetes | |
| run: | | |
| kubectl apply -f k8s/deployment.yaml | |
| kubectl apply -f k8s/service.yaml | |
| kubectl rollout status deployment/trading-engine-deployment --timeout=90s | |
| - name: Verify Deployment | |
| run: kubectl get pods,svc |