-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update azure-pipelines.yml for Azure Pipelines
- Loading branch information
1 parent
18986cc
commit 8f890a1
Showing
1 changed file
with
44 additions
and
26 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,50 @@ | ||
# Starter pipeline | ||
# Start with a minimal pipeline that you can customize to build and deploy your code. | ||
# Add steps that build, run tests, deploy, and more: | ||
# https://aka.ms/yaml | ||
|
||
trigger: | ||
branches: | ||
exclude: | ||
- '*' | ||
branches: | ||
exclude: | ||
- '*' | ||
|
||
pr: | ||
branches: | ||
include: | ||
- '*' | ||
branches: | ||
include: | ||
- '*' | ||
|
||
pool: | ||
name: Default | ||
demands: | ||
- agent.name -equals WIN-4G3TNA4VMUF | ||
|
||
stages: | ||
- stage: Build | ||
- stage: ValidateComposeFile | ||
jobs: | ||
- job: PrintFile | ||
pool: | ||
name: Default | ||
demands: | ||
- agent.name -equals WIN-4G3TNA4VMUF | ||
- job: Validate | ||
steps: | ||
- powershell: | | ||
Write-Host "Creating a sample file" | ||
"Hello, Azure Pipelines!" | Out-File -FilePath print.txt | ||
displayName: 'Create a sample file' | ||
- powershell: | | ||
Write-Host "Printing the file contents" | ||
Get-Content -Path print.txt | ||
displayName: 'Print the file contents' | ||
- script: | | ||
docker-compose config | ||
displayName: 'Validate docker-compose.yml' | ||
- stage: BuildAndTest | ||
dependsOn: ValidateComposeFile | ||
jobs: | ||
- job: Build | ||
steps: | ||
- task: DockerCompose@0 | ||
inputs: | ||
action: 'Build services' | ||
dockerComposeFile: 'docker-compose.yml' | ||
displayName: 'Build Docker Services' | ||
|
||
- task: DockerCompose@0 | ||
inputs: | ||
action: 'Run services' | ||
dockerComposeFile: 'docker-compose.yml' | ||
displayName: 'Run Docker Services' | ||
|
||
- script: | | ||
docker-compose run my-service ./run-tests.sh | ||
displayName: 'Run Tests' | ||
- task: DockerCompose@0 | ||
inputs: | ||
action: 'Down services' | ||
dockerComposeFile: 'docker-compose.yml' | ||
displayName: 'Tear Down Services' |