From cdd2d036b71644ce2fc216779dc926f7cfa2b5d1 Mon Sep 17 00:00:00 2001 From: Alberto Fuentes Date: Tue, 21 May 2019 14:45:05 -0500 Subject: [PATCH 1/7] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 00000000..3a2d11f8 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,24 @@ +pool: + vmImage: 'ubuntu-16.04' +trigger: + - master +steps: + - task: CopyFiles@2 + displayName: 'Copy Files to: $(build.artifactstagingdirectory)/Templates' + inputs: + SourceFolder: deployment + Contents: '*.json' + TargetFolder: '$(build.artifactstagingdirectory)/Templates' + - task: Npm@1 + displayName: 'npm custom' + inputs: + command: custom + verbose: false + customCommand: 'install --production' + - task: ArchiveFiles@2 + displayName: 'Archive $(Build.SourcesDirectory)' + inputs: + rootFolderOrFile: '$(Build.SourcesDirectory)' + includeRootFolder: false + - task: PublishBuildArtifacts@1 + displayName: 'Publish Artifact: drop' \ No newline at end of file From ccca3d934317849a92eea5a207e60a0de13e2cf8 Mon Sep 17 00:00:00 2001 From: Alberto Fuentes Date: Tue, 21 May 2019 14:49:24 -0500 Subject: [PATCH 2/7] Added build status badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ba478ab9..8a98c5b3 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ - +[![Build Status](https://dev.azure.com/caf004m/devops_azure/_apis/build/status/yaotzin68.ContosoAir?branchName=master)](https://dev.azure.com/caf004m/devops_azure/_build/latest?definitionId=1&branchName=master) # Microsoft.Github CI Demo From bfdbd391bfa68b0d0ef9dff2b83e728871155c4e Mon Sep 17 00:00:00 2001 From: Alberto Fuentes Date: Tue, 21 May 2019 14:50:34 -0500 Subject: [PATCH 3/7] test --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 8a98c5b3..d7f8b843 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ [![Build Status](https://dev.azure.com/caf004m/devops_azure/_apis/build/status/yaotzin68.ContosoAir?branchName=master)](https://dev.azure.com/caf004m/devops_azure/_build/latest?definitionId=1&branchName=master) - # Microsoft.Github CI Demo Demo website application for Contoso Air. From a554dacaeced4f70f78534829cdd9d5bb3aab99f Mon Sep 17 00:00:00 2001 From: Alberto Fuentes Date: Tue, 21 May 2019 14:54:32 -0500 Subject: [PATCH 4/7] Updated build pipeline --- azure-pipelines.yml | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3a2d11f8..2e3a5a5d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,24 +1,36 @@ pool: - vmImage: 'ubuntu-16.04' + vmImage: ubuntu-16.04 trigger: - master steps: - - task: CopyFiles@2 - displayName: 'Copy Files to: $(build.artifactstagingdirectory)/Templates' - inputs: - SourceFolder: deployment - Contents: '*.json' - TargetFolder: '$(build.artifactstagingdirectory)/Templates' - task: Npm@1 - displayName: 'npm custom' inputs: - command: custom - verbose: false - customCommand: 'install --production' + command: install + - script: 'npm test' + displayName: 'Run unit tests' + continueOnError: true + - task: PublishTestResults@2 + displayName: 'Publish Test Results' + condition: succeededOrFailed() + inputs: + testResultsFiles: $(System.DefaultWorkingDirectory)/test-report.xml + - task: PublishCodeCoverageResults@1 + displayName: 'Publish Code Coverage' + condition: 'in(variables[''Agent.JobStatus''], ''Succeeded'')' + inputs: + codeCoverageTool: Cobertura + summaryFileLocation: '$(System.DefaultWorkingDirectory)/coverage/*coverage.xml' + reportDirectory: $(System.DefaultWorkingDirectory)/coverage - task: ArchiveFiles@2 - displayName: 'Archive $(Build.SourcesDirectory)' + displayName: 'Archive sources' inputs: - rootFolderOrFile: '$(Build.SourcesDirectory)' + rootFolderOrFile: $(Build.SourcesDirectory) includeRootFolder: false + - task: CopyFiles@2 + displayName: 'Copy ARM templates' + inputs: + SourceFolder: deployment + Contents: '*.json' + TargetFolder: $(build.artifactstagingdirectory)/Templates - task: PublishBuildArtifacts@1 - displayName: 'Publish Artifact: drop' \ No newline at end of file + displayName: 'Publish Artifact: drop' From 231266a09f4dd0ce48d48c0d663ea45b3f223fc9 Mon Sep 17 00:00:00 2001 From: Alberto Fuentes Date: Tue, 21 May 2019 15:16:13 -0500 Subject: [PATCH 5/7] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 40 ++++++++++++++-------------------------- 1 file changed, 14 insertions(+), 26 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2e3a5a5d..3a2d11f8 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,36 +1,24 @@ pool: - vmImage: ubuntu-16.04 + vmImage: 'ubuntu-16.04' trigger: - master steps: - - task: Npm@1 - inputs: - command: install - - script: 'npm test' - displayName: 'Run unit tests' - continueOnError: true - - task: PublishTestResults@2 - displayName: 'Publish Test Results' - condition: succeededOrFailed() + - task: CopyFiles@2 + displayName: 'Copy Files to: $(build.artifactstagingdirectory)/Templates' inputs: - testResultsFiles: $(System.DefaultWorkingDirectory)/test-report.xml - - task: PublishCodeCoverageResults@1 - displayName: 'Publish Code Coverage' - condition: 'in(variables[''Agent.JobStatus''], ''Succeeded'')' + SourceFolder: deployment + Contents: '*.json' + TargetFolder: '$(build.artifactstagingdirectory)/Templates' + - task: Npm@1 + displayName: 'npm custom' inputs: - codeCoverageTool: Cobertura - summaryFileLocation: '$(System.DefaultWorkingDirectory)/coverage/*coverage.xml' - reportDirectory: $(System.DefaultWorkingDirectory)/coverage + command: custom + verbose: false + customCommand: 'install --production' - task: ArchiveFiles@2 - displayName: 'Archive sources' + displayName: 'Archive $(Build.SourcesDirectory)' inputs: - rootFolderOrFile: $(Build.SourcesDirectory) + rootFolderOrFile: '$(Build.SourcesDirectory)' includeRootFolder: false - - task: CopyFiles@2 - displayName: 'Copy ARM templates' - inputs: - SourceFolder: deployment - Contents: '*.json' - TargetFolder: $(build.artifactstagingdirectory)/Templates - task: PublishBuildArtifacts@1 - displayName: 'Publish Artifact: drop' + displayName: 'Publish Artifact: drop' \ No newline at end of file From 09dc81f601f5191006c3f4ecf19c6534e4385307 Mon Sep 17 00:00:00 2001 From: Alberto Fuentes Date: Tue, 21 May 2019 15:18:10 -0500 Subject: [PATCH 6/7] Updated build pipeline --- README.md | 3 ++- azure-pipelines.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d7f8b843..40b3ab02 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,12 @@ [![Build Status](https://dev.azure.com/caf004m/devops_azure/_apis/build/status/yaotzin68.ContosoAir?branchName=master)](https://dev.azure.com/caf004m/devops_azure/_build/latest?definitionId=1&branchName=master) + # Microsoft.Github CI Demo Demo website application for Contoso Air. Runs a nodejs server (Express v4.16) that stores customer booked flights in a CosmosDb database. -## Requirements +### Requirements * Node v8.9.4 or later * Azure CosmosDb diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2e3a5a5d..5afbb750 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -33,4 +33,4 @@ steps: Contents: '*.json' TargetFolder: $(build.artifactstagingdirectory)/Templates - task: PublishBuildArtifacts@1 - displayName: 'Publish Artifact: drop' + displayName: 'Publish Artifact: drop' \ No newline at end of file From c8b05e219aac156099ad9355f555db5af14d7932 Mon Sep 17 00:00:00 2001 From: Alberto Fuentes Date: Tue, 21 May 2019 15:53:56 -0500 Subject: [PATCH 7/7] Changes airport sorting. Fixes AB#3464. --- src/services/airports.service.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/airports.service.js b/src/services/airports.service.js index f9af6ab4..276444bc 100644 --- a/src/services/airports.service.js +++ b/src/services/airports.service.js @@ -8,7 +8,7 @@ class AirportsService { } getAll(){ - return this._airports.filter(a => a.code).map(avoidEmptyCity); + return this._airports.filter(a => a.code).map(avoidEmptyCity).sort((a, b) => (a.city > b.city) ? 1 : -1); } getByCode(code) {