From 922d055490a0d9a1a013f0588f8a18cd99a1ecd4 Mon Sep 17 00:00:00 2001 From: jolguk Date: Wed, 26 Jun 2019 08:47:15 +0100 Subject: [PATCH 1/5] 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 23c2709898e80f60c7c790e1cd29e96b4f72f7bf Mon Sep 17 00:00:00 2001 From: Joanne Healy Date: Wed, 26 Jun 2019 08:53:22 +0100 Subject: [PATCH 2/5] UPDATED BUILD PIPELINE --- azure-pipelines.yml | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3a2d11f8..5afbb750 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 From 75fa1a49027816d256f759125156c0b380f3edf0 Mon Sep 17 00:00:00 2001 From: Joanne Healy Date: Wed, 26 Jun 2019 09:12:16 +0100 Subject: [PATCH 3/5] Changes airport sorting. Fixes AB#651 --- 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) { From ad57f8c0b5358b6ad1526e439eaf18bba8b73c26 Mon Sep 17 00:00:00 2001 From: Joanne Healy Date: Wed, 26 Jun 2019 10:00:50 +0100 Subject: [PATCH 4/5] added jo AB#652 --- src/services/book.form.service.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/book.form.service.js b/src/services/book.form.service.js index c0e00b35..114aacf9 100644 --- a/src/services/book.form.service.js +++ b/src/services/book.form.service.js @@ -9,7 +9,7 @@ class BookFormService { return { kinds: [ { text:'Round trip', active: true}, - { text: 'One way' }, + { text: 'One way Jo' }, { text: 'Multi-city' } ], today: moment().toDate(), From e5d104334aa8898a8dba5f6bab85ff247fdfe22f Mon Sep 17 00:00:00 2001 From: Joanne Healy Date: Wed, 26 Jun 2019 10:41:35 +0100 Subject: [PATCH 5/5] Removed Jo Fixes: AB#653 --- src/services/book.form.service.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/book.form.service.js b/src/services/book.form.service.js index 114aacf9..87755481 100644 --- a/src/services/book.form.service.js +++ b/src/services/book.form.service.js @@ -9,7 +9,7 @@ class BookFormService { return { kinds: [ { text:'Round trip', active: true}, - { text: 'One way Jo' }, + { text: 'One way ' }, { text: 'Multi-city' } ], today: moment().toDate(),