diff --git a/README.md b/README.md index 1b5fceb7b7..fdd81aeef6 100644 --- a/README.md +++ b/README.md @@ -114,7 +114,7 @@ Usually, this process would require the following manual steps: go mod tidy ``` 4. Push these changes into a branch and create a Pull Request - - Creating this PR would automatically trigger a new Jenkins pipeline. + - Creating this PR would automatically trigger a new build of the corresponding Buildkite pipeline. ### Testing with Elastic serverless @@ -412,24 +412,6 @@ _Context: global_ Sets the profile to use when no other is specified. -### `elastic-package promote` - -_Context: global_ - -[DEPRECATED] Use this command to move packages between the snapshot, staging, and production stages of the package registry. - -This command is intended primarily for use by administrators. - -It allows for selecting packages for promotion and opens new pull requests to review changes. Please be aware that the tool checks out an in-memory Git repository and switches over branches (snapshot, staging and production), so it may take longer to promote a larger number of packages. - -### `elastic-package publish` - -_Context: package_ - -[DEPRECATED] Use this command to publish a new package revision. - -The command checks if the package hasn't been already published (whether it's present in snapshot/staging/production branch or open as pull request). If the package revision hasn't been published, it will open a new pull request. - ### `elastic-package report` _Context: package_ @@ -716,7 +698,7 @@ There are available some environment variables that could be used to change some ## Release process This project uses [GoReleaser](https://goreleaser.com/) to release a new version of the application (semver). Release publishing -is automatically managed by the Jenkins CI ([Jenkinsfile](https://github.com/elastic/elastic-package/blob/main/.ci/Jenkinsfile)) +is automatically managed by the Buildkite CI ([Pipeline](https://github.com/elastic/elastic-package/blob/main/.buildkite/pipeline.yml)) and it's triggered by Git tags. Release artifacts are available in the [Releases](https://github.com/elastic/elastic-package/releases) section. ### Steps to create a new release diff --git a/cmd/promote.go b/cmd/promote.go deleted file mode 100644 index 1108230e05..0000000000 --- a/cmd/promote.go +++ /dev/null @@ -1,39 +0,0 @@ -// 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 ( - "github.com/spf13/cobra" - - "github.com/elastic/elastic-package/internal/cobraext" -) - -const promoteLongDescription = `[DEPRECATED] Use this command to move packages between the snapshot, staging, and production stages of the package registry. - -This command is intended primarily for use by administrators. - -It allows for selecting packages for promotion and opens new pull requests to review changes. Please be aware that the tool checks out an in-memory Git repository and switches over branches (snapshot, staging and production), so it may take longer to promote a larger number of packages.` - -func setupPromoteCommand() *cobraext.Command { - cmd := &cobra.Command{ - Use: "promote", - Short: "Promote packages", - Long: promoteLongDescription, - RunE: promoteCommandAction, - SilenceUsage: true, - } - - cmd.Flags().StringP(cobraext.DirectionFlagName, "d", "", cobraext.DirectionFlagDescription) - cmd.Flags().BoolP(cobraext.NewestOnlyFlagName, "n", false, cobraext.NewestOnlyFlagDescription) - cmd.Flags().StringSliceP(cobraext.PromotedPackagesFlagName, "p", nil, cobraext.PromotedPackagesFlagDescription) - - return cobraext.NewCommand(cmd, cobraext.ContextGlobal) -} - -func promoteCommandAction(cmd *cobra.Command, _ []string) error { - cmd.Println("Promote packages") - cmd.Println("DEPRECATED: Packages stored in the Package Storage v2 do not require to be promoted. README: https://github.com/elastic/elastic-package/blob/main/docs/howto/use_package_storage_v2.md") - return nil -} diff --git a/cmd/publish.go b/cmd/publish.go deleted file mode 100644 index ab5e4a0662..0000000000 --- a/cmd/publish.go +++ /dev/null @@ -1,40 +0,0 @@ -// 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 ( - "github.com/spf13/cobra" - - "github.com/elastic/elastic-package/internal/cobraext" -) - -const publishLongDescription = `[DEPRECATED] Use this command to publish a new package revision. - -The command checks if the package hasn't been already published (whether it's present in snapshot/staging/production branch or open as pull request). If the package revision hasn't been published, it will open a new pull request.` - -func setupPublishCommand() *cobraext.Command { - cmd := &cobra.Command{ - Use: "publish", - Short: "Publish the package to the Package Registry", - Long: publishLongDescription, - RunE: publishCommandAction, - } - - // Fork flag can be a workaround for users that don't own forks of the Package Storage. - cmd.Flags().BoolP(cobraext.ForkFlagName, "f", true, cobraext.ForkFlagDescription) - - // SkipPullRequest flag can used to verify if the "publish" command works properly (finds correct revisions), - // for which the operator doesn't want to immediately close just opened PRs (standard dry-run). - cmd.Flags().BoolP(cobraext.SkipPullRequestFlagName, "s", false, cobraext.SkipPullRequestFlagDescription) - - return cobraext.NewCommand(cmd, cobraext.ContextPackage) -} - -func publishCommandAction(cmd *cobra.Command, args []string) error { - cmd.Println("Publish the package") - cmd.Println("DEPRECATED: Package candidates to the Package Storage v2 are published using Jenkins jobs. README: https://github.com/elastic/elastic-package/blob/main/docs/howto/use_package_storage_v2.md") - - return nil -} diff --git a/cmd/root.go b/cmd/root.go index 1f2da1d409..b862a3c315 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -29,9 +29,7 @@ var commands = []*cobraext.Command{ setupFormatCommand(), setupInstallCommand(), setupLintCommand(), - setupPromoteCommand(), setupProfilesCommand(), - setupPublishCommand(), setupReportsCommand(), setupServiceCommand(), setupStackCommand(), diff --git a/internal/cobraext/flags.go b/internal/cobraext/flags.go index fcc16ff291..c8f19eff22 100644 --- a/internal/cobraext/flags.go +++ b/internal/cobraext/flags.go @@ -221,21 +221,4 @@ const ( ZipPackageFilePathFlagName = "zip" ZipPackageFilePathFlagShorthand = "z" ZipPackageFilePathFlagDescription = "path to the zip package file (*.zip)" - - // To be removed promote commands flags - DirectionFlagName = "direction" - DirectionFlagDescription = "promotion direction" - - NewestOnlyFlagName = "newest-only" - NewestOnlyFlagDescription = "promote newest packages and remove old ones" - - PromotedPackagesFlagName = "packages" - PromotedPackagesFlagDescription = "packages to be promoted (comma-separated values: apache-1.2.3,nginx-5.6.7)" - - // To be removed publish commands flags - ForkFlagName = "fork" - ForkFlagDescription = "use fork mode (set to \"false\" if user can't fork the storage repository)" - - SkipPullRequestFlagName = "skip-pull-request" - SkipPullRequestFlagDescription = "skip opening a new pull request" ) diff --git a/tools/readme/readme.md.tmpl b/tools/readme/readme.md.tmpl index 3c631f8b42..99718b5540 100644 --- a/tools/readme/readme.md.tmpl +++ b/tools/readme/readme.md.tmpl @@ -114,7 +114,7 @@ Usually, this process would require the following manual steps: go mod tidy ``` 4. Push these changes into a branch and create a Pull Request - - Creating this PR would automatically trigger a new Jenkins pipeline. + - Creating this PR would automatically trigger a new build of the corresponding Buildkite pipeline. ### Testing with Elastic serverless @@ -258,7 +258,7 @@ There are available some environment variables that could be used to change some ## Release process This project uses [GoReleaser](https://goreleaser.com/) to release a new version of the application (semver). Release publishing -is automatically managed by the Jenkins CI ([Jenkinsfile](https://github.com/elastic/elastic-package/blob/main/.ci/Jenkinsfile)) +is automatically managed by the Buildkite CI ([Pipeline](https://github.com/elastic/elastic-package/blob/main/.buildkite/pipeline.yml)) and it's triggered by Git tags. Release artifacts are available in the [Releases](https://github.com/elastic/elastic-package/releases) section. ### Steps to create a new release