-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
49 lines (44 loc) · 1.19 KB
/
Copy pathazure-pipelines.yml
File metadata and controls
49 lines (44 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Docker
# Build a Docker image
# https://docs.microsoft.com/azure/devops/pipelines/languages/docker
# commenting trigger to prevent auto deploys
# trigger:
# - Current
resources:
- repo: self
variables:
tag: '$(Build.BuildId)'
stages:
- stage: Build
displayName: Build image
jobs:
- job: Build
displayName: Build
pool:
vmImage: ubuntu-latest
steps:
- task: Docker@2
displayName: Build an image
inputs:
command: build
dockerfile: '$(Build.SourcesDirectory)/FlowCus-backend/DockerFile'
tags: |
$(tag)
- stage: Deploy
displayName: Deploy Docker image
dependsOn: Build # Ensure deployment happens after build
jobs:
- job: Deploy
displayName: Deploy
pool:
vmImage: ubuntu-latest
steps:
- script: |
echo "Deploying Docker image to your deployment platform"
# Add deployment commands here (Render, AKS, etc.)
# For example, using curl to trigger Render deployment:
curl -X POST \
-H "Authorization: Bearer ${RENDER_API_KEY}" \
-d '{"branch":"main"}' \
"https://api.render.com/v1/services/${FLOWCUS_SERVICE_ID}/deploys"
displayName: 'Deploy to Render'