Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
102 lines (79 sloc) 3.41 KB
# Node.js with Angular
# Build a Node.js project that uses Angular.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript
trigger:
- master
jobs:
- job: BuildAngular
pool:
vmImage: 'Ubuntu-16.04'
steps:
- task: NodeTool@0
inputs:
versionSpec: '8.x'
displayName: 'Install Node.js'
- task: DotNetCoreInstaller@0
displayName: 'Use .NET Core sdk 2.2.100'
inputs:
version: 2.2.100
- task: NuGetToolInstaller@0
- script: |
echo install globaltool
dotnet tool install --global stankins.console
displayName: install .net global tools
- script: |
stankins.console execute -o ReceiveRestFromFile -a primaryData/netCoreAlphabet.json -o SenderToTypeScript -a "" -o TransformerConcatenateOutputString -a a.ts -o SenderOutputToFolder -a $(Build.ArtifactStagingDirectory)/data/ -a false
stankins.console execute -o ReceiveRestFromFile -a primaryData/netCoreAlphabet.json -o SenderToRazorFromFile -a primaryData/markdown.txt -o TransformerConcatenateOutputString -a cards.md -o SenderOutputToFolder -a $(Build.ArtifactStagingDirectory)/data/ -a false
stankins.console execute -o YamlReader -a https://raw.githubusercontent.com/ignatandrei/netCoreAlphabet/master/azure-pipelines.yml -o SenderYamlAzurePipelineMermaid -a "" -o TransformerConcatenateOutputString -a mermaid.html -o SenderOutputToFolder -a $(Build.ArtifactStagingDirectory)/data/ -a false
displayName: 'json to typescript'
- script: |
cd angularCards
npm install -g @angular/cli
npm install
ng build --prod --build-optimizer --output-path $(Build.ArtifactStagingDirectory)/site/
displayName: 'npm install and build'
- script: |
cd angularCards
echo 404 for github
cat ./404GitHub.txt $(Build.ArtifactStagingDirectory)/site/index.html > $(Build.ArtifactStagingDirectory)/site/404.html
displayName: 'adding github 404'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
- job: BuildMobile
dependsOn:
- BuildAngular
pool:
vmImage: 'vs2017-win2016'
steps:
- task: DownloadBuildArtifacts@0
displayName: 'Download Build Artifacts'
inputs:
artifactName: drop
downloadPath: $(Build.ArtifactStagingDirectory)
- script: |
(robocopy $(Build.ArtifactStagingDirectory)\drop\site\ cordovaCards\www\dist /MIR /XD) ^& IF %ERRORLEVEL% LSS 8 SET ERRORLEVEL = 0
displayName: 'copy files from artifcat to cordova '
- script: |
call npm install -g q
call npm install -g cordova
cd cordovaCards
call cordova platform add android
call cordova build android --release
displayName: 'cordova build android'
- task: AndroidSigning@3
inputs:
apkFiles: '**/*.apk' #how to change name of apk file? mystery...
apksign: true
apksignerKeystoreFile: 'keystore.jks' #from library...
apksignerKeystorePassword: '$(jarsignerKeystorePassword)'
apksignerKeystoreAlias: '$(keystoreAlias)'
apksignerKeyPassword: '$(jarsignerKeyPassword)'
zipalign: false
- task: CopyFiles@2
inputs:
contents: 'cordovaCards/**/app*.apk'
targetFolder: '$(Build.ArtifactStagingDirectory)/apk'
flattenFolders: true
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
You can’t perform that action at this time.