-
Notifications
You must be signed in to change notification settings - Fork 14
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
🐛 install location + re-enable arm64 MSI builds #490
🐛 install location + re-enable arm64 MSI builds #490
Conversation
8b0a8ca
to
e393b2a
Compare
d63164d
to
8eb0c59
Compare
.github/workflows/pkg_msi.yaml
Outdated
if (-not $match) { | ||
exit 1 | ||
} | ||
- name: Run a basic cnquery sanity check |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean to test cnspec here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, fixed in #491
@@ -0,0 +1,17 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets not add /DS_Store files. We should add this one to gitignore to prevent this from future commits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whoops - added those two patterns to .gitignore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great improvement @philipbalinov
curl -sL --head --fail https://github.com/mondoohq/cnquery/releases/download/v${{ steps.version.outputs.version }}/cnquery_${{ steps.version.outputs.version }}_windows_amd64.zip | ||
curl -sL --head --fail https://github.com/mondoohq/cnspec/releases/download/v${{ steps.version.outputs.version }}/cnspec_${{ steps.version.outputs.version }}_windows_amd64.zip | ||
|
||
curl -sL --head --fail https://github.com/mondoohq/cnquery/releases/download/v${{ steps.version.outputs.version }}/cnquery_${{ steps.version.outputs.version }}_windows_amd64.zip \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice simplification
curl -sSL -O https://github.com/mondoohq/cnquery/releases/download/v${VERSION}/cnquery_${VERSION}_windows_amd64.zip | ||
unzip cnquery_${VERSION}_windows_amd64.zip | ||
rm cnquery_${VERSION}_windows_amd64.zip | ||
mkdir -p dist/${{ matrix.arch }} && cd dist/${{ matrix.arch }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the matrix here
.github/workflows/pkg_msi.yaml
Outdated
& 'C:\Program Files\Mondoo\cnquery.exe' run -c "os.base.packages.where(name == 'Mondoo') { name }" | ||
- name: Login to edge with cnspec | ||
run: | | ||
& 'C:\Program Files\Mondoo\cnspec.exe' login -t "${{ secrets.INSTALL_TEST_MONDOO_REGISTRATION_TOKEN }}" --config C:\ProgramData\Mondoo\mondoo.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! I think we should also run the logout.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added logout
@@ -6,13 +6,23 @@ | |||
|
|||
<?define UpgradeCodeStandard = "b0fee933-ccd2-467c-8fe4-bb0ac6a099c8" ?> | |||
<?define UpgradeCodeEnterprise = "4ABDD5C7-E1E1-41A6-8119-DCE65634A6CC" ?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not required as this PR but we should remove the enterprise package since that is something we do not do anymore. Essentially we have the same package, just for amd64 and arm64. From what I see in the build pipeline we do not even build enterprise anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a note on this - we need to at least keep the UpgradeCodeEnterprise
and OtherSKU
logic, as that protects us from installing the standard package side-by-side with the enterprise one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great idea.
<?if $(var.arch) = "arm64"?> | ||
<?define UpgradeCode = "$(var.UpgradeCodeArm64)"?> | ||
<?define InstallerVersion="500"?> | ||
<?define ProductName = "Mondoo"?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need the product name in the if condition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved all common elements out of the conditional block.
packages/msi/msi/Product.wxs
Outdated
<?define UpgradeCodeArm64 = "090cfb7d-c00c-4d36-94fe-f649a4b29c91" ?> | ||
<?if $(var.arch) = "arm64"?> | ||
<?define UpgradeCode = "$(var.UpgradeCodeArm64)"?> | ||
<?define InstallerVersion="500"?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add comment what installer version 500 / 200 mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added comments with the meaning of these versions
@@ -3,9 +3,12 @@ | |||
|
|||
# use: ./package.ps1 -version 0.32.0 | |||
param ( | |||
[string]$version = 'x.xx.x' | |||
[string]$version = 'x.xx.x', | |||
[string]$arch = 'amd64|arm64' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
373d298
to
a3382cc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Revert "Revert "Build arm64 MSI packages additionally to the current amd64 ones (#482)" (#486)" - This reverts commit 843a783. - Revert the `Platform` attribute in the Package definition, as that appears to dictate which install location the package should use i.e. "Program Files" vs "Program Files (x64)" - Some minor improvements
e3b39e8
to
a9b0ecd
Compare
after enabling arm64 support for the mondoo.MSI, the install location on amd64 suddenly changed to "Program Files (x64)" which breaks the product.
This change aims to pin the installation path on all platforms to "Program Files"
Changes
Testing Done
Notes
This reverts and emergency revert that was done; this is the fix compared to the original commit for arm64 support