aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CI/build-pipeline.yml35
-rw-r--r--CI/release-pipeline.yml53
-rw-r--r--azure-pipelines.yml76
3 files changed, 76 insertions, 88 deletions
diff --git a/CI/build-pipeline.yml b/CI/build-pipeline.yml
deleted file mode 100644
index 85b373ff..00000000
--- a/CI/build-pipeline.yml
+++ /dev/null
@@ -1,35 +0,0 @@
-trigger:
-- master
-
-variables:
- buildConfiguration: 'Debug'
- ASPNETCORE_ENVIRONMENT: 'Development'
-
-pool:
- vmImage: 'Ubuntu-16.04'
-
-steps:
-- task: UseDotNet@2
- inputs:
- packageType: sdk
- version: 2.2.x
-
-- script: |
- dotnet restore Timeline/Timeline.csproj --configfile nuget.config
- dotnet restore Timeline.Tests/Timeline.Tests.csproj --configfile nuget.config
- displayName: Dotnet Restore
-
-- script: dotnet test Timeline.Tests/Timeline.Tests.csproj --configuration $(buildConfiguration) --no-restore --logger trx --collect:"XPlat Code Coverage" --settings './coverletArgs.runsettings'
- displayName: Dotnet Test
-
-- task: PublishTestResults@2
- condition: succeededOrFailed()
- inputs:
- testRunner: VSTest
- testResultsFiles: '**/*.trx'
-
-- task: PublishCodeCoverageResults@1
- condition: succeededOrFailed()
- inputs:
- codeCoverageTool: 'Cobertura'
- summaryFileLocation: '**/TestResults/*/coverage.cobertura.xml'
diff --git a/CI/release-pipeline.yml b/CI/release-pipeline.yml
deleted file mode 100644
index f3434a36..00000000
--- a/CI/release-pipeline.yml
+++ /dev/null
@@ -1,53 +0,0 @@
-trigger:
-- master
-
-pr: none
-
-stages:
-- stage: Build
- variables:
- buildConfiguration: 'Release'
- ASPNETCORE_ENVIRONMENT: 'Development'
- jobs:
- - job: Build
- pool:
- vmImage: 'Ubuntu-16.04'
- steps:
- - script: |
- dotnet restore Timeline/Timeline.csproj --configfile nuget.config
- dotnet restore Timeline.Tests/Timeline.Tests.csproj --configfile nuget.config
- displayName: Dotnet Restore
-
- - script: dotnet test Timeline.Tests/Timeline.Tests.csproj --configuration $(buildConfiguration) --no-restore --logger trx
- displayName: Dotnet Test
-
- - task: PublishTestResults@2
- condition: succeededOrFailed()
- inputs:
- testRunner: VSTest
- testResultsFiles: '**/*.trx'
-
- - script: dotnet publish Timeline/Timeline.csproj --configuration $(buildConfiguration) --no-restore --output ./publish/
- displayName: Dotnet Publish
-
- - task: PublishPipelineArtifact@0
- inputs:
- artifactName: 'timeline'
- targetPath: Timeline/publish
-
-- stage: Deploy
- jobs:
- - deployment: Deploy
- pool:
- name: 'Default'
- environment: 'timeline-server'
- strategy:
- runOnce:
- deploy:
- steps:
- - script: |
- rm -rf /var/timeline/*
- cp -r $PIPELINE_WORKSPACE/timeline/. /var/timeline/
- sudo systemctl restart timeline.service
- displayName: 'Command Line Script'
- failOnStderr: true
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
new file mode 100644
index 00000000..6078b1ff
--- /dev/null
+++ b/azure-pipelines.yml
@@ -0,0 +1,76 @@
+trigger:
+- master
+
+stages:
+- stage: build
+ displayName: Routine Build and Test
+
+ jobs:
+ - job: build
+ pool:
+ vmImage: 'ubuntu-18.04'
+ variables:
+ buildConfiguration: 'Debug'
+ ASPNETCORE_ENVIRONMENT: 'Development'
+ steps:
+ - task: UseDotNet@2
+ inputs:
+ packageType: sdk
+ version: 2.2.x
+
+ - script: |
+ dotnet restore Timeline/Timeline.csproj --configfile nuget.config
+ dotnet restore Timeline.Tests/Timeline.Tests.csproj --configfile nuget.config
+ displayName: Dotnet Restore
+
+ - script: dotnet test Timeline.Tests/Timeline.Tests.csproj --configuration $(buildConfiguration) --no-restore --logger trx --collect:"XPlat Code Coverage" --settings './coverletArgs.runsettings'
+ displayName: Dotnet Test
+
+ - task: PublishTestResults@2
+ condition: succeededOrFailed()
+ inputs:
+ testRunner: VSTest
+ testResultsFiles: '**/*.trx'
+
+ - task: PublishCodeCoverageResults@1
+ condition: succeededOrFailed()
+ inputs:
+ codeCoverageTool: 'Cobertura'
+ summaryFileLocation: '**/TestResults/*/coverage.cobertura.xml'
+
+- stage: deploy
+ displayName: Build Release and Deploy
+ variables:
+ buildConfiguration: 'Release'
+
+ jobs:
+ - job: build
+ displayName: Build Release Artifact
+ pool:
+ vmImage: 'ubuntu-18.04'
+ steps:
+ - script: dotnet publish Timeline/Timeline.csproj --configuration $(buildConfiguration) --output ./publish/
+ displayName: Dotnet Publish
+
+ - task: PublishPipelineArtifact@1
+ inputs:
+ artifactName: 'timeline'
+ targetPath: Timeline/publish
+
+ - deployment: deploy
+ displayName: Deploy to Server
+ pool:
+ name: 'Default'
+ environment: 'timeline-server'
+ dependsOn: build
+ strategy:
+ runOnce:
+ deploy:
+ steps:
+ - script: |
+ rm -rf /var/timeline/*
+ cp -r $PIPELINE_WORKSPACE/timeline/. /var/timeline/
+ sudo systemctl restart timeline.service
+ displayName: 'Copy Files and Restart Service'
+ failOnStderr: true
+