Skip to content

Commit

Permalink
Rename BuildFleetInstaller to PublishFleetInstaller
Browse files Browse the repository at this point in the history
Also create a zip (as easier to manage in gitlab)
  • Loading branch information
andrewlock committed Feb 12, 2025
1 parent a9bc069 commit 4236975
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ build:
-e SIGN_WINDOWS=true `
-e NUGET_CERT_REVOCATION_MODE=offline `
registry.ddbuild.io/images/mirror/datadog/dd-trace-dotnet-docker-build:latest `
Info Clean BuildTracerHome BuildProfilerHome BuildNativeLoader BuildDdDotnet BuildFleetInstaller PackageTracerHome ZipSymbols SignDlls SignMsi
Info Clean BuildTracerHome BuildProfilerHome BuildNativeLoader BuildDdDotnet PublishFleetInstaller PackageTracerHome ZipSymbols SignDlls SignMsi
- mkdir artifacts-out
- xcopy /e/s build-out\${CI_JOB_ID}\*.* artifacts-out
- remove-item -recurse -force build-out\${CI_JOB_ID}
Expand Down
4 changes: 2 additions & 2 deletions .gitlab/prepare-oci-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ elif [ "$OS" == "windows" ]; then
unzip ../artifacts/windows/windows-tracer-home.zip -d sources/library
find sources/library -type f -name "*.xml" -delete

# Copy the fleet installer to the sub-directory
# Unzip the fleet installer to the sub-directory
mkdir -p sources/installer
cp -r ../artifacts/windows/Datadog.FleetInstaller/. sources/installer/
unzip ../artifacts/windows/fleet-installer.zip -d sources/installer/

fi

Expand Down
17 changes: 13 additions & 4 deletions tracer/build/_build/Build.Steps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -743,22 +743,31 @@ async Task DownloadWafVersion(string libddwafVersion = null, string uncompressFo
.DependsOn(PublishNativeTracerUnix)
.DependsOn(PublishNativeTracerOsx);

Target BuildFleetInstaller => _ => _
Target PublishFleetInstaller => _ => _
.Unlisted()
.Description("Builds the fleet installer binary files from the repo")
.After(Clean, Restore)
.Description("Builds and publishes the fleet installer binary files as a zip")
.After(Clean, Restore, CompileManagedSrc)
.Before(SignDlls)
.OnlyWhenStatic(() => IsWin)
.Executes(() =>
{
// Build the fleet installer project
var project = SourceDirectory / "Datadog.FleetInstaller" / "Datadog.FleetInstaller.csproj";
var tfms = Solution.GetProject(project).GetTargetFrameworks();
// we should only have a single tfm for fleet installer
if (tfms.Count != 1)
{
throw new ApplicationException("Fleet installer should only have a single target framework but found: " + string.Join(", ", tfms));
}

var publishFolder = ArtifactsDirectory / "Datadog.FleetInstaller";
DotNetPublish(s => s
.SetProject(project)
.SetConfiguration(BuildConfiguration)
.SetOutput(ArtifactsDirectory / "Datadog.FleetInstaller")
.SetOutput(publishFolder)
.CombineWith(tfms, (p, tfm) => p.SetFramework(tfm)));

CompressZip(publishFolder, ArtifactsDirectory / "fleet-installer.zip", fileMode: FileMode.Create);
});

Target BuildMsi => _ => _
Expand Down

0 comments on commit 4236975

Please sign in to comment.