Azure Pipeline manuell erstellen
Documentation in Schritten wie man eine Pipeline manuell erstellt, nach vorlage von Rahul Nath
AZURE FUNCTION DEVOPS | Setting up a Build Deploy Pipeline | Going Serverless |
https://youtu.be/_cOckpopDkY?t=239
In die Felder eintragen
Command: Build
Path to project: **/*.csproj
Arguments:
command: 'build'
projects: '**/*.csproj'
arguments: '--output $(Build.BinariesDirectorey/publish_output --confiruation Realease'
Dann unter .NET CORE auswählen
Add Archive files
Add Publish build artifacts
Save and run
Azure-pipelines.yml aus video
#Starterpipeline
#Startwithaminimalpipelinethatyoucancustomizetobuildanddeployyourcode.
#Addstepsthatbuild,runtests,deploy,andmore:
#https://aka.ms/yaml
trigger:
-master
pool:
vmImage:'ubuntu-latest'
steps:
-task:DotNetCoreCLI@2
inputs:
command:'build'
projects:'**/*.csproj'
arguments:'--output$(Build.BinariesDirectory)/publish_output--configurationRelease'
-task:ArchiveFiles@2
inputs:
rootFolderOrFile:'$(Build.BinariesDirectory)/publish_output'
includeRootFolder:false
archiveType:'zip'
archiveFile:'$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip'
replaceExistingArchive:true
-task:PublishBuildArtifacts@1
inputs:
PathtoPublish:'$(Build.ArtifactStagingDirectory)'
ArtifactName:'drop'
publishLocation:'Container'
|
Standard build file YAML mit Github function .NET beinhaltet core (also KEIN .netframework wählen)
#ASP.NET
#BuildandtestASP.NETprojects.
#Addstepsthatpublishsymbols,savebuildartifacts,deploy,andmore:
#https://docs.microsoft.com/azure/devops/pipelines/apps/aspnet/build-aspnet-4
trigger:
-master
pool:
vmImage:'windows-latest'
variables:
solution:'**/*.sln'
buildPlatform:'AnyCPU'
buildConfiguration:'Release'
steps:
-task:NuGetToolInstaller@1
-task:NuGetCommand@2
inputs:
restoreSolution:'$(solution)'
-task:VSBuild@1
inputs:
solution:'$(solution)'
msbuildArgs:'/p:DeployOnBuild=true/p:WebPublishMethod=Package/p:PackageAsSingleFile=true/p:SkipInvalidConfigurations=true/p:PackageLocation="$(build.artifactStagingDirectory)"'
platform:'$(buildPlatform)'
configuration:'$(buildConfiguration)'
-task:VSTest@2
inputs:
platform:'$(buildPlatform)'
configuration:'$(buildConfiguration)'
|