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