From 9e6b67600fdd3be13695b9794a2e78d87e2d2f58 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Tue, 23 Feb 2021 15:59:01 +0000 Subject: [PATCH] [CI] Add ARM packaging (#24041) --- Jenkinsfile | 27 +++++++++++++++++++++++++-- auditbeat/Jenkinsfile.yml | 6 ++++++ filebeat/Jenkinsfile.yml | 6 ++++++ heartbeat/Jenkinsfile.yml | 6 ++++++ journalbeat/Jenkinsfile.yml | 6 ++++++ metricbeat/Jenkinsfile.yml | 6 ++++++ packetbeat/Jenkinsfile.yml | 6 ++++++ x-pack/auditbeat/Jenkinsfile.yml | 6 ++++++ x-pack/dockerlogbeat/Jenkinsfile.yml | 6 ++++++ x-pack/elastic-agent/Jenkinsfile.yml | 6 ++++++ x-pack/filebeat/Jenkinsfile.yml | 8 +++++++- x-pack/heartbeat/Jenkinsfile.yml | 6 ++++++ x-pack/metricbeat/Jenkinsfile.yml | 6 ++++++ x-pack/packetbeat/Jenkinsfile.yml | 6 ++++++ 14 files changed, 104 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index b317251ce53..41a839fff3e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -262,7 +262,20 @@ def k8sTest(Map args = [:]) { } /** -* This method runs the packaging +* This method runs the packaging for ARM +*/ +def packagingArm(Map args = [:]) { + def PLATFORMS = [ 'linux/arm64' ].join(' ') + withEnv([ + "PLATFORMS=${PLATFORMS}", + "PACKAGES=docker" + ]) { + target(args) + } +} + +/** +* This method runs the packaging for Linux */ def packagingLinux(Map args = [:]) { def PLATFORMS = [ '+all', @@ -286,7 +299,6 @@ def packagingLinux(Map args = [:]) { } } - /** * Upload the packages to their snapshot or pull request buckets * @param beatsFolder beats folder @@ -922,6 +934,17 @@ class RunCommand extends co.elastic.beats.BeatsFunction { if(args?.content?.containsKey('mage')) { steps.target(context: args.context, command: args.content.mage, directory: args.project, label: args.label, withModule: withModule, isMage: true, id: args.id) } + if(args?.content?.containsKey('packaging-arm')) { + steps.packagingArm(context: args.context, + command: args.content.get('packaging-arm'), + directory: args.project, + label: args.label, + isMage: true, + id: args.id, + e2e: args.content.get('e2e'), + package: true, + dockerArch: 'arm64') + } if(args?.content?.containsKey('packaging-linux')) { steps.packagingLinux(context: args.context, command: args.content.get('packaging-linux'), diff --git a/auditbeat/Jenkinsfile.yml b/auditbeat/Jenkinsfile.yml index 346145606b5..aadb8b52ce8 100644 --- a/auditbeat/Jenkinsfile.yml +++ b/auditbeat/Jenkinsfile.yml @@ -87,3 +87,9 @@ stages: packaging-linux: "mage package" e2e: enabled: false + packaging-arm: + packaging-arm: "mage package" + e2e: + enabled: false + platforms: ## override default label in this specific stage. + - "arm" diff --git a/filebeat/Jenkinsfile.yml b/filebeat/Jenkinsfile.yml index 10947425828..b5083f0b068 100644 --- a/filebeat/Jenkinsfile.yml +++ b/filebeat/Jenkinsfile.yml @@ -85,3 +85,9 @@ stages: packaging-linux: "mage package" e2e: enabled: false + packaging-arm: + packaging-arm: "mage package" + e2e: + enabled: false + platforms: ## override default label in this specific stage. + - "arm" diff --git a/heartbeat/Jenkinsfile.yml b/heartbeat/Jenkinsfile.yml index 8c1bbeaa574..0d4be939c18 100644 --- a/heartbeat/Jenkinsfile.yml +++ b/heartbeat/Jenkinsfile.yml @@ -84,3 +84,9 @@ stages: packaging-linux: "mage package" e2e: enabled: false + packaging-arm: + packaging-arm: "mage package" + e2e: + enabled: false + platforms: ## override default label in this specific stage. + - "arm" diff --git a/journalbeat/Jenkinsfile.yml b/journalbeat/Jenkinsfile.yml index 0336f113162..a91d99dd115 100644 --- a/journalbeat/Jenkinsfile.yml +++ b/journalbeat/Jenkinsfile.yml @@ -37,3 +37,9 @@ stages: packaging-linux: "mage package" e2e: enabled: false + packaging-arm: + packaging-arm: "mage package" + e2e: + enabled: false + platforms: ## override default label in this specific stage. + - "arm" diff --git a/metricbeat/Jenkinsfile.yml b/metricbeat/Jenkinsfile.yml index 70874ab1277..1e219ea95b1 100644 --- a/metricbeat/Jenkinsfile.yml +++ b/metricbeat/Jenkinsfile.yml @@ -79,3 +79,9 @@ stages: packaging-linux: "mage package" e2e: enabled: false ## e2e is enabled only for x-pack beats + packaging-arm: + packaging-arm: "mage package" + e2e: + enabled: false + platforms: ## override default label in this specific stage. + - "arm" diff --git a/packetbeat/Jenkinsfile.yml b/packetbeat/Jenkinsfile.yml index 3205b791b79..be0dd1d9522 100644 --- a/packetbeat/Jenkinsfile.yml +++ b/packetbeat/Jenkinsfile.yml @@ -85,3 +85,9 @@ stages: packaging-linux: "mage package" e2e: enabled: false + packaging-arm: + packaging-arm: "mage package" + e2e: + enabled: false + platforms: ## override default label in this specific stage. + - "arm" diff --git a/x-pack/auditbeat/Jenkinsfile.yml b/x-pack/auditbeat/Jenkinsfile.yml index 7a1edec5dd2..fe8ef3658c7 100644 --- a/x-pack/auditbeat/Jenkinsfile.yml +++ b/x-pack/auditbeat/Jenkinsfile.yml @@ -85,3 +85,9 @@ stages: packaging-linux: "mage package" e2e: enabled: false + packaging-arm: + packaging-arm: "mage package" + e2e: + enabled: false + platforms: ## override default label in this specific stage. + - "arm" diff --git a/x-pack/dockerlogbeat/Jenkinsfile.yml b/x-pack/dockerlogbeat/Jenkinsfile.yml index ee9a4b06aca..d31c4e32b5f 100644 --- a/x-pack/dockerlogbeat/Jenkinsfile.yml +++ b/x-pack/dockerlogbeat/Jenkinsfile.yml @@ -25,3 +25,9 @@ stages: packaging-linux: "mage package" e2e: enabled: false + packaging-arm: + packaging-arm: "mage package" + e2e: + enabled: false + platforms: ## override default label in this specific stage. + - "arm" diff --git a/x-pack/elastic-agent/Jenkinsfile.yml b/x-pack/elastic-agent/Jenkinsfile.yml index 9a30d836391..dc642ce1ca3 100644 --- a/x-pack/elastic-agent/Jenkinsfile.yml +++ b/x-pack/elastic-agent/Jenkinsfile.yml @@ -89,3 +89,9 @@ stages: packaging-linux: "mage package" e2e: enabled: false + packaging-arm: + packaging-arm: "mage package" + e2e: + enabled: false + platforms: ## override default label in this specific stage. + - "arm" diff --git a/x-pack/filebeat/Jenkinsfile.yml b/x-pack/filebeat/Jenkinsfile.yml index 5985900fcda..d6961a6a4b1 100644 --- a/x-pack/filebeat/Jenkinsfile.yml +++ b/x-pack/filebeat/Jenkinsfile.yml @@ -91,4 +91,10 @@ stages: packaging-linux: packaging-linux: "mage package" e2e: - enabled: false \ No newline at end of file + enabled: false + packaging-arm: + packaging-arm: "mage package" + e2e: + enabled: false + platforms: ## override default label in this specific stage. + - "arm" \ No newline at end of file diff --git a/x-pack/heartbeat/Jenkinsfile.yml b/x-pack/heartbeat/Jenkinsfile.yml index 3cd24f2c2b7..cc6cb0525ab 100644 --- a/x-pack/heartbeat/Jenkinsfile.yml +++ b/x-pack/heartbeat/Jenkinsfile.yml @@ -74,3 +74,9 @@ stages: packaging-linux: "mage package" e2e: enabled: false + packaging-arm: + packaging-arm: "mage package" + e2e: + enabled: false + platforms: ## override default label in this specific stage. + - "arm" diff --git a/x-pack/metricbeat/Jenkinsfile.yml b/x-pack/metricbeat/Jenkinsfile.yml index 08aaa1d6fc0..f38240dbf4a 100644 --- a/x-pack/metricbeat/Jenkinsfile.yml +++ b/x-pack/metricbeat/Jenkinsfile.yml @@ -84,3 +84,9 @@ stages: e2e: enabled: false entrypoint: 'metricbeat-test.sh' + packaging-arm: + packaging-arm: "mage package" + e2e: + enabled: false + platforms: ## override default label in this specific stage. + - "arm" diff --git a/x-pack/packetbeat/Jenkinsfile.yml b/x-pack/packetbeat/Jenkinsfile.yml index dcefc94c669..be199fa928e 100644 --- a/x-pack/packetbeat/Jenkinsfile.yml +++ b/x-pack/packetbeat/Jenkinsfile.yml @@ -86,3 +86,9 @@ stages: packaging-linux: "mage package" e2e: enabled: false + packaging-arm: + packaging-arm: "mage package" + e2e: + enabled: false + platforms: ## override default label in this specific stage. + - "arm"