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.
# Licensed under the MIT License. See License.txt in the project root for license information.
pool:
vmImage: 'Ubuntu 16.04'
vmImage: "Ubuntu 16.04"
trigger:
- master
- master
steps:
- task: NodeTool@0
inputs:
versionSpec: '10.x'
- task: NodeTool@0
inputs:
versionSpec: "10.x"
- script: npm ci
displayName: 'Install dependencies'
- script: npm ci
displayName: "Install dependencies"
- script: npm run test
displayName: 'Test'
- script: npm run test
displayName: "Test"
- task: PublishTestResults@2
inputs:
testRunner: JUnit
testResultsFiles: ./test-results.xml
- task: PublishTestResults@2
inputs:
testRunner: JUnit
testResultsFiles: ./test-results.xml
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/*coverage.xml'
reportDirectory: '$(System.DefaultWorkingDirectory)/**/coverage'
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: "$(System.DefaultWorkingDirectory)/**/*coverage.xml"
reportDirectory: "$(System.DefaultWorkingDirectory)/**/coverage"
- script: npm run lint
displayName: 'Lint'
- script: npm run 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:watch": "npm run -s build -- --watch",
"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:debug": "nodemon --config nodemon-debug.json",
"test": "jest",