Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide Snapshot builds of current master #356

Closed
HannesWell opened this issue Apr 11, 2023 · 6 comments
Closed

Provide Snapshot builds of current master #356

HannesWell opened this issue Apr 11, 2023 · 6 comments
Assignees
Labels
feature request A request for a new feature releng Anything related to release engineering or CI
Milestone

Comments

@HannesWell
Copy link
Contributor

Description

Please publish snapshot builds of the current master.

The artifacts produced by the Github workflows on a push to the master could just be deployed to https://repository.apache.org/content/repositories/snapshots.

The apache 23 parent pom already has the apache.snapshots.https snapshotRepository defined.

Therefore, as described in the GitHub documentation about publishing-java-packages-with-maven,
only another deploy job would have to be added that deploys the artifacts created by the first compile job.

I could provide a PR to implement that. The only thing you would have to do is to store the credentials for the apache snapshots repository in this repositories secret store and tell me the variable names so that it can be refered to when setting up the server-username and server-password.

Motivation

Providing Snapshot builds of the current master-branch allows early testing and feedback of new changes.

Alternatives considered

No response

Additional context

No response

@tomaswolf tomaswolf added feature request A request for a new feature releng Anything related to release engineering or CI labels Apr 12, 2023
@tomaswolf
Copy link
Member

tomaswolf commented May 18, 2023

Good idea. I haven't found any proper documentation, but reading through a number of support tickets at the ASF it looks as if such credentials already exist.

I have opened https://issues.apache.org/jira/browse/INFRA-24609 to get some help. Not that we run off in the wrong direction :-)

Of course snapshots should only be published if the compile/test workflows succeeded, and only if it's indeed a -SNAPSHOT version. Also not on PRs.

Would we have to be careful about multiple builds on master running concurrently and then trying to deploy concurrently?

@HannesWell
Copy link
Contributor Author

I have opened https://issues.apache.org/jira/browse/INFRA-24609 to get some help. Not that we run off in the wrong direction :-)

Great, thanks.

Of course snapshots should only be published if the compile/test workflows succeeded, and only if it's indeed a -SNAPSHOT version. Also not on PRs.

Yes, definitivly but that can be managed by using corresponding event filters.

Would we have to be careful about multiple builds on master running concurrently and then trying to deploy concurrently?

We can just abort concurrently running deploy builds using
https://docs.github.com/en/actions/using-jobs/using-concurrency

To reduce the risik of partial deployments we can use deployAtEnd of the maven-deploy-plugin.

@tomaswolf
Copy link
Member

The two secrets are named NEXUS_USER and NEXUS_PW. They have been enabled now for this repository.

Apparently that is all we need, so we can go forward with this.

@HannesWell
Copy link
Contributor Author

Apparently that is all we need, so we can go forward with this.

Great. 👍🏽
I'm on vacation for the next two weeks and therefore will not be able to help on this issue in that time.
Of course I can help with a PR when I'm back, unless you then already did it by yourself. :)

tomaswolf added a commit that referenced this issue May 27, 2023
On pushes to the master branch, publish snapshot artifacts to the
Apache snapshot repo if the tests were successful.

Do nothing for release versions; releases are prepared manually and
go through the normal Apache process (staging, voting) before being
released.

Snapshots are not and do not have to be signed according to [1].

The deployment jobs are serialized, and they deploy only if

* the project is indeed a -SNAPSHOT version
* the current master branch has not advanced
* the commit message does not start with "[maven-release-plugin]"

[1] https://issues.apache.org/jira/browse/INFRA-24609

Bug: #356
tomaswolf added a commit that referenced this issue May 27, 2023
YAML handles ! specially. Quote the expressions containing exclamation
marks.
tomaswolf added a commit that referenced this issue May 27, 2023
Somehow the continuation lines did't work. No idea why.
tomaswolf added a commit that referenced this issue May 27, 2023
Also mention where to find snapshot releases.
@tomaswolf
Copy link
Member

Done. Here's what I came up with: diff. I hate yaml.

A first snapshot release is published already at the Apache Snapshots repo.

@tomaswolf tomaswolf added this to the 2.10.1 milestone May 27, 2023
@tomaswolf tomaswolf self-assigned this May 27, 2023
tomaswolf added a commit to tomaswolf/mina-sshd that referenced this issue May 27, 2023
Split the single workflow into two workflows: a compile-test workflow
that runs on PRs and that can be called from master-build, which
additionally deploys snapshots.

That way we never have to worry about a PR build inadvertently trying
to deploy.
tomaswolf added a commit to tomaswolf/mina-sshd that referenced this issue May 27, 2023
Split the single workflow into two workflows: a build workflow that
compiles and tests and that runs on PRs and that can be called from
master-build, which additionally deploys snapshots.

That way we never have to worry about a PR build inadvertently trying
to deploy.
@HannesWell
Copy link
Contributor Author

Done. Here's what I came up with: diff. I hate yaml.

A first snapshot release is published already at the Apache Snapshots repo.

Great. Thank you!
Yaml isn't my favorit scripting language either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A request for a new feature releng Anything related to release engineering or CI
Projects
None yet
Development

No branches or pull requests

2 participants