-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathazure_pipelins.yml
More file actions
41 lines (36 loc) · 1022 Bytes
/
azure_pipelins.yml
File metadata and controls
41 lines (36 loc) · 1022 Bytes
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
trigger:
branches:
include:
- develop
pool:
name: "Default"
demands:
- Agent.Name -equals vm-pkw-db-monitor
variables:
DOCKERHUB_USERNAME: "temilayon"
DOCKERHUB_PROJECT: "temilayon/projectr.backend"
DOCKER_TAG: "latest"
steps:
# Checkout source
- checkout: self
# Login to Docker Hub using service connection
- task: Docker@2
displayName: "Login to Docker Hub"
inputs:
command: login
containerRegistry: "docker_svc_con_L"
# Build & Push Image (combined task instead of split build + script push)
- task: Docker@2
displayName: "Build and Push Docker Image"
inputs:
command: buildAndPush
repository: $(DOCKERHUB_PROJECT)
dockerfile: $(Build.SourcesDirectory)/src/Dockerfile
buildContext: $(Build.SourcesDirectory)
tags: |
$(DOCKER_TAG)
- script: |
echo "Starting containers using Docker Compose..."
cd /opt/ProjectR/build
sudo bash startsvcs.dynamic.sh
displayName: "Start Docker Containers"