Commit 4ec597dcacd8af899275c77ec0cc362be5865067

Edward Thomson 2018-10-21T09:12:43

ci: move configuration yaml to its own directory As the number of each grow, separate the CI build scripts from the YAML definitions.

diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index db64c7d..e001e51 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -11,7 +11,7 @@ jobs:
   pool:
     vmImage: 'Ubuntu 16.04'
   steps:
-  - template: ci/docker.yml
+  - template: azure-pipelines/docker.yml
     parameters:
       imageName: 'libgit2/trusty-openssl:latest'
       environmentVariables: |
@@ -24,7 +24,7 @@ jobs:
   pool:
     vmImage: 'Ubuntu 16.04'
   steps:
-  - template: ci/docker.yml
+  - template: azure-pipelines/docker.yml
     parameters:
       imageName: 'libgit2/trusty-mbedtls:latest'
       environmentVariables: |
@@ -37,7 +37,7 @@ jobs:
   pool:
     vmImage: 'Ubuntu 16.04'
   steps:
-  - template: ci/docker.yml
+  - template: azure-pipelines/docker.yml
     parameters:
       imageName: 'libgit2/trusty-openssl:latest'
       environmentVariables: |
@@ -50,7 +50,7 @@ jobs:
   pool:
     vmImage: 'Ubuntu 16.04'
   steps:
-  - template: ci/docker.yml
+  - template: azure-pipelines/docker.yml
     parameters:
       imageName: 'libgit2/trusty-mbedtls:latest'
       environmentVariables: |
@@ -65,7 +65,7 @@ jobs:
   steps:
   - bash: . '$(Build.SourcesDirectory)/ci/setup-osx.sh'
     displayName: Setup
-  - template: ci/bash.yml
+  - template: azure-pipelines/bash.yml
     parameters:
       environmentVariables:
         TMPDIR: $(Agent.TempDirectory)
@@ -77,7 +77,7 @@ jobs:
   displayName: 'Windows (Visual Studio; amd64)'
   pool: Hosted
   steps:
-  - template: ci/powershell.yml
+  - template: azure-pipelines/powershell.yml
     parameters:
       environmentVariables:
         CMAKE_OPTIONS: -DMSVC_CRTDBG=ON -G"Visual Studio 12 2013 Win64"
@@ -86,7 +86,7 @@ jobs:
   displayName: 'Windows (Visual Studio; x86)'
   pool: Hosted
   steps:
-  - template: ci/powershell.yml
+  - template: azure-pipelines/powershell.yml
     parameters:
       environmentVariables:
         CMAKE_OPTIONS: -DMSVC_CRTDBG=ON -G"Visual Studio 12 2013"
@@ -100,7 +100,7 @@ jobs:
     env:
       TEMP: $(Agent.TempDirectory)
       ARCH: amd64
-  - template: ci/powershell.yml
+  - template: azure-pipelines/powershell.yml
     parameters:
       environmentVariables:
         CMAKE_OPTIONS: -G"MinGW Makefiles"
@@ -116,7 +116,7 @@ jobs:
     env:
       TEMP: $(Agent.TempDirectory)
       ARCH: x86
-  - template: ci/powershell.yml
+  - template: azure-pipelines/powershell.yml
     parameters:
       environmentVariables:
         CMAKE_OPTIONS: -G"MinGW Makefiles"
diff --git a/azure-pipelines/bash.yml b/azure-pipelines/bash.yml
new file mode 100644
index 0000000..d776a36
--- /dev/null
+++ b/azure-pipelines/bash.yml
@@ -0,0 +1,17 @@
+# These are the steps used for building on machines with bash.
+steps:
+- bash: . '$(Build.SourcesDirectory)/ci/build.sh'
+  displayName: Build
+  workingDirectory: '$(Build.BinariesDirectory)'
+  env: ${{ parameters.environmentVariables }}
+- bash: . '$(Build.SourcesDirectory)/ci/test.sh'
+  displayName: Test
+  workingDirectory: '$(Build.BinariesDirectory)'
+  env: ${{ parameters.environmentVariables }}
+- task: PublishTestResults@2
+  displayName: Publish Test Results
+  condition: succeededOrFailed()
+  inputs:
+    testResultsFiles: 'results_*.xml'
+    searchFolder: '$(Build.BinariesDirectory)'
+    mergeTestResults: true
diff --git a/azure-pipelines/docker.yml b/azure-pipelines/docker.yml
new file mode 100644
index 0000000..e925104
--- /dev/null
+++ b/azure-pipelines/docker.yml
@@ -0,0 +1,33 @@
+# These are the steps used in a container-based build in VSTS.
+steps:
+- task: docker@0
+  displayName: Build
+  inputs:
+    action: 'Run an image'
+    imageName: ${{ parameters.imageName }}
+    volumes: |
+     $(Build.SourcesDirectory):/src
+     $(Build.BinariesDirectory):/build
+    envVars: ${{ parameters.environmentVariables }}
+    workDir: '/build'
+    containerCommand: '/src/ci/build.sh'
+    detached: false
+- task: docker@0
+  displayName: Test
+  inputs:
+    action: 'Run an image'
+    imageName: ${{ parameters.imageName }}
+    volumes: |
+     $(Build.SourcesDirectory):/src
+     $(Build.BinariesDirectory):/build
+    envVars: ${{ parameters.environmentVariables }}
+    workDir: '/build'
+    containerCommand: '/src/ci/test.sh'
+    detached: false
+- task: publishtestresults@2
+  displayName: Publish Test Results
+  condition: succeededOrFailed()
+  inputs:
+    testResultsFiles: 'results_*.xml'
+    searchFolder: '$(Build.BinariesDirectory)'
+    mergeTestResults: true
diff --git a/azure-pipelines/nightly.yml b/azure-pipelines/nightly.yml
new file mode 100644
index 0000000..4d6d8a3
--- /dev/null
+++ b/azure-pipelines/nightly.yml
@@ -0,0 +1,22 @@
+resources:
+- repo: self
+
+jobs:
+- job: coverity
+  displayName: 'Coverity'
+  pool:
+    vmImage: 'Ubuntu 16.04'
+  steps:
+  - task: Docker@0
+    displayName: Build
+    inputs:
+      action: 'Run an image'
+      imageName: 'libgit2/trusty-openssl:latest'
+      volumes: |
+       $(Build.SourcesDirectory):/src
+       $(Build.BinariesDirectory):/build
+      envVars: |
+       COVERITY_TOKEN=$(COVERITY_TOKEN)
+      workDir: '/build'
+      containerCommand: '/src/ci/coverity.sh'
+      detached: false
diff --git a/azure-pipelines/powershell.yml b/azure-pipelines/powershell.yml
new file mode 100644
index 0000000..a2eb175
--- /dev/null
+++ b/azure-pipelines/powershell.yml
@@ -0,0 +1,17 @@
+# These are the steps used for building on machines with PowerShell.
+steps:
+- powershell: . '$(Build.SourcesDirectory)\ci\build.ps1'
+  displayName: Build
+  workingDirectory: '$(Build.BinariesDirectory)'
+  env: ${{ parameters.environmentVariables }}
+- powershell: . '$(Build.SourcesDirectory)\ci\test.ps1'
+  displayName: Test
+  workingDirectory: '$(Build.BinariesDirectory)'
+  env: ${{ parameters.environmentVariables }}
+- task: PublishTestResults@2
+  displayName: Publish Test Results
+  condition: succeededOrFailed()
+  inputs:
+    testResultsFiles: 'results_*.xml'
+    searchFolder: '$(Build.BinariesDirectory)'
+    mergeTestResults: true
diff --git a/ci/bash.yml b/ci/bash.yml
deleted file mode 100644
index d776a36..0000000
--- a/ci/bash.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-# These are the steps used for building on machines with bash.
-steps:
-- bash: . '$(Build.SourcesDirectory)/ci/build.sh'
-  displayName: Build
-  workingDirectory: '$(Build.BinariesDirectory)'
-  env: ${{ parameters.environmentVariables }}
-- bash: . '$(Build.SourcesDirectory)/ci/test.sh'
-  displayName: Test
-  workingDirectory: '$(Build.BinariesDirectory)'
-  env: ${{ parameters.environmentVariables }}
-- task: PublishTestResults@2
-  displayName: Publish Test Results
-  condition: succeededOrFailed()
-  inputs:
-    testResultsFiles: 'results_*.xml'
-    searchFolder: '$(Build.BinariesDirectory)'
-    mergeTestResults: true
diff --git a/ci/docker.yml b/ci/docker.yml
deleted file mode 100644
index e925104..0000000
--- a/ci/docker.yml
+++ /dev/null
@@ -1,33 +0,0 @@
-# These are the steps used in a container-based build in VSTS.
-steps:
-- task: docker@0
-  displayName: Build
-  inputs:
-    action: 'Run an image'
-    imageName: ${{ parameters.imageName }}
-    volumes: |
-     $(Build.SourcesDirectory):/src
-     $(Build.BinariesDirectory):/build
-    envVars: ${{ parameters.environmentVariables }}
-    workDir: '/build'
-    containerCommand: '/src/ci/build.sh'
-    detached: false
-- task: docker@0
-  displayName: Test
-  inputs:
-    action: 'Run an image'
-    imageName: ${{ parameters.imageName }}
-    volumes: |
-     $(Build.SourcesDirectory):/src
-     $(Build.BinariesDirectory):/build
-    envVars: ${{ parameters.environmentVariables }}
-    workDir: '/build'
-    containerCommand: '/src/ci/test.sh'
-    detached: false
-- task: publishtestresults@2
-  displayName: Publish Test Results
-  condition: succeededOrFailed()
-  inputs:
-    testResultsFiles: 'results_*.xml'
-    searchFolder: '$(Build.BinariesDirectory)'
-    mergeTestResults: true
diff --git a/ci/nightly.yml b/ci/nightly.yml
deleted file mode 100644
index 4d6d8a3..0000000
--- a/ci/nightly.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-resources:
-- repo: self
-
-jobs:
-- job: coverity
-  displayName: 'Coverity'
-  pool:
-    vmImage: 'Ubuntu 16.04'
-  steps:
-  - task: Docker@0
-    displayName: Build
-    inputs:
-      action: 'Run an image'
-      imageName: 'libgit2/trusty-openssl:latest'
-      volumes: |
-       $(Build.SourcesDirectory):/src
-       $(Build.BinariesDirectory):/build
-      envVars: |
-       COVERITY_TOKEN=$(COVERITY_TOKEN)
-      workDir: '/build'
-      containerCommand: '/src/ci/coverity.sh'
-      detached: false
diff --git a/ci/powershell.yml b/ci/powershell.yml
deleted file mode 100644
index a2eb175..0000000
--- a/ci/powershell.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-# These are the steps used for building on machines with PowerShell.
-steps:
-- powershell: . '$(Build.SourcesDirectory)\ci\build.ps1'
-  displayName: Build
-  workingDirectory: '$(Build.BinariesDirectory)'
-  env: ${{ parameters.environmentVariables }}
-- powershell: . '$(Build.SourcesDirectory)\ci\test.ps1'
-  displayName: Test
-  workingDirectory: '$(Build.BinariesDirectory)'
-  env: ${{ parameters.environmentVariables }}
-- task: PublishTestResults@2
-  displayName: Publish Test Results
-  condition: succeededOrFailed()
-  inputs:
-    testResultsFiles: 'results_*.xml'
-    searchFolder: '$(Build.BinariesDirectory)'
-    mergeTestResults: true