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

Build Vagrant boxes with GitHub #64

Merged
merged 24 commits into from
Jan 27, 2023
Merged

Build Vagrant boxes with GitHub #64

merged 24 commits into from
Jan 27, 2023

Conversation

mamercad
Copy link
Contributor

@mamercad mamercad commented Jan 12, 2023

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
Copy link
Contributor Author

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

@arm4b
Copy link
Member

arm4b commented Jan 15, 2023

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
Copy link
Contributor Author

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
Copy link
Contributor Author

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.

Copy link
Member

@arm4b arm4b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

st2_deploy.json Outdated Show resolved Hide resolved
st2.json Outdated Show resolved Hide resolved
.github/workflows/packer-build.yml Outdated Show resolved Hide resolved
.github/workflows/packer-release.yml Outdated Show resolved Hide resolved
.github/workflows/packer-release.yml Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Show resolved Hide resolved
@mamercad
Copy link
Contributor Author

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
Copy link
Contributor Author

mamercad commented Jan 24, 2023

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 mamercad marked this pull request as ready for review January 24, 2023 13:50
@mamercad mamercad requested a review from arm4b January 24, 2023 13:50
@mamercad mamercad changed the title Do Packer with GitHub Build Vagrant boxes with GitHub Jan 24, 2023
Copy link
Member

@cognifloyd cognifloyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor issue: we're trying to remove links to the forum whenever we can. Since your already editing this, could you adjust the links?

Otherwise, LGTM. It's wonderful to finally have this fixed!

Note: We will need to update other the release instructions and probably the st2cicd workflows for release after this gets merged.

Makefile Outdated Show resolved Hide resolved
st2.json Outdated Show resolved Hide resolved
Copy link
Member

@arm4b arm4b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the easier to read diff and all the fixes!

Looks really clean, just left a few minor comments.
As a final step, I'll also need to run it before merging as a Packer/Vagrant build can give surprises during the long builds/runs and different environments.

Please also update the Changelog. Besides that, Massive work! 💯

st2.json Show resolved Hide resolved
st2.json Show resolved Hide resolved
st2.json Show resolved Hide resolved
st2.json Outdated Show resolved Hide resolved
st2.json Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
.github/workflows/packer-build.yml Show resolved Hide resolved
Copy link
Member

@arm4b arm4b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Builds well locally! 👍

Just two things missing:

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

.github/workflows/packer-release.yml Outdated Show resolved Hide resolved
@mamercad
Copy link
Contributor Author

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 mamercad requested a review from arm4b January 26, 2023 00:41
Copy link
Member

@arm4b arm4b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, Thanks a lot!

@mamercad
Copy link
Contributor Author

Great work, Thanks a lot!

No worries, thanks for the cleanup ❤️

@mamercad
Copy link
Contributor Author

Great work, Thanks a lot!

No worries, thanks for the cleanup ❤️

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Release 3.7.0 Build Issue
3 participants