diff --git a/Makefile b/Makefile index be13db3d..e02b663a 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,10 @@ lint: go get -u golang.org/x/lint/golint go list ./... | xargs -n 1 golint -set_exit_status +licenser: + go get -u github.com/elastic/go-licenser + go-licenser -license Elastic + gomod: go mod tidy @@ -16,4 +20,4 @@ check-git-clean: git update-index --really-refresh git diff-index --quiet HEAD -check: build format lint gomod check-git-clean +check: build format lint licenser gomod check-git-clean diff --git a/cmd/build.go b/cmd/build.go index e1c95000..2f340f94 100644 --- a/cmd/build.go +++ b/cmd/build.go @@ -1,3 +1,7 @@ +// 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 cmd import ( diff --git a/cmd/check.go b/cmd/check.go index 5c925f3b..56b7d335 100644 --- a/cmd/check.go +++ b/cmd/check.go @@ -1,3 +1,7 @@ +// 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 cmd import ( diff --git a/cmd/format.go b/cmd/format.go index ad8c7b22..eb93273a 100644 --- a/cmd/format.go +++ b/cmd/format.go @@ -1,3 +1,7 @@ +// 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 cmd import ( diff --git a/cmd/lint.go b/cmd/lint.go index 302292bc..87f44e7e 100644 --- a/cmd/lint.go +++ b/cmd/lint.go @@ -1,3 +1,7 @@ +// 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 cmd import ( diff --git a/cmd/promote.go b/cmd/promote.go index 3222674b..446c5a7f 100644 --- a/cmd/promote.go +++ b/cmd/promote.go @@ -1,3 +1,7 @@ +// 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 cmd import ( diff --git a/cmd/root.go b/cmd/root.go index 01ecdbc3..84ed8858 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -1,3 +1,7 @@ +// 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 cmd import ( diff --git a/cmd/stack.go b/cmd/stack.go index 5b910cd6..bce0dabf 100644 --- a/cmd/stack.go +++ b/cmd/stack.go @@ -1,3 +1,7 @@ +// 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 cmd import ( diff --git a/cmd/testrunner.go b/cmd/testrunner.go index a284c2e3..8452bf21 100644 --- a/cmd/testrunner.go +++ b/cmd/testrunner.go @@ -1,3 +1,7 @@ +// 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 cmd import ( diff --git a/cmd/version.go b/cmd/version.go index ee918e54..166c53ed 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -1,3 +1,7 @@ +// 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 cmd import ( diff --git a/internal/builder/dashboards.go b/internal/builder/dashboards.go index 81502f46..eb599b87 100644 --- a/internal/builder/dashboards.go +++ b/internal/builder/dashboards.go @@ -1,3 +1,7 @@ +// 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 builder import ( diff --git a/internal/builder/mapstr.go b/internal/builder/mapstr.go index 32ab5cdc..2a529b83 100644 --- a/internal/builder/mapstr.go +++ b/internal/builder/mapstr.go @@ -1,3 +1,7 @@ +// 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 builder // WARNING: This code is copied from https://github.com/elastic/beats/blob/master/libbeat/common/mapstr.go diff --git a/internal/builder/packages.go b/internal/builder/packages.go index 47bb563e..a859262d 100644 --- a/internal/builder/packages.go +++ b/internal/builder/packages.go @@ -1,3 +1,7 @@ +// 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 builder import ( diff --git a/internal/cobraext/command_action.go b/internal/cobraext/command_action.go index c798226d..46f20afa 100644 --- a/internal/cobraext/command_action.go +++ b/internal/cobraext/command_action.go @@ -1,3 +1,7 @@ +// 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 cobraext import ( diff --git a/internal/cobraext/command_flag.go b/internal/cobraext/command_flag.go index cdafe7ec..52c29c46 100644 --- a/internal/cobraext/command_flag.go +++ b/internal/cobraext/command_flag.go @@ -1,3 +1,7 @@ +// 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 cobraext import "github.com/pkg/errors" diff --git a/internal/cobraext/const.go b/internal/cobraext/const.go index 63a3b455..304b5132 100644 --- a/internal/cobraext/const.go +++ b/internal/cobraext/const.go @@ -1,3 +1,7 @@ +// 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 cobraext // Flag names and descriptions used by CLI commands. diff --git a/internal/elasticsearch/client.go b/internal/elasticsearch/client.go index c921c303..ca061f02 100644 --- a/internal/elasticsearch/client.go +++ b/internal/elasticsearch/client.go @@ -1,3 +1,7 @@ +// 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 elasticsearch import ( diff --git a/internal/files/clear.go b/internal/files/clear.go index 8a8216ab..feaf781b 100644 --- a/internal/files/clear.go +++ b/internal/files/clear.go @@ -1,3 +1,7 @@ +// 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 files import ( diff --git a/internal/files/copy.go b/internal/files/copy.go index 84e3603b..3cb5249f 100644 --- a/internal/files/copy.go +++ b/internal/files/copy.go @@ -1,3 +1,7 @@ +// 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 files import ( diff --git a/internal/formatter/formatter.go b/internal/formatter/formatter.go index 3859688e..a074f2b0 100644 --- a/internal/formatter/formatter.go +++ b/internal/formatter/formatter.go @@ -1,3 +1,7 @@ +// 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 formatter import ( diff --git a/internal/formatter/json_formatter.go b/internal/formatter/json_formatter.go index c4b9c384..948f9252 100644 --- a/internal/formatter/json_formatter.go +++ b/internal/formatter/json_formatter.go @@ -1,3 +1,7 @@ +// 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 formatter import ( diff --git a/internal/formatter/yaml_formatter.go b/internal/formatter/yaml_formatter.go index 0962d18e..a33ed2eb 100644 --- a/internal/formatter/yaml_formatter.go +++ b/internal/formatter/yaml_formatter.go @@ -1,3 +1,7 @@ +// 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 formatter import ( diff --git a/internal/github/auth.go b/internal/github/auth.go index 2cfb33cf..30d874c8 100644 --- a/internal/github/auth.go +++ b/internal/github/auth.go @@ -1,3 +1,7 @@ +// 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 github import ( diff --git a/internal/github/client.go b/internal/github/client.go index ef566cf0..d66ab4c2 100644 --- a/internal/github/client.go +++ b/internal/github/client.go @@ -1,3 +1,7 @@ +// 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 github import ( diff --git a/internal/install/install.go b/internal/install/install.go index 967d29a5..2377de30 100644 --- a/internal/install/install.go +++ b/internal/install/install.go @@ -1,3 +1,7 @@ +// 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 install import ( diff --git a/internal/install/static_kibana_config_yml.go b/internal/install/static_kibana_config_yml.go index 0f845f87..de2bab38 100644 --- a/internal/install/static_kibana_config_yml.go +++ b/internal/install/static_kibana_config_yml.go @@ -1,3 +1,7 @@ +// 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 install const kibanaConfigYml = ` diff --git a/internal/install/static_package_registry_config_yml.go b/internal/install/static_package_registry_config_yml.go index f728f5a2..250a450b 100644 --- a/internal/install/static_package_registry_config_yml.go +++ b/internal/install/static_package_registry_config_yml.go @@ -1,3 +1,7 @@ +// 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 install const packageRegistryConfigYml = `package_paths: diff --git a/internal/install/static_package_registry_dockerfile.go b/internal/install/static_package_registry_dockerfile.go index c57cd4c4..f9546d28 100644 --- a/internal/install/static_package_registry_dockerfile.go +++ b/internal/install/static_package_registry_dockerfile.go @@ -1,3 +1,7 @@ +// 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 install const packageRegistryDockerfile = `FROM docker.elastic.co/package-registry/distribution:snapshot diff --git a/internal/install/static_snapshot_yml.go b/internal/install/static_snapshot_yml.go index 5abf770f..e30be702 100644 --- a/internal/install/static_snapshot_yml.go +++ b/internal/install/static_snapshot_yml.go @@ -1,3 +1,7 @@ +// 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 install const snapshotYml = `version: '2.3' diff --git a/internal/install/version_file.go b/internal/install/version_file.go index e82d2def..7723c4e9 100644 --- a/internal/install/version_file.go +++ b/internal/install/version_file.go @@ -1,3 +1,7 @@ +// 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 install import ( diff --git a/internal/logger/logger.go b/internal/logger/logger.go index be072df5..deabb158 100644 --- a/internal/logger/logger.go +++ b/internal/logger/logger.go @@ -1,3 +1,7 @@ +// 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 logger import ( diff --git a/internal/packages/packages.go b/internal/packages/packages.go index 79c0d967..6087d5ac 100644 --- a/internal/packages/packages.go +++ b/internal/packages/packages.go @@ -1,3 +1,7 @@ +// 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 packages import ( diff --git a/internal/promote/pull_requests.go b/internal/promote/pull_requests.go index e0f9e8da..6347e206 100644 --- a/internal/promote/pull_requests.go +++ b/internal/promote/pull_requests.go @@ -1,3 +1,7 @@ +// 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 promote import ( diff --git a/internal/promote/storage.go b/internal/promote/storage.go index b9b350f6..d488c10a 100644 --- a/internal/promote/storage.go +++ b/internal/promote/storage.go @@ -1,3 +1,7 @@ +// 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 promote import ( diff --git a/internal/stack/boot.go b/internal/stack/boot.go index ad6c7108..d92b071d 100644 --- a/internal/stack/boot.go +++ b/internal/stack/boot.go @@ -1,3 +1,7 @@ +// 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 stack import ( diff --git a/internal/stack/shellinit.go b/internal/stack/shellinit.go index a7d399eb..19df8bab 100644 --- a/internal/stack/shellinit.go +++ b/internal/stack/shellinit.go @@ -1,3 +1,7 @@ +// 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 stack import ( diff --git a/internal/stack/version.go b/internal/stack/version.go index 1db1868a..6bac6bc2 100644 --- a/internal/stack/version.go +++ b/internal/stack/version.go @@ -1,3 +1,7 @@ +// 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 stack const ( diff --git a/internal/testrunner/runners/pipeline/ingest_pipeline.go b/internal/testrunner/runners/pipeline/ingest_pipeline.go index 77a78e26..cbe0d7ea 100644 --- a/internal/testrunner/runners/pipeline/ingest_pipeline.go +++ b/internal/testrunner/runners/pipeline/ingest_pipeline.go @@ -1,3 +1,7 @@ +// 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 pipeline import ( diff --git a/internal/testrunner/runners/pipeline/runner.go b/internal/testrunner/runners/pipeline/runner.go index a24a6bd1..912e5017 100644 --- a/internal/testrunner/runners/pipeline/runner.go +++ b/internal/testrunner/runners/pipeline/runner.go @@ -1,3 +1,7 @@ +// 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 pipeline import ( diff --git a/internal/testrunner/runners/pipeline/test_case.go b/internal/testrunner/runners/pipeline/test_case.go index f2629a9d..f0aeac4c 100644 --- a/internal/testrunner/runners/pipeline/test_case.go +++ b/internal/testrunner/runners/pipeline/test_case.go @@ -1,3 +1,7 @@ +// 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 pipeline import ( diff --git a/internal/testrunner/runners/pipeline/test_config.go b/internal/testrunner/runners/pipeline/test_config.go index abb68ce3..fbeafc13 100644 --- a/internal/testrunner/runners/pipeline/test_config.go +++ b/internal/testrunner/runners/pipeline/test_config.go @@ -1,3 +1,7 @@ +// 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 pipeline import ( diff --git a/internal/testrunner/runners/pipeline/test_result.go b/internal/testrunner/runners/pipeline/test_result.go index a7e86c04..1ee883a5 100644 --- a/internal/testrunner/runners/pipeline/test_result.go +++ b/internal/testrunner/runners/pipeline/test_result.go @@ -1,3 +1,7 @@ +// 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 pipeline import ( diff --git a/internal/testrunner/runners/runners.go b/internal/testrunner/runners/runners.go index b6a02288..4e3534d3 100644 --- a/internal/testrunner/runners/runners.go +++ b/internal/testrunner/runners/runners.go @@ -1,3 +1,7 @@ +// 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 runners import ( diff --git a/internal/testrunner/runners/system/system.go b/internal/testrunner/runners/system/system.go index a8931341..ea97f17d 100644 --- a/internal/testrunner/runners/system/system.go +++ b/internal/testrunner/runners/system/system.go @@ -1,3 +1,7 @@ +// 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 system import ( diff --git a/internal/testrunner/testrunner.go b/internal/testrunner/testrunner.go index 3b068bf8..0be239f6 100644 --- a/internal/testrunner/testrunner.go +++ b/internal/testrunner/testrunner.go @@ -1,3 +1,7 @@ +// 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 testrunner import ( diff --git a/internal/version/version.go b/internal/version/version.go index 62bc59ce..8b53b631 100644 --- a/internal/version/version.go +++ b/internal/version/version.go @@ -1,3 +1,7 @@ +// 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 version import ( diff --git a/main.go b/main.go index 00fcb9cd..f2895e85 100644 --- a/main.go +++ b/main.go @@ -1,3 +1,7 @@ +// 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 main import (