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

(#3465) Allow building an MSI during outside of tagged commits. #3466

Merged
merged 5 commits into from
Nov 20, 2024

Conversation

corbob
Copy link
Member

@corbob corbob commented Jun 13, 2024

Description Of Changes

Update the Recipe used to default to not build an MSI. Update the CI configurations to allow building the MSI with the addition of the --shouldBuildMsi=true parameter.

Motivation and Context

Ease the experience of making adjustments to the MSI. Allow us to get an MSI more regularly for testing.

Testing

  1. Ran ./build.bat --target=Build-Msi
  2. Noted that it failed to build as a previous task was skipped.
  3. Ran ./build.bat --target=Build-Msi --shouldBuildMsi=true
  4. Noted that it completed successfully.
  5. Checked the code_drop/Artifacts and code_drop/MSIs/en-US directories to confirm that an MSI was generated.
  6. Monitored the GHA for this PR to note that an MSI was generated and included with the artifacts.
  7. Monitored the Team City build for this PR to note that an MSI was not generated (because it's not a tagged build and the settings haven't been merged yet)

Operating Systems Testing

  • Windows 10

Change Types Made

  • Bug fix (non-breaking change).
  • Feature / Enhancement (non-breaking change).
  • Breaking change (fix or feature that could cause existing functionality to change).
  • Documentation changes.
  • PowerShell code changes.

Change Checklist

  • Requires a change to the documentation.
  • Documentation has been updated.
  • Tests to cover my changes, have been added.
  • All new and existing tests passed?
  • PowerShell code changes: PowerShell v2 compatibility checked?

Related Issue

Fixes #3465

@corbob corbob force-pushed the build-msi branch 2 times, most recently from 8c9dbed to c8151ad Compare June 13, 2024 20:46
@corbob
Copy link
Member Author

corbob commented Jun 13, 2024

Note: The MSI task in the GHA ran successfully, but Chocolatey.Cake.Recipe doesn't currently try to upload the MSI on GHA: https://github.com/chocolatey/Chocolatey.Cake.Recipe/blob/e4ac5d739a594f24d62c8502dfa4573da59f5267/Chocolatey.Cake.Recipe/Content/build.cake#L482

Edit: This is resolved by having the GitHub Action also pick up the MSI and include it with the artifacts.

.teamcity/settings.kts Outdated Show resolved Hide resolved
@corbob corbob force-pushed the build-msi branch 3 times, most recently from 730a712 to 0495a4f Compare November 19, 2024 17:34
@corbob
Copy link
Member Author

corbob commented Nov 19, 2024

I have added a commit onto this PR that fixes up the Arguments decryption tests for the Download command.

vexx32
vexx32 previously requested changes Nov 19, 2024
Copy link
Member

@vexx32 vexx32 left a comment

Choose a reason for hiding this comment

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

I'm not sure this is working as expected atm given neither the GHA nor TeamCity builds seem to have generated the MSI. 🤔

.github/workflows/build.yml Show resolved Hide resolved
recipe.cake Show resolved Hide resolved
@gep13 gep13 changed the base branch from develop to hotfix/2.4.1 November 20, 2024 09:02
Prepare-Chocolatey-Package previously would fail if not run as part of a
target that also included copying the nuspec files. This commit makes
the task dependency explicit so you can directly run
Prepare-Chocolatey-Package.
Changed the logic for skipping an MSI build to skip it by default, and
no longer depend on a tagged build. This will allow developers to
generate an MSI by adding `--shouldBuildMsi=true`.
When running the builds in CI, we should generate the MSI as well. This
will allow us to get an MSI for any build to test with if needed.
As with the previous commit, this adds the configuration for GitHub
Actions. Thus allowing us to ensure the MSI is able to be built in
GitHub Actions as well.

When running the builds in CI, we should generate the MSI as well. This
will allow us to get an MSI for any build to test with if needed.
When the tests are run against the download command, the second run was
failing due to already having downloaded the package. Remove the
download directory to ensure the tests function the same.
Copy link
Member

@gep13 gep13 left a comment

Choose a reason for hiding this comment

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

LGTM!

@gep13 gep13 dismissed vexx32’s stale review November 20, 2024 11:18

The requested changes have been made.

@gep13 gep13 merged commit 1cb4a3d into chocolatey:hotfix/2.4.1 Nov 20, 2024
5 checks passed
@gep13
Copy link
Member

gep13 commented Nov 20, 2024

@corbob thank you for getting this fixed up!

@corbob corbob deleted the build-msi branch November 20, 2024 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add the ability to create an MSI on non-tagged builds
3 participants