Skip to content

Commit a5aaa1f

Browse files
authored
Merge branch 'main' into system-winlog-tags
2 parents a34a795 + 328838e commit a5aaa1f

File tree

1,764 files changed

+153830
-43760
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,764 files changed

+153830
-43760
lines changed

.buildkite/hooks/pre-command

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,16 @@ if [ -n "${ELASTIC_PACKAGE_LINKS_FILE_PATH+x}" ]; then
7474
export ELASTIC_PACKAGE_LINKS_FILE_PATH=${BASE_DIR}/${ELASTIC_PACKAGE_LINKS_FILE_PATH}
7575
fi
7676

77+
if [[ "${BUILDKITE_PIPELINE_SLUG}" == "integrations-publish" ]]; then
78+
if [[ "${BUILDKITE_STEP_KEY}" == "trigger-publish" ]]; then
79+
BUILDKITE_API_TOKEN=$(retry 5 vault kv get -field buildkite_token ${BUILDKITE_API_TOKEN_PATH})
80+
export BUILDKITE_API_TOKEN
81+
fi
82+
fi
83+
7784
if [[ "${BUILDKITE_PIPELINE_SLUG}" == "integrations" ]]; then
7885
if [[ "${BUILDKITE_STEP_KEY}" == "trigger-publish" ]]; then
86+
# TODO: To be removed
7987
BUILDKITE_API_TOKEN=$(retry 5 vault kv get -field buildkite_token ${BUILDKITE_API_TOKEN_PATH})
8088
export BUILDKITE_API_TOKEN
8189
fi

.buildkite/pipeline.publish.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
2+
3+
env:
4+
SETUP_GVM_VERSION: "v0.5.2"
5+
LINUX_AGENT_IMAGE: "golang:${GO_VERSION}"
6+
DOCKER_COMPOSE_VERSION: "v2.24.1"
7+
DOCKER_VERSION: "false"
8+
YQ_VERSION: 'v4.35.2'
9+
JQ_VERSION: '1.7'
10+
# Elastic package settings
11+
# Manage docker output/logs
12+
ELASTIC_PACKAGE_COMPOSE_DISABLE_ANSI: "true"
13+
ELASTIC_PACKAGE_COMPOSE_DISABLE_PULL_PROGRESS_INFORMATION: "true"
14+
# Default license to use by `elastic-package build`
15+
ELASTIC_PACKAGE_REPOSITORY_LICENSE: "licenses/Elastic-2.0.txt"
16+
# Link definitions path (full path to be set in the corresponding step)
17+
ELASTIC_PACKAGE_LINKS_FILE_PATH: "links_table.yml"
18+
# Disable comparison of results in pipeline tests to avoid errors related to GeoIP fields
19+
ELASTIC_PACKAGE_SERVERLESS_PIPELINE_TEST_DISABLE_COMPARE_RESULTS: "true"
20+
NOTIFY_TO: "ecosystem-team@elastic.co"
21+
22+
steps:
23+
- label: ":white_check_mark: Check go sources"
24+
key: "check"
25+
command: ".buildkite/scripts/check_sources.sh"
26+
agents:
27+
image: "${LINUX_AGENT_IMAGE}"
28+
cpu: "8"
29+
memory: "4G"
30+
31+
- label: ":package: Build packages"
32+
key: "build-packages"
33+
command: ".buildkite/scripts/build_packages.sh"
34+
agents:
35+
image: "${LINUX_AGENT_IMAGE}"
36+
cpu: "8"
37+
memory: "8G"
38+
env:
39+
ARTIFACTS_FOLDER: "artifacts-to-sign"
40+
DRY_RUN: "true"
41+
depends_on:
42+
- step: "check"
43+
allow_failure: false
44+
artifact_paths:
45+
- artifacts-to-sign/*.zip
46+
47+
notify:
48+
- email: "$NOTIFY_TO"
49+
if: "build.state == 'failed' && build.env('BUILDKITE_PULL_REQUEST') == 'false'"

.buildkite/pipeline.schedule-daily.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,20 @@ steps:
2222
SERVERLESS: "false"
2323
SKIP_PUBLISHING: "true"
2424
FORCE_CHECK_ALL: "true"
25-
STACK_VERSION: 7.17-SNAPSHOT
25+
# STACK_VERSION: 7.17-SNAPSHOT # Using 7.17.19 till https://github.com/elastic/fleet-server/issues/3435 is solved.
26+
STACK_VERSION: 7.17.19
2627
depends_on:
2728
- step: "check"
2829
allow_failure: false
2930

30-
- label: "Check integrations local stacks - Stack Version v8.13"
31+
- label: "Check integrations local stacks - Stack Version v8.14"
3132
trigger: "integrations"
3233
build:
3334
env:
3435
SERVERLESS: "false"
3536
SKIP_PUBLISHING: "true"
3637
FORCE_CHECK_ALL: "true"
37-
STACK_VERSION: 8.13.0-SNAPSHOT
38+
STACK_VERSION: 8.14.0-SNAPSHOT
3839
PUBLISH_COVERAGE_REPORTS: "true"
3940
depends_on:
4041
- step: "check"
@@ -59,3 +60,10 @@ steps:
5960
depends_on:
6061
- step: "check"
6162
allow_failure: false
63+
64+
- label: ":package: Publish missing packages"
65+
key: "trigger-integrations-publish"
66+
trigger: "integrations-publish"
67+
depends_on:
68+
- step: "check"
69+
allow_failure: false

.buildkite/pipeline.serverless.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
22

33
env:
4-
SETUP_GVM_VERSION: "v0.5.1"
4+
SETUP_GVM_VERSION: "v0.5.2"
55
LINUX_AGENT_IMAGE: "golang:${GO_VERSION}"
66
DOCKER_COMPOSE_VERSION: "v2.24.1"
77
DOCKER_VERSION: "false"

.buildkite/pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
22

33
env:
4-
SETUP_GVM_VERSION: "v0.5.1"
4+
SETUP_GVM_VERSION: "v0.5.2"
55
LINUX_AGENT_IMAGE: "golang:${GO_VERSION}"
66
DOCKER_COMPOSE_VERSION: "v2.24.1"
77
DOCKER_VERSION: "false"

.buildkite/pull-requests.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,22 @@
4747
"skip_target_branches": [],
4848
"skip_ci_on_only_changed": [],
4949
"always_require_ci_on_changed": []
50+
},
51+
{
52+
"enabled": false,
53+
"pipelineSlug": "integrations-publish",
54+
"allow_org_users": true,
55+
"allowed_repo_permissions": ["admin", "write"],
56+
"allowed_list": [],
57+
"set_commit_status": false,
58+
"build_on_commit": false,
59+
"build_on_comment": false,
60+
"trigger_comment_regex": "",
61+
"always_trigger_comment_regex": "",
62+
"skip_ci_labels": [],
63+
"skip_target_branches": [],
64+
"skip_ci_on_only_changed": [],
65+
"always_require_ci_on_changed": []
5066
}
5167
]
5268
}

.github/CODEOWNERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@
227227
/packages/m365_defender @elastic/security-service-integrations
228228
/packages/mattermost @elastic/security-service-integrations
229229
/packages/memcached @elastic/obs-infraobs-integrations
230+
/packages/menlo @elastic/security-service-integrations
230231
/packages/microsoft_defender_cloud @elastic/security-service-integrations
231232
/packages/microsoft_defender_endpoint @elastic/security-service-integrations
232233
/packages/microsoft_dhcp @elastic/sec-windows-platform
@@ -236,6 +237,7 @@
236237
/packages/mimecast @elastic/security-service-integrations
237238
/packages/modsecurity @elastic/sec-deployment-and-devices
238239
/packages/mongodb @elastic/obs-infraobs-integrations
240+
/packages/mongodb_atlas @elastic/obs-infraobs-integrations
239241
/packages/mysql @elastic/obs-infraobs-integrations
240242
/packages/mysql_enterprise @elastic/sec-windows-platform
241243
/packages/nagios_xi @elastic/obs-infraobs-integrations
@@ -314,6 +316,7 @@
314316
/packages/ti_crowdstrike @elastic/security-service-integrations
315317
/packages/ti_cybersixgill @elastic/security-service-integrations
316318
/packages/ti_eclecticiq @elastic/security-service-integrations
319+
/packages/ti_eset @elastic/security-service-integrations
317320
/packages/ti_maltiverse @elastic/security-service-integrations
318321
/packages/ti_mandiant_advantage @elastic/security-service-integrations
319322
/packages/ti_misp @elastic/security-service-integrations
@@ -349,6 +352,7 @@
349352
/packages/windows/data_stream/powershell_operational @elastic/sec-windows-platform
350353
/packages/windows/data_stream/service @elastic/elastic-agent-data-plane
351354
/packages/windows/data_stream/sysmon_operational @elastic/sec-windows-platform
355+
/packages/windows_etw @elastic/sec-windows-platform
352356
/packages/winlog @elastic/sec-windows-platform
353357
/packages/wiz @elastic/security-service-integrations
354358
/packages/zeek @elastic/sec-deployment-and-devices
@@ -358,3 +362,4 @@
358362
/packages/zoom @elastic/security-service-integrations
359363
/packages/zscaler_zia @elastic/security-service-integrations
360364
/packages/zscaler_zpa @elastic/security-service-integrations
365+
/packages/jamf_protect @elastic/security-service-integrations

.go-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.21.1
1+
1.22.2

catalog-info.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,3 +199,47 @@ spec:
199199
access_level: MANAGE_BUILD_AND_READ
200200
everyone:
201201
access_level: BUILD_AND_READ
202+
203+
---
204+
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/e57ee3bed7a6f73077a3f55a38e76e40ec87a7cf/rre.schema.json
205+
apiVersion: backstage.io/v1alpha1
206+
kind: Resource
207+
metadata:
208+
name: buildkite-pipeline-integrations-publish
209+
description: 'Pipeline for the Integrations project to publish packages'
210+
links:
211+
- title: Pipeline
212+
url: https://buildkite.com/elastic/integrations-publish
213+
214+
spec:
215+
type: buildkite-pipeline
216+
owner: group:ingest-fp
217+
system: buildkite
218+
implementation:
219+
apiVersion: buildkite.elastic.dev/v1
220+
kind: Pipeline
221+
metadata:
222+
name: integrations-publish
223+
description: 'Pipeline for the Integrations project to publish packages'
224+
spec:
225+
# TODO: add backport-* in `branch_configuration` when these brances are updated
226+
# branch_configuration: "main backport-*"
227+
branch_configuration: "main"
228+
pipeline_file: ".buildkite/pipeline.publish.yml"
229+
provider_settings:
230+
build_pull_request_forks: false
231+
build_pull_requests: false # requires filter_enabled and filter_condition settings as below when used with buildkite-pr-bot
232+
build_tags: false
233+
filter_enabled: true
234+
filter_condition: >-
235+
build.pull_request.id == null || (build.creator.name == 'elasticmachine' && build.pull_request.id != null)
236+
repository: elastic/integrations
237+
cancel_intermediate_builds: true
238+
cancel_intermediate_builds_branch_filter: '!main !backport-*'
239+
skip_intermediate_builds: true
240+
skip_intermediate_builds_branch_filter: '!main !backport-*'
241+
teams:
242+
ingest-fp:
243+
access_level: MANAGE_BUILD_AND_READ
244+
everyone:
245+
access_level: READ_ONLY

dev/codeowners/codeowners.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@ import (
88
"bufio"
99
"fmt"
1010
"io/fs"
11-
"io/ioutil"
1211
"os"
1312
"path/filepath"
1413
"strings"
1514

16-
"github.com/pkg/errors"
1715
"gopkg.in/yaml.v2"
1816
)
1917

@@ -51,7 +49,7 @@ type githubOwners struct {
5149
func readGithubOwners(codeownersPath string) (*githubOwners, error) {
5250
f, err := os.Open(codeownersPath)
5351
if err != nil {
54-
return nil, errors.Wrapf(err, "failed to open %q", codeownersPath)
52+
return nil, fmt.Errorf("failed to open %q: %w", codeownersPath, err)
5553
}
5654
defer f.Close()
5755

@@ -82,7 +80,7 @@ func readGithubOwners(codeownersPath string) (*githubOwners, error) {
8280
codeowners.owners[path] = owners
8381
}
8482
if err := scanner.Err(); err != nil {
85-
return nil, errors.Wrapf(err, "scanner error")
83+
return nil, fmt.Errorf("scanner error: %w", err)
8684
}
8785

8886
return &codeowners, nil
@@ -128,7 +126,7 @@ func (codeowners *githubOwners) checkManifest(path string) error {
128126
return fmt.Errorf("there is no owner for %q in %q", pkgDir, codeowners.path)
129127
}
130128

131-
content, err := ioutil.ReadFile(path)
129+
content, err := os.ReadFile(path)
132130
if err != nil {
133131
return err
134132
}

0 commit comments

Comments
 (0)