This commit is contained in:
billytrend 2019-05-16 12:09:44 -07:00 коммит произвёл Timothee Guerin
Родитель 483c6c2437
Коммит 8a0b0038e5
5 изменённых файлов: 76 добавлений и 4690 удалений

Просмотреть файл

@ -1,32 +1,32 @@
# Copyright (c) Microsoft Corporation. All rights reserved. # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information. # Licensed under the MIT License. See License.txt in the project root for license information.
pool: pool:
vmImage: 'Ubuntu 16.04' vmImage: "Ubuntu 16.04"
trigger: trigger:
- master - master
steps: steps:
- task: NodeTool@0 - task: NodeTool@0
inputs: inputs:
versionSpec: '10.x' versionSpec: "10.x"
- script: npm ci - script: npm ci
displayName: 'Install dependencies' displayName: "Install dependencies"
- script: npm run test - script: npm run test
displayName: 'Test' displayName: "Test"
- task: PublishTestResults@2 - task: PublishTestResults@2
inputs: inputs:
testRunner: JUnit testRunner: JUnit
testResultsFiles: ./test-results.xml testResultsFiles: ./test-results.xml
- task: PublishCodeCoverageResults@1 - task: PublishCodeCoverageResults@1
inputs: inputs:
codeCoverageTool: Cobertura codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/*coverage.xml' summaryFileLocation: "$(System.DefaultWorkingDirectory)/**/*coverage.xml"
reportDirectory: '$(System.DefaultWorkingDirectory)/**/coverage' reportDirectory: "$(System.DefaultWorkingDirectory)/**/coverage"
- script: npm run lint - script: npm run lint
displayName: 'Lint' displayName: "Lint"

48
.ci/docker-publish.yml Normal file
Просмотреть файл

@ -0,0 +1,48 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
trigger:
- master
pr: none
stages:
- stage: Build_Project
jobs:
- job: Build_Project
pool:
vmImage: "Ubuntu-16.04"
steps:
- task: NodeTool@0
inputs:
versionSpec: "10.x"
- script: npm ci
displayName: "Install Dependencies"
- script: npm run build
displayName: "Build Project"
- stage: Build_Docker
dependsOn: Build_Project
jobs:
- job: Build_Docker
pool:
vmImage: "Ubuntu-16.04"
steps:
- task: Docker@2
displayName: "Build azuredevx/git-rest-api"
inputs:
containerRegistry: "git-rest-api docker"
repository: "azuredevx/git-rest-api"
- stage: Publish_Docker
dependsOn: Build_Docker
jobs:
- job: Publish_Docker
pool:
vmImage: "Ubuntu-16.04"
steps:
- task: Docker@2
displayName: "Push azuredevx/git-rest-api"
inputs:
containerRegistry: "git-rest-api docker"
repository: "azuredevx/git-rest-api"

7
Dockerfile Normal file
Просмотреть файл

@ -0,0 +1,7 @@
FROM node:10
EXPOSE 3009
COPY ./ ./
CMD npm run start:prod

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -7,6 +7,7 @@
"build": "tsc -p config/tsconfig.build.json", "build": "tsc -p config/tsconfig.build.json",
"build:watch": "npm run -s build -- --watch", "build:watch": "npm run -s build -- --watch",
"start": "npm run build && node ./bin/main.js", "start": "npm run build && node ./bin/main.js",
"start:prod": "node ./bin/main.js",
"start:dev": "concurrently --handle-input \"wait-on bin/main.js && nodemon\" \"tsc -w -p tsconfig.build.json\" ", "start:dev": "concurrently --handle-input \"wait-on bin/main.js && nodemon\" \"tsc -w -p tsconfig.build.json\" ",
"start:debug": "nodemon --config nodemon-debug.json", "start:debug": "nodemon --config nodemon-debug.json",
"test": "jest", "test": "jest",