Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(daffio): moved daffio release pipeline into yaml #750

Merged
merged 26 commits into from
Apr 9, 2020
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
135 changes: 67 additions & 68 deletions .azure/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,83 +12,82 @@ pr:
- develop
variables:
npm_config_cache: $(Pipeline.Workspace)/.npm
jobs:
- job: Lint
displayName: Lint
pool:
vmImage: "Ubuntu 16.04"
strategy:
matrix:
node_10_x:
node_version: 10.x
steps:
- task: NodeTool@0
inputs:
versionSpec: $(node_version)
displayName: Set Node Version

- task: CacheBeta@0
inputs:
key: $(Build.SourcesDirectory)/package-lock.json
path: $(npm_config_cache)
displayName: Cache npm

- script: npx npm ci
displayName: Install Dependencies

- script: npx lerna run lint
displayName: Lint
stages:
- stage: Daffodil_CI
displayName: Daffodil CI
jobs:
- job: Lint
displayName: Lint
pool:
vmImage: "Ubuntu 16.04"
strategy:
matrix:
node_10_x:
node_version: 10.x
steps:
- template: ./templates/setup-node.yml

- job: Build_And_Test
displayName: Build And Test
pool:
vmImage: "Ubuntu 16.04"
strategy:
matrix:
node_10_x:
node_version: 10.x
steps:
- task: NodeTool@0
inputs:
versionSpec: $(node_version)
displayName: Set Node Version
- script: npx lerna run lint
displayName: Lint

- task: CacheBeta@0
inputs:
key: $(Build.SourcesDirectory)/package-lock.json
path: $(npm_config_cache)
displayName: Cache npm
- job: Build_And_Test
displayName: Build And Test
pool:
vmImage: "Ubuntu 16.04"
strategy:
matrix:
node_10_x:
node_version: 10.x
steps:
- template: ./templates/setup-node.yml

- script: npm ci
displayName: Install Dependencies
- script: npx lerna run build && npx lerna run test
displayName: Build & Test

- script: npx lerna run build && npx lerna run test
displayName: Build & Test
- template: ./templates/codeclimate.yml

- template: ./templates/codeclimate.yml
- script: npx lerna run reportcoverage
displayName: Generate Coverage Report

- script: npx lerna run reportcoverage
displayName: Generate Coverage Report
- script: |
./cc-test-reporter sum-coverage coverage/cc.*.json
./cc-test-reporter -r $token upload-coverage
displayName: Report Code Climate
env:
token: $(CODECLIMATE_TOKEN_DAFFODIL)

- script: |
./cc-test-reporter sum-coverage coverage/cc.*.json
./cc-test-reporter -r $token upload-coverage
displayName: Report Code Climate
env:
token: $(CODECLIMATE_TOKEN_DAFFODIL)
- task: CopyFiles@2
displayName: Prepare Artifact Staging Directory
inputs:
sourceFolder: dist
contents: '**/*'
targetFolder: $(Build.ArtifactStagingDirectory)

- task: CopyFiles@2
displayName: Prepare Artifact Staging Directory
inputs:
sourceFolder: dist
contents: '**/*'
targetFolder: $(Build.ArtifactStagingDirectory)
- task: PublishBuildArtifacts@1
displayName: "Publish Daff.io Serverless Artifact"
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)/apps/daffio'
artifactName: 'daffio-serverless'
parallel: true
parallelCount: 8
- stage: deploy_release
jobs:
- job: Deploy
pool:
vmImage: "Ubuntu 16.04"
strategy:
matrix:
node_10_x:
node_version: 10.x
steps:
- template: ./templates/setup-node.yml

- task: PublishBuildArtifacts@1
displayName: "Publish Daff.io Serverless Artifact"
- task: DownloadBuildArtifacts@0
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)/apps/daffio'
artifactName: 'daffio-serverless'
parallel: true
parallelCount: 8

- bash: 'npx now --scope="graycoreio" --token=$(NOW_DEPLOYMENT_TOKEN)'
damienwebdev marked this conversation as resolved.
Show resolved Hide resolved
workingDirectory: '$(System.ArtifactsDirectory)/daffio-serverless'
displayName: 'Bash Script'


14 changes: 14 additions & 0 deletions .azure/templates/setup-node.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
steps:
- task: NodeTool@0
inputs:
versionSpec: $(node_version)
displayName: Set Node Version

- task: Cache@2
inputs:
key: $(Build.SourcesDirectory)/package-lock.json
path: $(npm_config_cache)
displayName: Cache npm

- script: npx npm ci
displayName: Install Dependencies
26 changes: 16 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
"karma-jasmine-html-reporter": "^1.4.0",
"lerna": "^3.14.1",
"ng-packagr": "^5.2.0",
"now": "^17.1.1",
"plugin-error": "^1.0.1",
"prettier": "1.18.2",
"protractor": "^5.4.2",
Expand Down