File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ steps :
2+ # Step 1: Install dependencies
3+ - name : ' python'
4+ entrypoint : ' pip'
5+ args : ['install', '-r', 'requirements.txt']
6+
7+ # Step 2: Run tests (optional)
8+ - name : ' python'
9+ entrypoint : ' python'
10+ args : ['-m', 'pytest']
11+
12+ # Step 3: Build Docker image
13+ - name : ' gcr.io/cloud-builders/docker'
14+ args : ['build', '-t', 'gcr.io/$PROJECT_ID/fastapi-app', '.']
15+
16+ # Step 4: Push Docker image to Google Container Registry
17+ - name : ' gcr.io/cloud-builders/docker'
18+ args : ['push', 'gcr.io/$PROJECT_ID/fastapi-app']
19+
20+ # Step 5: Deploy using Terraform (assuming Terraform files are set up)
21+ - name : ' hashicorp/terraform'
22+ args : ['init']
23+ - name : ' hashicorp/terraform'
24+ args : ['apply', '-auto-approve']
25+
26+ images :
27+ - ' gcr.io/$PROJECT_ID/fastapi-app'
You can’t perform that action at this time.
0 commit comments