-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
587 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
wontfix | ||
autoinstrumentation | ||
Bson | ||
buildtasks | ||
Configurator | ||
coreutils | ||
dylib | ||
mktemp | ||
myapp | ||
opentelemetry | ||
opentracing | ||
OTLP | ||
proto | ||
protos | ||
tracecontext | ||
dylib | ||
myapp | ||
TMPDIR | ||
mktemp | ||
coreutils | ||
signalfx | ||
Bson | ||
opentracing | ||
Configurator | ||
TMPDIR | ||
tracecontext | ||
wontfix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
src/Splunk.OpenTelemetry.AutoInstrumentation/splunk-launch.sh eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,11 +105,54 @@ jobs: | |
name: bin-${{ matrix.base-image }} | ||
path: bin/splunk-*.zip | ||
|
||
build-nuget-package: | ||
runs-on: windows-2022 | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 # fetching all, needed to correctly calculate version | ||
- uses: actions/[email protected] | ||
with: | ||
dotnet-version: | | ||
6.0.410 | ||
7.0.304 | ||
- run: ./build.cmd NuGetWorkflow | ||
- uses: actions/[email protected] | ||
with: | ||
name: nuget-package | ||
path: NuGetPackage/ | ||
|
||
test-nuget-package: | ||
needs: build-nuget-package | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- machine: ubuntu-20.04 | ||
- machine: macos-11 | ||
runs-on: ${{ matrix.machine }} | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 # fetching all, needed to correctly calculate version | ||
- uses: actions/[email protected] | ||
with: | ||
dotnet-version: | | ||
6.0.410 | ||
7.0.304 | ||
- name: Download NuGet Artifacts from build-nuget-package job | ||
uses: actions/[email protected] | ||
with: | ||
name: nuget-package | ||
path: NuGetPackage/ | ||
- name: Test NuGet Package | ||
run: ./build.cmd TestNuGetPackage | ||
|
||
create-release: | ||
if: github.ref_type == 'tag' | ||
name: Create GitHub release | ||
runs-on: ubuntu-20.04 | ||
needs: [ build, container-build ] | ||
needs: [ build, container-build, build-nuget-package, test-nuget-package ] | ||
permissions: | ||
contents: write | ||
timeout-minutes: 10 | ||
|
@@ -123,8 +166,8 @@ jobs: | |
- run: cp bin-windows-2022/splunk-*.zip ./splunk-opentelemetry-dotnet-windows.zip | ||
- run: cp bin-macos-11/splunk-*.zip ./splunk-opentelemetry-dotnet-macos.zip | ||
- name: Calculate checksum | ||
run: sha256sum ./*.zip ./splunk-otel-dotnet-install.sh ./Splunk.OTel.DotNet.psm1 >> checksum.txt | ||
run: sha256sum ./*.zip ./nuget-package/*.nupkg ./splunk-otel-dotnet-install.sh ./Splunk.OTel.DotNet.psm1 >> checksum.txt | ||
- name: Create Release | ||
run: gh release create ${{ github.ref_name }} --title ${{ github.ref_name }} --verify-tag --draft ./*.zip ./splunk-otel-dotnet-install.sh ./Splunk.OTel.DotNet.psm1 checksum.txt | ||
run: gh release create ${{ github.ref_name }} --title ${{ github.ref_name }} --verify-tag --draft ./*.zip ./nuget-package/*.nupkg ./splunk-otel-dotnet-install.sh ./Splunk.OTel.DotNet.psm1 checksum.txt | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -457,4 +457,5 @@ $RECYCLE.BIN/ | |
.nuke/temp/* | ||
.nuke/build.schema.json | ||
|
||
NuGetPackage/ | ||
OpenTelemetryDistribution/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
using System.Runtime.InteropServices; | ||
using Nuke.Common; | ||
using Nuke.Common.IO; | ||
using Nuke.Common.ProjectModel; | ||
using Nuke.Common.Tools.DotNet; | ||
using Nuke.Common.Tools.MSBuild; | ||
|
||
using static Nuke.Common.Tools.DotNet.DotNetTasks; | ||
|
||
partial class Build : NukeBuild | ||
{ | ||
readonly AbsolutePath NuGetPackageFolder = RootDirectory / "NuGetPackage"; | ||
|
||
Target BuildNuGetPackage => _ => _ | ||
.Executes(() => | ||
{ | ||
var project = Solution.AllProjects.First(project => project.Name == "Splunk.OpenTelemetry.AutoInstrumentation"); | ||
DotNetPack(s => s | ||
.SetProject(project) | ||
.SetConfiguration(Configuration) | ||
.SetOutputDirectory(NuGetPackageFolder)); | ||
}); | ||
|
||
|
||
Target BuildNuGetPackageTestApplication => _ => _ | ||
.After(BuildNuGetPackage) | ||
.Executes(() => | ||
{ | ||
var project = Solution.AllProjects.First(project => project.Name == "TestApplication.SelfContained"); | ||
DotNetBuild(s => s | ||
.SetProjectFile(project) | ||
.SetProperty("NuGetPackageVersion", VersionHelper.GetVersion()) | ||
.SetRuntime(RuntimeInformation.RuntimeIdentifier) | ||
.SetSelfContained(true) | ||
.SetConfiguration(Configuration) | ||
.SetPlatform(Platform)); | ||
}); | ||
|
||
Target RunNuGetPackageIntegrationTests => _ => _ | ||
.After(BuildNuGetPackageTestApplication) | ||
.Executes(() => | ||
{ | ||
var project = Solution.AllProjects.First(project => project.Name == "Splunk.OpenTelemetry.AutoInstrumentation.IntegrationTests"); | ||
DotNetTest(s => s | ||
.SetProjectFile(project) | ||
.SetFilter("Category=NuGetPackage") | ||
.SetConfiguration(Configuration)); | ||
}); | ||
|
||
Target TestNuGetPackage => _ => _ | ||
.DependsOn(BuildNuGetPackageTestApplication) | ||
.DependsOn(RunNuGetPackageIntegrationTests) | ||
.Executes(() => | ||
{ | ||
}); | ||
|
||
Target NuGetWorkflow => _ => _ | ||
.DependsOn(BuildNuGetPackage) | ||
.DependsOn(TestNuGetPackage); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using System.Reflection; | ||
|
||
public static class VersionHelper | ||
{ | ||
static Lazy<string> Version = new Lazy<string>(() => | ||
typeof(VersionHelper).Assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>()!.InformationalVersion | ||
.Split('+')[0]); | ||
|
||
public static string GetVersion() | ||
{ | ||
return Version.Value; | ||
} | ||
|
||
public static string GetVersionWithoutSuffixes() | ||
{ | ||
return Version.Value.Split('-')[0]; | ||
} | ||
|
||
public static (string Major, string Minor, string Patch) GetVersionParts() | ||
{ | ||
var split = GetVersionWithoutSuffixes().Split("."); | ||
return (split[0], split[1], split[2]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.