From 6a382ad4b45c63b40884142e5e83035657860a3f Mon Sep 17 00:00:00 2001 From: Paolo Chila Date: Tue, 1 Apr 2025 09:43:34 +0200 Subject: [PATCH 01/42] Add component list to specs --- dev-tools/mage/pkgtypes.go | 2 + dev-tools/packaging/packages.yml | 288 +++++++++++++++++++------------ 2 files changed, 175 insertions(+), 115 deletions(-) diff --git a/dev-tools/mage/pkgtypes.go b/dev-tools/mage/pkgtypes.go index 81aef4444ab..11726d99628 100644 --- a/dev-tools/mage/pkgtypes.go +++ b/dev-tools/mage/pkgtypes.go @@ -29,6 +29,7 @@ import ( "gopkg.in/yaml.v3" "github.com/elastic/elastic-agent/dev-tools/mage/pkgcommon" + "github.com/elastic/elastic-agent/dev-tools/packaging" ) const ( @@ -107,6 +108,7 @@ type PackageSpec struct { OutputFile string `yaml:"output_file,omitempty"` // Optional ExtraVars map[string]string `yaml:"extra_vars,omitempty"` // Optional ExtraTags []string `yaml:"extra_tags,omitempty"` // Optional + Components []packaging.BinarySpec `yaml:"components"` // Optional: Components required for this package evalContext map[string]interface{} packageDir string diff --git a/dev-tools/packaging/packages.yml b/dev-tools/packaging/packages.yml index e537dad6cd2..8c3fd8bed02 100644 --- a/dev-tools/packaging/packages.yml +++ b/dev-tools/packaging/packages.yml @@ -4,6 +4,126 @@ # Official Beats. The shared section contains YAML anchors that are used to # define common parts of the package in order to not repeat ourselves. +# List all the available platforms +platforms: &all-platforms + - &linux-amd64 + os: linux + arch: x86_64 + - &linux-arm64 + os: linux + arch: arm64 + - &windows-amd64 + os: windows + arch: x86_64 + - &darwin-amd64 + os: darwin + arch: x86_64 + - &darwin-arm64 + os: darwin + arch: aarch64 + +# List all the package type constants (see dev-tools/mage/pkgcommon/pkgcommon-types.go) +packageTypes: &all-package-types + - &pkg-type-rpm + 1 # RPM + - &pkg-type-deb + 2 # Deb + - &pkg-type-zip + 3 # zip + - &pkg-type-targz + 4 # tar.gz + - &pkg-type-docker + 5 # docker + +# List *all* the components available for packaging in elastic-agent +components: + # general template for new components + # - &comp- + # projectName: + # packageName: