StackStorm / packer-st2

Packer templates for building & deploying Vagrant & OVA with StackStorm installed
https://app.vagrantup.com/stackstorm/boxes/st2
Apache License 2.0
14 stars 7 forks source link

Build Vagrant boxes with GitHub #64

Closed mamercad closed 1 year ago

mamercad commented 1 year ago

Fixes #63;

Update: the official StackStorm boxes are built: https://app.vagrantup.com/stackstorm/boxes/st2/

Vagrant box stackstormst2 - Vagrant Cloud

Still thinking about a few things.

mamercad commented 1 year ago

@armab What's the motivation behind "vagrant-cloud-standalone" versus using vagrant-cloud?

arm4b commented 1 year ago

See https://github.com/armab/packer-post-processor-vagrant-cloud-standalone#description

The idea is to split the build stage (CI) vs publish stage (CD) which was not possible with the original plugin.

We want to build the box on PRs & merges and save it as a downloadable CircleCI artifact, but publish the box to Vagrant Cloud and upload the image to GH releases only on new git tag/release. Split those stages into a dedicated steps.

mamercad commented 1 year ago

See https://github.com/armab/packer-post-processor-vagrant-cloud-standalone#description

The idea is to split the build stage (CI) vs publish stage (CD) which was not possible with the original plugin.

We want to build the box on PRs & merges and save it as a downloadable CircleCI artifact, but publish the box to Vagrant Cloud and upload the image to GH releases only on new git tag/release. Split those stages into a dedicated steps.

Mostly getting there are this point (not ready to open the PR yet), thoughts on building, in addition to the most recent tag, building boxes for a few previous tags, too?

mamercad commented 1 year ago

See https://github.com/armab/packer-post-processor-vagrant-cloud-standalone#description The idea is to split the build stage (CI) vs publish stage (CD) which was not possible with the original plugin. We want to build the box on PRs & merges and save it as a downloadable CircleCI artifact, but publish the box to Vagrant Cloud and upload the image to GH releases only on new git tag/release. Split those stages into a dedicated steps.

Mostly getting there are this point (not ready to open the PR yet), thoughts on building, in addition to the most recent tag, building boxes for a few previous tags, too?

Nice, the three most recent versions built.

mamercad commented 1 year ago

Nice work to get it working first! 👍 I understand it was quite a rabbit hole! 🐰

Left some questions and comments. And yeah, we definitely don't need the version matrix, just build the latest one.

Thanks, as always, for the review @armab !

mamercad commented 1 year ago

I think we're ready ... here's the most recent build and here's the most recent publish. Here's the box published to the Vagrant Cloud. Pull request boxes are named (almost) the same (and stored as GH Artifacts for a day, which is configurable), the exception in the naming is that I'm taking on "-{{ pull request number }}-{{ run number }}".

image

mamercad commented 1 year ago

Builds well locally! 👍

Just two things missing:

  • upload .ova instead of .box to GH Releases
  • A changelog record for this

Builds well locally! 👍

Just two things missing:

  • upload .ova instead of .box to GH Releases
  • A changelog record for this

Yep, working on it :loading:

mamercad commented 1 year ago

Great work, Thanks a lot!

No worries, thanks for the cleanup ❤️

mamercad commented 1 year ago

Great work, Thanks a lot!

No worries, thanks for the cleanup ❤️

...also, I keep forgetting, this secret needs to be defined.