-
Notifications
You must be signed in to change notification settings - Fork 235
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
Publish jfrog-cli-go binaries to Chocolatey for Windows and Apt/Yum for linux #70
Comments
@solvingj, |
Yes, they can be fully automated via CI. |
@solvingj, |
Worked on it a bit this weekend. I hope to submit a PR soon. |
So much for soon. Haven't had time to look in past month. Will take another look tonight/tomorrow. |
If you get a chance to look into this @solvingj, it best to use the dev branch. |
PR submitted, have a great weekend! |
HI @eyalbe4 , has anyone had a chance to start looking into this? |
Not yet @solvingj, but we'll get it soon :) |
* "jfrog rt dl generic-local/te.tar.gz ./ --explode" fails. * "jfrog rt dl generic-local/te.tar.gz ./ --explode" fails.
@eyalbe4 I noticed on https://jfrog.com/getcli/ there are APT/Yum repos now. I'm the maintainer of the Chocolatey package, https://github.com/jgeorgeson/chocolatey-packages, I'd be happy to donate it in order to have it be official and included in your release process. |
That would be great @jgeorgeson! Thanks! |
I assume that since you're using AppVeyor to build the Windows executables, you don't have any Windows agents for either your Jenkins or jFrog Pipelines (either thick agents or containers). I don't think will be possible to build the Chocolatey package with PowerShell Core on non-Windows platform. Neither Chocolatey nor the recommended automatic updator packaging framework support PowerShell Core.
Fundamentally, Chocolatey packages are NuGet packages with extra meta-data, so it might be possible to package and publish using nuget.ext with Mono in a Linux container, but I've never attempted that. So would it be ok to put the Chocolatey packaging in the AppVeyor build, or is working it into Jenkinsfile a hard requirement? |
@jgeorgeson, |
Ok, will see if I can make that work. |
So it turns out there's already interest and traction getting Chocolatey to build and run under mono, including some Docker image work already done.
And the contributors of those efforts publish an unofficial Linux Mono Docker image
I played around with it in WSL and am able to install the resulting nupkg with Chocolatey, so it's looking to good to integrate into your Jenkins release pipeline. It might not be able to pick this back up again until the weekend, but you can get started on becoming package maintainer here. You'll need to setup an api key to use in Jenkins for the choco push to publish it. |
Hoping to have a PR opened today. Looking at the Jenkinsfile, it appears that the executable is built separately for the unpackaged publish to Bintray vs the packaged (RPM/DEB/NPM) versions. It seems the checksums are different between these three distributions https://bintray.com/jfrog/jfrog-cli-go/jfrog-cli-linux-amd64/1.39.5 The current Chocolatey package I publish scrapes the checksum from Bintray, and just runs PowerShell script to download the exe from Bintray and verify the checksum. For official packaging though, it's better to bundle the application, especially for a lightweight standalone executable like we have here. In this model it's required to have a VERIFICATION.txt file included https://github.com/chocolatey/package-validator/wiki/VerificationFileMissing Since I can't suggest using the checksum from Bintray as the verification, I tried to use signtool to verify signature, but that says the root cert isn't trusted.
I can document the certificate chain that is used to sign the exe though, hopefully that will be adequate. |
@jgeorgeson, |
Added, it says pending approval, not sure if that goes to the site admins or you. |
@jgeorgeson - I have just accepted the request to become the package maintainer. |
@jgeorgeson,
So it looks like the package creation was successful, but the publication failed. We used the API key we received through the Chocolatey website.
Any idea what causes this? |
I think it's interpolation of |
Looking at https://groovy-lang.org/syntax.html#_triple_single_quoted_string I think |
Indeed @jgeorgeson - #857 fixes the issue. Thanks! |
I think it's safe to close this issue by now! Also, please remove me as a package maintainer over here. |
Done @jgeorgeson. |
I really want to use the jfrog cli both on my machine, and in my CI processes, so I'd like to help your team get the binaries published to the package managers for Windows and Linux. This used to be a very tedious process, but there is actually a shortcut now.
There is an amazing collection of tools for unifying and streamlining cross-platform packaging for any kind of binaries, which also happens to be written in Go. All the tools are "detailed" in the following repository, although his process isn't quite what you should follow.
https://github.com/mh-cbon/go-github-release
If this team would be willing to take on the burden of publishing to Chocolatey, RPM, and DEB repositories, I will submit some PR's with instructions to get it started. If not, then I won't bother.
The text was updated successfully, but these errors were encountered: