scylla-jmx icon indicating copy to clipboard operation
scylla-jmx copied to clipboard

dist: support building packages in Github Actions

Open syuu1228 opened this issue 1 year ago • 10 comments

Support building packages in Github Actions. This includes to add support building in Ubuntu, since Github Actions only provides Ubuntu based image for Linux build.

Note that we don't use install-dependencies.sh on Github Actions, since we will use preinstalled Java to speed up installing dependencies.

syuu1228 avatar Jun 10 '24 13:06 syuu1228

And here's how it looks like on Actions page: https://github.com/syuu1228/scylla-jmx/actions/runs/9449470120

syuu1228 avatar Jun 10 '24 13:06 syuu1228

@avikivity Should we release Scylla-JMX every time we release Scylladb? or should it be completely independent? Maybe we should just create a release for every push to branch- ?

yaronkaikov avatar Jun 10 '24 14:06 yaronkaikov

We should also publish the release when we create a new tag, we should use maybe https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository?tool=cli ,

Implemented. It will be looks like: https://github.com/syuu1228/scylla-jmx/releases/tag/scylla-5.0.2

Note that this will provide .rpm/.deb package but not yum/apt repositories. If we want to provide repositories we cannot use Github release for the purpose. What we need to do is basically same as we do in Jenkins today, build repositories, upload it to some HTTP server like Github Pages or Amazon S3, and point repository URLs on the document.

Or, alternatively we may able to host repositories in Fedora Copr / Launchpad PPA, push source package from Action to Fedora Copr / Launchpad PPA.

syuu1228 avatar Jun 12 '24 00:06 syuu1228

@avikivity Should we release Scylla-JMX every time we release Scylladb? or should it be completely independent? Maybe we should just create a release for every push to branch- ?

No. It should have its own independent release cycle. Realistically I expect one release and then nothing.

avikivity avatar Jun 12 '24 14:06 avikivity

We should also publish the release when we create a new tag, we should use maybe https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository?tool=cli ,

Implemented. It will be looks like: https://github.com/syuu1228/scylla-jmx/releases/tag/scylla-5.0.2

Note that this will provide .rpm/.deb package but not yum/apt repositories. If we want to provide repositories we cannot use Github release for the purpose. What we need to do is basically same as we do in Jenkins today, build repositories, upload it to some HTTP server like Github Pages or Amazon S3, and point repository URLs on the document.

Or, alternatively we may able to host repositories in Fedora Copr / Launchpad PPA, push source package from Action to Fedora Copr / Launchpad PPA.

I think it's fine, we should document it so that if someone needs the latest release for Scylla-JMX it will use the GitHub repo to download the relevant package

yaronkaikov avatar Jun 13 '24 02:06 yaronkaikov

We should also publish the release when we create a new tag, we should use maybe https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository?tool=cli ,

Implemented. It will be looks like: https://github.com/syuu1228/scylla-jmx/releases/tag/scylla-5.0.2

Note that this will provide .rpm/.deb package but not yum/apt repositories. If we want to provide repositories we cannot use Github release for the purpose. What we need to do is basically same as we do in Jenkins today, build repositories, upload it to some HTTP server like Github Pages or Amazon S3, and point repository URLs on the document.

Or, alternatively we may able to host repositories in Fedora Copr / Launchpad PPA, push source package from Action to Fedora Copr / Launchpad PPA.

Best would be to integrate it into the regular yum/apt repositories that contain scylla.rpm. Perhaps a separate task.

avikivity avatar Jun 13 '24 09:06 avikivity

We should also publish the release when we create a new tag, we should use maybe https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository?tool=cli ,

Implemented. It will be looks like: https://github.com/syuu1228/scylla-jmx/releases/tag/scylla-5.0.2

Note that this will provide .rpm/.deb package but not yum/apt repositories. If we want to provide repositories we cannot use Github release for the purpose. What we need to do is basically same as we do in Jenkins today, build repositories, upload it to some HTTP server like Github Pages or Amazon S3, and point repository URLs on the document.

Or, alternatively we may able to host repositories in Fedora Copr / Launchpad PPA, push source package from Action to Fedora Copr / Launchpad PPA.

@syuu1228 The release should be only when we push tags not on every push, how is it implemented?

yaronkaikov avatar Jun 13 '24 09:06 yaronkaikov

@syuu1228 The release should be only when we push tags not on every push, how is it implemented?

It is implemented as if condition on "Publish packages to release": if: startsWith(github.ref, 'refs/tags/') https://github.com/scylladb/scylla-jmx/blob/48b097129426840fdff9705a499f5008ae841281/.github/workflows/build.yml#L53C8-L53C49

syuu1228 avatar Jul 11 '24 16:07 syuu1228

Best would be to integrate it into the regular yum/apt repositories that contain scylla.rpm. Perhaps a separate task.

I guess we can append jmx repository on existing scylla .repo / .list something like this:

[scylla]
name=Scylla for Enterprise Linux $releasever - $basearch
baseurl=<URL>
enabled=1
gpgcheck=1
gpgkey=<GPG>

[scylla-generic]
name=Scylla for centos $releasever
baseurl=<URL>
enabled=1
gpgcheck=1
gpgkey=<GPG>

[scylla-jmx]
name=Scylla JMX
baseurl=<URL for JMX>
enabled=1
gpgcheck=1
gpgkey=<GPG for JMX>

But to do so we need construct yum/apt repository somewhere else as I commented above: https://github.com/scylladb/scylla-jmx/pull/238#issuecomment-2161824249 And I agree it should be separated task.

syuu1228 avatar Jul 11 '24 16:07 syuu1228

Best would be to integrate it into the regular yum/apt repositories that contain scylla.rpm. Perhaps a separate task.

I guess we can append jmx repository on existing scylla .repo / .list something like this:

[scylla]
name=Scylla for Enterprise Linux $releasever - $basearch
baseurl=<URL>
enabled=1
gpgcheck=1
gpgkey=<GPG>

[scylla-generic]
name=Scylla for centos $releasever
baseurl=<URL>
enabled=1
gpgcheck=1
gpgkey=<GPG>

[scylla-jmx]
name=Scylla JMX
baseurl=<URL for JMX>
enabled=1
gpgcheck=1
gpgkey=<GPG for JMX>

But to do so we need construct yum/apt repository somewhere else as I commented above: #238 (comment) And I agree it should be separated task.

If we want to have it as part of Scylla.repo, we can do it in pkg (it's the same process we do for scylla-machine-image

yaronkaikov avatar Jul 11 '24 20:07 yaronkaikov

@avikivity Can we please merge this?

yaronkaikov avatar Sep 02 '24 12:09 yaronkaikov

Submodule update: scylladb/scylladb@2556e902b1c8fd0638a316c4ab5fc25e28a7011f.

denesb avatar Sep 03 '24 08:09 denesb

Ammm @denesb Why should we update the submodule? we don't use it anymore, right?

yaronkaikov avatar Sep 03 '24 08:09 yaronkaikov

Ammm @denesb Why should we update the submodule? we don't use it anymore, right?

or should we keep updating it until we remove it from Scylla?

yaronkaikov avatar Sep 03 '24 09:09 yaronkaikov

Ammm @denesb Why should we update the submodule? we don't use it anymore, right?

or should we keep updating it until we remove it from Scylla?

Yes, I think so.

denesb avatar Sep 03 '24 09:09 denesb