update pipeline to build develop
This commit is contained in:
parent
3f0bdfe3a9
commit
eb8ea5e222
@ -6,6 +6,7 @@ trigger:
|
||||
include:
|
||||
- release/pre
|
||||
- master
|
||||
- develop
|
||||
|
||||
pr: none
|
||||
|
||||
@ -20,17 +21,19 @@ variables:
|
||||
buildConfiguration: Stable
|
||||
isPreRelease: false
|
||||
|
||||
steps:
|
||||
- task: UseDotNet@2
|
||||
jobs:
|
||||
- job: Build
|
||||
steps:
|
||||
- task: UseDotNet@2
|
||||
displayName: 'Install .NET Core 6 SDK'
|
||||
inputs:
|
||||
packageType: 'sdk'
|
||||
version: '6.0.x'
|
||||
includePreviewVersions: true
|
||||
|
||||
- task: NuGetToolInstaller@1
|
||||
- task: NuGetToolInstaller@1
|
||||
|
||||
- task: PowerShell@2
|
||||
- task: PowerShell@2
|
||||
displayName: 'Setup Pre-Release configuration'
|
||||
condition: eq(variables['Build.SourceBranch'], 'refs/heads/release/pre')
|
||||
inputs:
|
||||
@ -41,12 +44,12 @@ steps:
|
||||
echo '##vso[task.setvariable variable=isPreRelease]true'
|
||||
failOnStderr: true
|
||||
|
||||
- task: NuGetCommand@2
|
||||
- task: NuGetCommand@2
|
||||
displayName: 'Restore nuget packages'
|
||||
inputs:
|
||||
restoreSolution: '$(solution)'
|
||||
|
||||
- task: PowerShell@2
|
||||
- task: PowerShell@2
|
||||
displayName: 'Preload external resources'
|
||||
inputs:
|
||||
targetType: 'inline'
|
||||
@ -59,7 +62,7 @@ steps:
|
||||
failOnStderr: true
|
||||
workingDirectory: '$(Build.Repository.LocalPath)\WebfrontCore\wwwroot'
|
||||
|
||||
- task: VSBuild@1
|
||||
- task: VSBuild@1
|
||||
displayName: 'Build projects'
|
||||
inputs:
|
||||
solution: '$(solution)'
|
||||
@ -67,7 +70,7 @@ steps:
|
||||
platform: '$(buildPlatform)'
|
||||
configuration: '$(buildConfiguration)'
|
||||
|
||||
- task: PowerShell@2
|
||||
- task: PowerShell@2
|
||||
displayName: 'Bundle JS Files'
|
||||
inputs:
|
||||
targetType: 'inline'
|
||||
@ -82,7 +85,7 @@ steps:
|
||||
failOnStderr: true
|
||||
workingDirectory: '$(Build.Repository.LocalPath)\WebfrontCore'
|
||||
|
||||
- task: DotNetCoreCLI@2
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: 'Publish projects'
|
||||
inputs:
|
||||
command: 'publish'
|
||||
@ -94,7 +97,7 @@ steps:
|
||||
zipAfterPublish: false
|
||||
modifyOutputPath: false
|
||||
|
||||
- task: PowerShell@2
|
||||
- task: PowerShell@2
|
||||
displayName: 'Run publish script 1'
|
||||
inputs:
|
||||
filePath: 'DeploymentFiles/PostPublish.ps1'
|
||||
@ -102,7 +105,7 @@ steps:
|
||||
failOnStderr: true
|
||||
workingDirectory: '$(Build.Repository.LocalPath)'
|
||||
|
||||
- task: BatchScript@1
|
||||
- task: BatchScript@1
|
||||
displayName: 'Run publish script 2'
|
||||
inputs:
|
||||
filename: 'Application\BuildScripts\PostPublish.bat'
|
||||
@ -110,15 +113,16 @@ steps:
|
||||
arguments: '$(outputFolder) $(Build.Repository.LocalPath)'
|
||||
failOnStandardError: true
|
||||
|
||||
- task: PowerShell@2
|
||||
- task: PowerShell@2
|
||||
displayName: 'Download dos2unix for line endings'
|
||||
inputs:
|
||||
targetType: 'inline'
|
||||
script: 'wget https://raidmax.org/downloads/dos2unix.exe'
|
||||
failOnStderr: true
|
||||
workingDirectory: '$(Build.Repository.LocalPath)\Application\BuildScripts'
|
||||
|
||||
- task: CmdLine@2
|
||||
- job: Transform
|
||||
steps:
|
||||
- task: CmdLine@2
|
||||
displayName: 'Convert Linux start script line endings'
|
||||
inputs:
|
||||
script: |
|
||||
@ -129,35 +133,36 @@ steps:
|
||||
@echo IW4MAdmin-$(Build.BuildNumber) > $(Build.ArtifactStagingDirectory)\version_$(releaseType).txt
|
||||
workingDirectory: '$(Build.Repository.LocalPath)\Application\BuildScripts'
|
||||
|
||||
- task: CopyFiles@2
|
||||
- task: CopyFiles@2
|
||||
displayName: 'Move script plugins into publish directory'
|
||||
inputs:
|
||||
SourceFolder: '$(Build.Repository.LocalPath)\Plugins\ScriptPlugins'
|
||||
Contents: '*.js'
|
||||
TargetFolder: '$(outputFolder)\Plugins'
|
||||
|
||||
- task: CopyFiles@2
|
||||
- task: CopyFiles@2
|
||||
displayName: 'Move binary plugins into publish directory'
|
||||
inputs:
|
||||
SourceFolder: '$(Build.Repository.LocalPath)\BUILD\Plugins\'
|
||||
Contents: '*.dll'
|
||||
TargetFolder: '$(outputFolder)\Plugins'
|
||||
|
||||
- task: CmdLine@2
|
||||
- task: CmdLine@2
|
||||
displayName: 'Move webfront resources into publish directory'
|
||||
inputs:
|
||||
script: 'xcopy /s /y /f wwwroot $(outputFolder)\wwwroot'
|
||||
workingDirectory: '$(Build.Repository.LocalPath)\BUILD\Plugins'
|
||||
failOnStderr: true
|
||||
|
||||
- task: CmdLine@2
|
||||
- task: CmdLine@2
|
||||
displayName: 'Move gamescript files into publish directory'
|
||||
inputs:
|
||||
script: 'echo d | xcopy /s /y /f GameFiles $(outputFolder)\GameFiles'
|
||||
workingDirectory: '$(Build.Repository.LocalPath)'
|
||||
failOnStderr: true
|
||||
|
||||
- task: ArchiveFiles@2
|
||||
- job: Artifact
|
||||
steps:
|
||||
- task: ArchiveFiles@2
|
||||
displayName: 'Generate final zip file'
|
||||
inputs:
|
||||
rootFolderOrFile: '$(outputFolder)'
|
||||
@ -166,12 +171,22 @@ steps:
|
||||
archiveFile: '$(Build.ArtifactStagingDirectory)/IW4MAdmin-$(Build.BuildNumber).zip'
|
||||
replaceExistingArchive: true
|
||||
|
||||
- task: PublishPipelineArtifact@1
|
||||
- task: PublishPipelineArtifact@1
|
||||
inputs:
|
||||
targetPath: '$(Build.ArtifactStagingDirectory)/IW4MAdmin-$(Build.BuildNumber).zip'
|
||||
artifact: 'IW4MAdmin-$(Build.BuildNumber).zip'
|
||||
|
||||
- task: FtpUpload@2
|
||||
- task: PublishPipelineArtifact@1
|
||||
displayName: 'Publish artifact for analysis'
|
||||
inputs:
|
||||
targetPath: '$(outputFolder)'
|
||||
artifact: 'IW4MAdmin.$(buildConfiguration)'
|
||||
publishLocation: 'pipeline'
|
||||
|
||||
- job: Publish
|
||||
condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/develop'))
|
||||
steps:
|
||||
- task: FtpUpload@2
|
||||
displayName: 'Upload zip file to website'
|
||||
inputs:
|
||||
credentialsOption: 'inputs'
|
||||
@ -186,7 +201,7 @@ steps:
|
||||
preservePaths: false
|
||||
trustSSL: false
|
||||
|
||||
- task: FtpUpload@2
|
||||
- task: FtpUpload@2
|
||||
displayName: 'Upload version info to website'
|
||||
inputs:
|
||||
credentialsOption: 'inputs'
|
||||
@ -201,7 +216,7 @@ steps:
|
||||
preservePaths: false
|
||||
trustSSL: false
|
||||
|
||||
- task: GitHubRelease@1
|
||||
- task: GitHubRelease@1
|
||||
displayName: 'Make GitHub release'
|
||||
inputs:
|
||||
gitHubConnection: 'github.com_RaidMax'
|
||||
@ -218,7 +233,7 @@ steps:
|
||||
changeLogCompareToRelease: 'lastNonDraftRelease'
|
||||
changeLogType: 'commitBased'
|
||||
|
||||
- task: PowerShell@2
|
||||
- task: PowerShell@2
|
||||
displayName: 'Update master version'
|
||||
inputs:
|
||||
targetType: 'inline'
|
||||
@ -237,10 +252,3 @@ steps:
|
||||
}
|
||||
|
||||
Invoke-RestMethod @params
|
||||
|
||||
- task: PublishPipelineArtifact@1
|
||||
displayName: 'Publish artifact for analysis'
|
||||
inputs:
|
||||
targetPath: '$(outputFolder)'
|
||||
artifact: 'IW4MAdmin.$(buildConfiguration)'
|
||||
publishLocation: 'pipeline'
|
||||
|
Loading…
Reference in New Issue
Block a user