Skip to content

Commit cd2bb85

Browse files
authored
Merge branch 'main' into create-pull-request/update-jmx-metric-gatherer
2 parents a98ecf5 + 453d565 commit cd2bb85

File tree

44 files changed

+1796
-1425
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1796
-1425
lines changed

.codecov.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ coverage:
1313
project:
1414
default:
1515
enabled: yes
16-
target: 50%
16+
target: 30%
1717
patch:
1818
default:
1919
enabled: yes

.github/workflows/dotnet-instr-deployer-add-on.yml

+44-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ on:
99
paths:
1010
- 'packaging/dotnet-instr-deployer-add-on/**'
1111
- '.github/workflows/dotnet-instr-deployer-add-on.yml'
12+
schedule:
13+
- cron: '0 1 * * 1,4' # Every Monday and Thursday at 1 AM UTC
1214
workflow_dispatch:
1315
inputs:
1416
splunk_uf_version:
@@ -27,7 +29,7 @@ env:
2729
splunk_uf_build_hash: ${{ github.event.inputs.splunk_uf_build_hash || '6b4ebe426ca6' }}
2830

2931
jobs:
30-
build-pack-test-dotnet-deployer-ta:
32+
build-pack-test-dotnet-instrumentation-deployer-ta:
3133
runs-on: windows-latest
3234

3335
steps:
@@ -86,3 +88,44 @@ jobs:
8688
if: always()
8789
run: |
8890
Get-Content "${Env:ProgramFiles}\SplunkUniversalForwarder\var\log\splunk\splunk_otel_dotnet_deployer.log"
91+
92+
push-release-tag:
93+
name: Push Release Tag
94+
runs-on: ubuntu-24.04
95+
needs: [build-pack-test-dotnet-instrumentation-deployer-ta]
96+
if: github.ref == 'refs/heads/main'
97+
steps:
98+
- name: Checkout
99+
uses: actions/checkout@v4
100+
101+
- name: Read version from app.conf
102+
id: read-app-conf
103+
run: |
104+
version=$(grep -oP '^version = \K.*' packaging/dotnet-instr-deployer-add-on/assets/default/app.conf)
105+
echo "version=$version" >> $GITHUB_OUTPUT
106+
107+
- name: Ensure version is read from app.conf
108+
if: steps.read-app-conf.outputs.version == ''
109+
run: echo "Fail to read version from app.conf" && exit 1
110+
111+
- name: Push new release tag if it doesn't exist
112+
uses: actions/github-script@v7
113+
with:
114+
github-token: ${{ secrets.GITHUB_TOKEN }}
115+
script: |
116+
const tagRef = "tags/dotnet-instrumentation-deployer-ta-v${{ steps.read-app-conf.outputs.version }}"
117+
const existingRefs = await github.rest.git.listMatchingRefs({
118+
owner: context.repo.owner,
119+
repo: context.repo.repo,
120+
ref: tagRef
121+
})
122+
if (existingRefs.data.length === 0) {
123+
await github.rest.git.createRef({
124+
owner: context.repo.owner,
125+
repo: context.repo.repo,
126+
ref: "refs/" + tagRef,
127+
sha: context.sha
128+
})
129+
} else {
130+
console.log(tagRef + " already exists")
131+
}

.gitlab-ci.yml

+84
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ update-otel-deps:
222222
only:
223223
- schedules
224224
extends: .go-cache
225+
tags: [large]
225226
stage: update-deps
226227
needs: []
227228
dependencies: []
@@ -233,6 +234,7 @@ update-otel-deps-nightly:
233234
only:
234235
- schedules
235236
extends: .go-cache
237+
tags: [large]
236238
stage: update-deps
237239
needs: []
238240
dependencies: []
@@ -294,6 +296,7 @@ tidy-dependabot-pr:
294296
rules:
295297
- if: ($CI_COMMIT_BRANCH =~ /^dependabot\/go_modules\/.*/) && ($CI_COMMIT_AUTHOR =~ /^dependabot.*/) && (($CI_PIPELINE_SOURCE == "merge_request_event") || ($CI_PIPELINE_SOURCE == "push"))
296298
extends: .go-cache
299+
tags: [large]
297300
stage: update-deps
298301
needs: []
299302
dependencies: []
@@ -305,6 +308,7 @@ compile:
305308
extends:
306309
- .trigger-filter
307310
- .go-cache
311+
tags: [large]
308312
stage: build
309313
needs: []
310314
parallel:
@@ -1724,6 +1728,7 @@ github-release:
17241728
extends:
17251729
- .trigger-filter
17261730
- .go-cache
1731+
tags: [large]
17271732
stage: github-release
17281733
dependencies:
17291734
- compile
@@ -1838,3 +1843,82 @@ chef-release:
18381843
- cp -r deployments/chef /tmp/cookbooks/splunk_otel_collector
18391844
script:
18401845
- knife supermarket share -o /tmp/cookbooks splunk_otel_collector
1846+
1847+
.trigger-dotnet-instrumentation-deployer:
1848+
only:
1849+
variables:
1850+
- $CI_COMMIT_TAG =~ /^dotnet-instrumentation-deployer-ta-v[0-9]+\.[0-9]+\.[0-9]+[^ ]*$/
1851+
except:
1852+
- schedules
1853+
1854+
build-dotnet-instrumentation-deployer:
1855+
extends: .trigger-dotnet-instrumentation-deployer
1856+
image: '${DOCKER_HUB_REPO}/golang:${GO_VERSION}'
1857+
stage: build
1858+
needs: []
1859+
dependencies: []
1860+
before_script:
1861+
- cd packaging/dotnet-instr-deployer-add-on
1862+
script:
1863+
- make download-dotnet-assets
1864+
- make build
1865+
artifacts:
1866+
paths:
1867+
- packaging/dotnet-instr-deployer-add-on/assets/windows_x86_64/bin/*
1868+
1869+
sign-dotnet-instrumentation-deployer-exe:
1870+
extends:
1871+
- .trigger-dotnet-instrumentation-deployer
1872+
- .submit-signing-request
1873+
stage: sign-binaries
1874+
retry: 2
1875+
dependencies:
1876+
- build-dotnet-instrumentation-deployer
1877+
variables:
1878+
ARTIFACT: packaging/dotnet-instr-deployer-add-on/assets/windows_x86_64/bin/splunk_otel_dotnet_deployer.exe
1879+
SIGN_TYPE: WIN
1880+
DOWNLOAD_DIR: packaging/dotnet-instr-deployer-add-on/assets/windows_x86_64/bin
1881+
artifacts:
1882+
paths:
1883+
- packaging/dotnet-instr-deployer-add-on/assets/windows_x86_64/bin/*
1884+
1885+
1886+
pack-dotnet-instrumentation-deployer:
1887+
extends: .trigger-dotnet-instrumentation-deployer
1888+
image: '${DOCKER_HUB_REPO}/golang:${GO_VERSION}'
1889+
stage: package
1890+
dependencies:
1891+
- sign-dotnet-instrumentation-deployer-exe
1892+
before_script:
1893+
- cd packaging/dotnet-instr-deployer-add-on
1894+
script:
1895+
- make pack
1896+
artifacts:
1897+
paths:
1898+
- packaging/dotnet-instr-deployer-add-on/assets/windows_x86_64/bin/*
1899+
- packaging/dotnet-instr-deployer-add-on/out/distribution/splunk_otel_dotnet_deployer.tgz
1900+
1901+
dotnet-instrumentation-deployer-release:
1902+
extends:
1903+
- .trigger-dotnet-instrumentation-deployer
1904+
- .go-cache # Use this image since this job uses the ghr tool
1905+
tags: [large]
1906+
stage: github-release
1907+
dependencies:
1908+
- pack-dotnet-instrumentation-deployer
1909+
script:
1910+
- export
1911+
- cd packaging/dotnet-instr-deployer-add-on
1912+
- pushd out/distribution/ && shasum -a 256 * > checksums.txt && popd
1913+
- |
1914+
set -e
1915+
if [[ "${CI_COMMIT_TAG:-}" =~ ^dotnet-instrumentation-deployer-ta-v([0-9]+\.[0-9]+\.[0-9]+[^ ]*) ]]; then
1916+
VERSION=${BASH_REMATCH[1]}
1917+
VERSION_CHANGELOG="$(awk -v version="$VERSION" '/^## / { if (p) { exit }; if ($2 == version) { p=1; next } } p && NF' CHANGELOG.md)"
1918+
SPLUNK_OTEL_DOTNET_VERSION=$(grep -oP 'version = \K.*' assets/windows_x86_64/bin/Splunk.OTel.DotNet.psm1 | tr -d '"')
1919+
RELEASE_NOTES=$(echo -e "$VERSION_CHANGELOG\n\nShipping Splunk OpenTelemetry .NET $SPLUNK_OTEL_DOTNET_VERSION")
1920+
ghr -t "$GITHUB_TOKEN" -u signalfx -r splunk-otel-collector -prerelease -draft -n "Splunk OpenTelemetry .NET Deployer Technical Add-On v$VERSION" -b "$RELEASE_NOTES" -replace "$CI_COMMIT_TAG" out/distribution/
1921+
else
1922+
echo "Failed to get version from $CI_COMMIT_TAG"
1923+
exit 1
1924+
fi

0 commit comments

Comments
 (0)