-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CI] Jenkins package pipeline for agentbeat (#38951)
* [CI] Jenkins package pipeline for auditbeat * Jenkins packaging: install msitools before packaging agentbeat * Install msiutils * Removed packaging-arm for agentbeat * Install msitools for agentbeat PR packaging * Install msitools for agentbeat PR packaging * Fix missing close ) * Fix osquerybeat packaging buildkite * Fix ispackaging * Improved changesets for agentbeat * made install-msitools.sh executable * Fix osquerybeat packaging for buildkite * Cleanup * Install tools without sudo * test: moved packaging before build&tests for check * test: packaging pipeline * added sudo * Cleanup * Cleanup --------- Co-authored-by: Blake Rouse <[email protected]> Co-authored-by: Craig MacKenzie <[email protected]>
- Loading branch information
1 parent
aae9185
commit 3f06575
Showing
10 changed files
with
102 additions
and
99 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
|
||
sudo apt-get update -y | ||
DEBIAN_FRONTEND=noninteractive sudo apt-get install --no-install-recommends --yes msitools |
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
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,39 @@ | ||
when: | ||
branches: true ## for all the branches | ||
changeset: ## when PR contains any of those entries in the changeset | ||
- "^x-pack/agentbeat/.*" | ||
- "^auditbeat/.*" | ||
- "^filebeat/.*" | ||
- "^heartbeat/.*" | ||
- "^metricbeat/.*" | ||
- "^osquerybeat/.*" | ||
- "^packetbeat/.*" | ||
- "@oss" | ||
- "@xpack" | ||
comments: ## when PR comment contains any of those entries | ||
- "/test agentbeat" | ||
labels: ## when PR labels matches any of those entries | ||
- "agentbeat" | ||
parameters: ## when parameter was selected in the UI. | ||
- "agentbeat" | ||
tags: true ## for all the tags | ||
platform: "immutable && ubuntu-22" ## default label for all the stages | ||
stages: | ||
packaging-linux: | ||
packaging-linux: "mage package" | ||
e2e: | ||
enabled: false | ||
stage: packaging | ||
when: | ||
branches: false ## Only on a PR basis for the time being | ||
tags: false ## packaging on branches/tags is already in place with the downstream build. | ||
changeset: ## when PR contains any of those entries in the changeset | ||
- "^x-pack/agentbeat/.*" | ||
- "^auditbeat/.*" | ||
- "^filebeat/.*" | ||
- "^heartbeat/.*" | ||
- "^metricbeat/.*" | ||
- "^osquerybeat/.*" | ||
- "^packetbeat/.*" | ||
- "@oss" ## special token regarding the changeset for the oss | ||
- "@xpack" |
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,21 @@ | ||
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
// or more contributor license agreements. Licensed under the Elastic License; | ||
// you may not use this file except in compliance with the Elastic License. | ||
|
||
package msiutil | ||
|
||
import ( | ||
"context" | ||
"fmt" | ||
|
||
"github.com/elastic/beats/v7/x-pack/osquerybeat/internal/command" | ||
) | ||
|
||
// Expand runs msiextract to extract the MSI. | ||
func Expand(msiFile, dstDir string) error { | ||
output, err := command.Execute(context.Background(), "msiextract", "--directory", dstDir, msiFile) | ||
if err != nil { | ||
return fmt.Errorf("failed to run msiextract: %w (output: %s)", err, output) | ||
} | ||
return nil | ||
} |
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