-
Notifications
You must be signed in to change notification settings - Fork 4
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
Automate consul build+push with AppVeyor #10
Comments
If you proceed with that automation with AppVeyor I suggest to rename the repo to eg. chocolatey-consul to make clear that its purpose is only for building the consul package. |
Thanks for bringing this up! I'll take a look at it and automate the process for performing releases. |
@StefanScherer I started the repository using fervencoder's package layout, but I do find automation from Technically, I can do releases with the current layout since consul is the only package in here, but it wouldn't make much sense to do so. |
I completely missed your second comment, but agreed. I should definitely change it to consul-chocolatey. |
@StefanScherer I see the following line for What happens when you need to deploy a choco-package fix for the same docker version - does published package get replaced? I would think that packages would be immutable once deployed so that it doesn't alter deployment scripts behavior (for example when using Chef, Puppet, etc. one would expect the same exact deployment if package/dependency versions remain constant). This question actually has been in my mind for anything that gets "wrapped" (docker images, homebrew packages, chocolatey pacakges, etc.). |
@calvn Great! Yes a repo per choco package is the most clean way to automate it with AppVeyor. Fixing choco packages with the same version of the binary is an edge case, but it happens. I had to fix eg. packer 0.8.6 again as the download links from HashiCorp have changed. OK, they promise that this won't happen again, but you never know. You can't send a chocolatey package again with the same version number. That's for a good reason as people already have downloaded the same package and that would break all package managers.
So it is possible to fix a choco package for the same binary version, but you normally don't need it. |
I created chocolatey-consul to hold the choco package for Consul. The repository might still be a little messy, but the builds are passing. All that is needed is to perform an update and tag the commit to release the next version of the package. It would be greatly appreciated if you can review it, and let me know if I missed anything. Thanks! |
@StefanScherer I am not super familiar with PowerShell syntax, and couldn't quite find out how to pass in environment variable to a batch script. I set the variable in line 14, but currently it's not used in line 15. |
@calvn Yes, I will have a close look at it later on. I think you can fix your problem setting an environment variable in line 14 with In PowerShell you have local/global variables that are only visible inside the PowerShell script. To read/write environment variables use |
Yep, my question was how to do the following on PS:
|
The other problem might be switching the shells, so even the environment variable is only set inside the powershell script line. So it might be better to put it into a multi line powershell script. build_script:
- ps: >-
$env:CONSUL_VERSION = $env:APPVEYOR_BUILD_VERSION -replace('\.[^.\\/]+$');
download.bat
choco pack consul.nuspec This still should work as batch files can be called from powershell - a cmd.exe will be started automatically. |
I think I need to explicitly use cmd.exe. Getting this error:
|
Oh, yes there is also another detail to add a semicolon. I think that's also needed.
|
I pushed consul v0.7.1 via the new repository and will push v0.7.2 once that's approved. I am closing this thread for now, but thanks for your help! |
Awesome 😀 |
Hey @calvn
It is great to see that you have started with AppVeyor to build the
consul
choco package.How about improving it for the last mile to push the choco package with a release build?
Please have a look at eg. https://github.com/ahmetalpbalkan/docker-chocolatey which works very well and now is community driven. We receive pull requests, AppVeyor tests it, the maintainers can merge it and just draft a new GitHub release with the new version number. With that release build AppVeyor also pushes the choco package to chocolatey.org
If you need help, please let me know :-)
The text was updated successfully, but these errors were encountered: