• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

elastic / cloudbeat / 17673802984

12 Sep 2025 12:00PM UTC coverage: 76.118% (-0.02%) from 76.136%
17673802984

Pull #3492

github

orestisfl
Fix golangci-lint
Pull Request #3492: [updatecli] main - Update hermit and pre-commit dependencies

8 of 9 new or added lines in 7 files covered. (88.89%)

3 existing lines in 1 file now uncovered.

9552 of 12549 relevant lines covered (76.12%)

16.66 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/scripts/mage/package.go
1
// Licensed to Elasticsearch B.V. under one or more contributor
2
// license agreements. See the NOTICE file distributed with
3
// this work for additional information regarding copyright
4
// ownership. Elasticsearch B.V. licenses this file to you under
5
// the Apache License, Version 2.0 (the "License"); you may
6
// not use this file except in compliance with the License.
7
// You may obtain a copy of the License at
8
//
9
//     http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing,
12
// software distributed under the License is distributed on an
13
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
// KIND, either express or implied.  See the License for the
15
// specific language governing permissions and limitations
16
// under the License.
17

18
package mage
19

20
import (
21
        devtools "github.com/elastic/beats/v7/dev-tools/mage"
22
)
23

24
const opaBundle = "bundle.tar.gz"
25

26
// CustomizePackaging modifies the device in the configuration files based on
27
// the target OS.
28
func CustomizePackaging() {
×
29
        bundleDir := devtools.PackageFile{
×
30
                Mode:   0o644,
×
31
                Source: opaBundle,
×
32
        }
×
33

×
34
        for _, args := range devtools.Packages {
×
35
                if len(args.Types) == 0 {
×
36
                        continue
×
37
                }
38

39
                // Add csp-policies bundle archive to package
40
                args.Spec.Files[opaBundle] = bundleDir
×
41

×
42
                // Remove files unused by cloudbeat.
×
43
                for filename, filespec := range args.Spec.Files {
×
44
                        switch filespec.Source {
×
45
                        case "_meta/kibana.generated", "fields.yml", "{{.BeatName}}.reference.yml":
×
46
                                delete(args.Spec.Files, filename)
×
NEW
47
                        default:
×
48
                        }
49
                }
50
        }
51
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc