Skip to content

Conversation

@mtojek
Copy link
Contributor

@mtojek mtojek commented Jul 16, 2021

This PR enables support for GoReleaser to release elastic-package distributions.

Issue: #32

How to trigger a release:

git tag -a v0.1.0 -m "First release"
git push origin v0.1.0

(source: Quick start)

@mtojek mtojek self-assigned this Jul 16, 2021
@elasticmachine
Copy link
Collaborator

elasticmachine commented Jul 16, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2021-07-16T08:34:39.146+0000

  • Duration: 21 min 24 sec

  • Commit: 7cb1223

Test stats 🧪

Test Results
Failed 0
Passed 316
Skipped 4
Total 320

Trends 🧪

Image of Build Times

Image of Tests

@mtojek mtojek requested review from jsoriano and v1v July 16, 2021 07:49
Copy link
Member

@v1v v1v left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT comment

Regarding the goreleaser command to be executed, that's something to be done in a follow up I assume

Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com>
@mtojek
Copy link
Contributor Author

mtojek commented Jul 16, 2021

I will experiment with Goreleaser once I merge this PR.

@mtojek mtojek merged commit 1e64d0b into elastic:master Jul 16, 2021
}
stage('Release') {
when {
tag pattern: '(v)?\\d+\\.\\d+\\.\\d+', comparator: 'REGEXP'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mtojek have we thought about the versioning pattern or release cycles that elastic-package is going to follow?

I don't think it should follow semantic versioning. Any version of elastic-package should work with any supported package. If we introduce a breaking change in the spec, the spec should have some versioning so elastic-package can support both versions (as docker-compose does for example). Breaking changes in elastic-package should be considered as bugs. And I would prefer to don't have different release branches.

In any case, I shouldn't assume this pattern is for elastic versioning, it can also be v<year>.<month>.<revision>, I would like something like this for elastic-package. 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Frankly speaking, I like semantic versioning for every use case, as it allows for introducing potentially dangerous (breaking changes). We have dependabot, mergify, no goreleaser, which means that every new release can be automatically pulled in into elastic/integrations.

I don't think it should follow semantic versioning. Any version of elastic-package should work with any supported package. If we introduce a breaking change in the spec, the spec should have some versioning so elastic-package can support both versions (as docker-compose does for example).

I admit that we never followed this rule. I'm not sure if it's possible in real life without bumping version in package manifests (so far every package is 1.0.0). Many times there were cases in which we had to harden the spec validation (by introducing additional semantic validators) which obviously caused failures for packages. I agree we should bump up the spec version then, but I'm not sure about consequences across the entire platform (when format version changes - I know it shouldn't cause any problems).

In any case, I shouldn't assume this pattern is for elastic versioning, it can also be v.., I would like something like this for elastic-package. 🙂

I see we can mimic it with semver, although I admit I'm too much addicted to the natural semver form (major, minor, patch).

I'm happy to zoom about this next week if you prefer!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, we can think more about this, let's talk next week!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants