Fix azure pipeline (#2046)
This commit is contained in:
parent
2820f9b986
commit
ebd709a4fe
|
@ -56,25 +56,22 @@ stages:
|
||||||
--input "**/*.exe" --config (Join-Path -Path $(Agent.TempDirectory) -ChildPath "appsettings.json") `
|
--input "**/*.exe" --config (Join-Path -Path $(Agent.TempDirectory) -ChildPath "appsettings.json") `
|
||||||
--user $(CodeSigningUser) --secret '$(CodeSigningPassword)'
|
--user $(CodeSigningUser) --secret '$(CodeSigningPassword)'
|
||||||
displayName: "Sign Crowdsec binaries + plugins"
|
displayName: "Sign Crowdsec binaries + plugins"
|
||||||
|
|
||||||
- pwsh: |
|
- pwsh: |
|
||||||
$build_version=$Build.SourceBranchName
|
$build_version=$env:BUILD_SOURCEBRANCHNAME
|
||||||
if ($build_version.Contains("-"))
|
if ($build_version.Contains("-"))
|
||||||
{
|
{
|
||||||
$build_version = $build_version.Substring(0, $build_version.IndexOf("-"))
|
$build_version = $build_version.Substring(0, $build_version.IndexOf("-"))
|
||||||
}
|
}
|
||||||
.\make_installer.ps1 -version $build_version
|
|
||||||
Write-Host "##vso[task.setvariable variable=BuildVersion;isOutput=true]$build_version"
|
Write-Host "##vso[task.setvariable variable=BuildVersion;isOutput=true]$build_version"
|
||||||
|
displayName: GetCrowdsecVersion
|
||||||
|
name: GetCrowdsecVersion
|
||||||
|
- pwsh: |
|
||||||
|
.\make_installer.ps1 -version '$(GetCrowdsecVersion.BuildVersion)'
|
||||||
displayName: "Build Crowdsec MSI"
|
displayName: "Build Crowdsec MSI"
|
||||||
name: BuildMSI
|
name: BuildMSI
|
||||||
|
|
||||||
- pwsh: |
|
- pwsh: |
|
||||||
$build_version=$Build.SourceBranchName
|
.\make_chocolatey.ps1 -version '$(GetCrowdsecVersion.BuildVersion)'
|
||||||
if ($build_version.Contains("-"))
|
|
||||||
{
|
|
||||||
$build_version = $build_version.Substring(0, $build_version.IndexOf("-"))
|
|
||||||
}
|
|
||||||
.\make_chocolatey.ps1 -version $build_version
|
|
||||||
displayName: "Build Chocolatey nupkg"
|
displayName: "Build Chocolatey nupkg"
|
||||||
|
|
||||||
- pwsh: |
|
- pwsh: |
|
||||||
|
@ -85,14 +82,14 @@ stages:
|
||||||
|
|
||||||
- task: PublishBuildArtifacts@1
|
- task: PublishBuildArtifacts@1
|
||||||
inputs:
|
inputs:
|
||||||
PathtoPublish: '$(Build.Repository.LocalPath)\\crowdsec_$(BuildMSI.BuildVersion).msi'
|
PathtoPublish: '$(Build.Repository.LocalPath)\\crowdsec_$(GetCrowdsecVersion.BuildVersion).msi'
|
||||||
ArtifactName: 'crowdsec.msi'
|
ArtifactName: 'crowdsec.msi'
|
||||||
publishLocation: 'Container'
|
publishLocation: 'Container'
|
||||||
displayName: "Upload MSI artifact"
|
displayName: "Upload MSI artifact"
|
||||||
|
|
||||||
- task: PublishBuildArtifacts@1
|
- task: PublishBuildArtifacts@1
|
||||||
inputs:
|
inputs:
|
||||||
PathtoPublish: '$(Build.Repository.LocalPath)\\windows\\Chocolatey\\crowdsec\\crowdsec.$(BuildMSI.BuildVersion).nupkg'
|
PathtoPublish: '$(Build.Repository.LocalPath)\\windows\\Chocolatey\\crowdsec\\crowdsec.$(GetCrowdsecVersion.BuildVersion).nupkg'
|
||||||
ArtifactName: 'crowdsec.nupkg'
|
ArtifactName: 'crowdsec.nupkg'
|
||||||
publishLocation: 'Container'
|
publishLocation: 'Container'
|
||||||
displayName: "Upload nupkg artifact"
|
displayName: "Upload nupkg artifact"
|
||||||
|
|
Loading…
Reference in a new issue