SHARE
TWEET

Untitled

a guest May 19th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. name: $(SourceBranchName).$(Date:yyyyMMdd)$(Rev:.r) #Show Build Name, this is build number
  2. trigger: 
  3.   batch: true
  4.   branches:
  5.     include: 
  6.       - DEV
  7.   paths:
  8.     include: 
  9.       - Demo.asp.net
  10. jobs:
  11. - job:
  12.   displayName: Build Send Data Tool
  13.   pool: localagent
  14.   steps:
  15.   #restore 
  16.   - task: DotNetCoreCLI@2
  17.     displayName: Restore package
  18.     inputs:
  19.       command: 'restore'
  20.       projects: XXXXX.sln
  21.       feedsToUse: config
  22.       nugetConfigPath: nuget.config
  23.       verbosityPack: 'detailed' 
  24.   #置換參數
  25.   - task: qetza.replacetokens.replacetokens-task.replacetokens@2
  26.     displayName: 'Replace Config Parameter'
  27.     inputs:
  28.       rootDirectory: demo
  29.       targetFiles: appsettings.dev.json
  30.       actionOnMissing: fail
  31.   #NET Core Publish
  32.   - task: DotNetCoreCLI@2
  33.     displayName: Build & Publish Application
  34.     inputs:
  35.       Command: 'publish'
  36.       publishWebProjects: false
  37.       projects: XXXXX.sln
  38.       arguments: '--self-contained true -o $(Build.artifactstagingdirectory)\app -r win-x64'
  39.       zipAfterPublish: false
  40.       feedsToUse: config
  41.       nugetConfigPath: nuget.config
  42.       configuration: debug
  43.   - task: PublishBuildArtifacts@1
  44.     displayName: Upload file
  45.     inputs:
  46.       PathtoPublish: '$(Build.StagingDirectory)'
  47.       ArtifactName: 'drop'
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top