Skip to content

Commit a8cfb38

Browse files
authored
change choco to release with github artifacts and dotnet deployer addon (#6383)
* change choco to release with github artifacts and dotnet deployer addon * actually, break this step up into build + publish steps
1 parent 89f059a commit a8cfb38

File tree

1 file changed

+26
-8
lines changed

1 file changed

+26
-8
lines changed

.gitlab-ci.yml

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ stages:
3232
- release
3333
- docker-manifest-release
3434
- xray-scan
35-
- github-release
35+
- publish-release
3636

3737
include:
3838
- project: 'prodsec/scp-scanning/gitlab-checkmarx'
@@ -1563,7 +1563,7 @@ release-installers:
15631563
before_script:
15641564
- cp -f dist/signed/install.ps1 packaging/installer/install.ps1
15651565

1566-
choco-release:
1566+
nupkg-release:
15671567
extends: .trigger-filter
15681568
stage: release
15691569
dependencies:
@@ -1582,14 +1582,33 @@ choco-release:
15821582
}
15831583
.\packaging\choco\make.ps1 build_choco -Version $version -BuildDir .\dist\signed
15841584
- Test-Path .\dist\signed\splunk-otel-collector.${version}.nupkg
1585+
artifacts:
1586+
paths:
1587+
- dist/signed/*.nupkg
1588+
1589+
choco-release:
1590+
extends: .trigger-filter
1591+
stage: publish-release
1592+
dependencies:
1593+
- nupkg-release
1594+
tags:
1595+
- splunk-otel-collector-windows
1596+
script:
1597+
- |
1598+
$ErrorActionPreference = 'Stop'
1599+
Set-PSDebug -Trace 1
1600+
$msi_file_name = Resolve-Path .\dist\signed\splunk-otel-collector*.msi | Split-Path -leaf
1601+
if ($msi_file_name -match '(\d+\.\d+\.\d+)(\.\d+)?') {
1602+
$version = $matches[0]
1603+
} else {
1604+
throw "Failed to get version from $msi_file_name"
1605+
}
1606+
- Test-Path .\dist\signed\splunk-otel-collector.${version}.nupkg
15851607
- |
15861608
# Only push the choco package for stable release tags
15871609
if ($env:CI_COMMIT_TAG -match '^v\d+\.\d+\.\d+$') {
15881610
choco push -k $env:CHOCO_TOKEN .\dist\signed\splunk-otel-collector.${version}.nupkg
15891611
}
1590-
artifacts:
1591-
paths:
1592-
- dist/signed/*.nupkg
15931612
15941613
push-multiarch-manifest:
15951614
extends: .trigger-filter
@@ -1752,7 +1771,7 @@ github-release:
17521771
- .trigger-filter
17531772
- .go-cache
17541773
tags: [large]
1755-
stage: github-release
1774+
stage: publish-release
17561775
dependencies:
17571776
- compile
17581777
- otelcol-fips
@@ -1764,7 +1783,6 @@ github-release:
17641783
- sign-msi
17651784
- sign-tar
17661785
- push-multiarch-manifest
1767-
- choco-release
17681786
- sign-agent-bundles
17691787
script:
17701788
- mkdir -p dist/assets
@@ -1926,7 +1944,7 @@ dotnet-instrumentation-deployer-release:
19261944
- .trigger-dotnet-instrumentation-deployer
19271945
- .go-cache # Use this image since this job uses the ghr tool
19281946
tags: [large]
1929-
stage: github-release
1947+
stage: publish-release
19301948
dependencies:
19311949
- pack-dotnet-instrumentation-deployer
19321950
script:

0 commit comments

Comments
 (0)