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

Move CI process to GitHub Actions and add CD pipelines #2931

Closed
mxschmitt opened this issue Dec 14, 2019 · 10 comments · Fixed by #3152
Closed

Move CI process to GitHub Actions and add CD pipelines #2931

mxschmitt opened this issue Dec 14, 2019 · 10 comments · Fixed by #3152
Labels
CI/CD 🔩 Automated tests, releases
Milestone

Comments

@mxschmitt
Copy link

mxschmitt commented Dec 14, 2019

Hello,

as discussed over Twitter: https://twitter.com/mholt6/status/1203790630880600065 my idea would be to introduce GoReleaser into the project. Currently as far as I've seen for CI is Azure Pipelines in use. In this issue I would:

  • Migrate to GitHub Actions, so CI functionality is moved fully to GitHub Actions (so everything is at a central place)
  • Add CD functionality with GoReleaser over GitHub Actions to automatically attach the binaries for the different architectures to the GitHub Release once a new Tag was published.
  • Configure GoReleaser that way, that deb packages were created. We have to discuss also where we want to publish / release them

Initial goal: Provide deb/rem packages to the end users, so apt install caddy is possible.

root@eea4381d15b1:/# apt install caddy
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package caddy

cc @caarlos0 (Creator of GoReleaser)

@carlwgeorge
Copy link
Contributor

Uploading packages to GitHub releases won't make apt install caddy work. Someone has to put in the work to get packages into the distro repositories. This means following the distro packaging guidelines and using the distro build systems. You can't just hand a built package to a distro and ask them to ship it. This work has already been done for Fedora, we're just lacking the same on Debian (which will also filter in to Ubuntu). Goreleaser may be desirable for other reasons, but it won't be for the packages.

@tobya
Copy link
Collaborator

tobya commented Dec 15, 2019

@mxschmitt Great. I would be brilliant to have binaries of each release / github commit.

I'm happy to try to help if needed.

@mxschmitt
Copy link
Author

Sure the deb packages are not publishing from themselves, there is a strict process behind. But currently it stuck, that the actual deb/rem packages are created, so once this is done we can start the actual publish process.

I would start with several iterations / PRs:

  • Move from Azure Pipelines to GitHub Actions
  • Add CD functionality to it, so the binaries for the different architectures will be automatically attached if a Tag was created
  • Also attach the deb/rem packages
  • Publish the actual packages to the different repos

@caarlos0
Copy link

If you want to ship the packages to official distro repos, yes, goreleaser wont help much for that particularly.

You could upload to a 3rd party repo, like packagecloud for example, in which case goreleaser can do it automatically.

@mohammed90 mohammed90 linked a pull request Mar 20, 2020 that will close this issue
@mholt
Copy link
Member

mholt commented Mar 20, 2020

@francislavoie Now that we've switched to GitHub Actions, next step -- at some point -- is to make releases at new tags, at least on the GitHub Releases page, if possible! I think that'd be pretty helpful. Right now v2 releases take about an hour or two to get right, and it's kinda tedious.

@mholt
Copy link
Member

mholt commented Mar 21, 2020

For note, a few changes we want to make:

@francislavoie
Copy link
Member

Verdict is caching is not much better #3167

@francislavoie
Copy link
Member

francislavoie commented Mar 21, 2020

Cleaned up build artifact filenames #3168

Only remaining task is to add version info to the binaries, which we should be able to do with https://github.com/caddyserver/builder soon.

Then probably using GoReleaser, which @mohammed90 is working on AFAIK

@lskillen
Copy link

lskillen commented Apr 4, 2020

You could also consider @cloudsmith-io for the packages hosting, to get the apt install method working. If you need any assistance with it, just let me know! :)

@francislavoie
Copy link
Member

This is done! #3152 switched the project to using Github Actions for CI, and https://github.com/caddyserver/caddy/releases/tag/v2.0.0-rc.1 was the first release to use GoReleaser!

@mholt mholt added the CI/CD 🔩 Automated tests, releases label Apr 4, 2020
@mholt mholt added this to the 2.x milestone Apr 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/CD 🔩 Automated tests, releases
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants