enterprise-contract / ec-cli

Enterprise Contract command line interface
https://enterprisecontract.dev/docs/ec-cli/main/index.html
Apache License 2.0
27 stars 29 forks source link

Fix Konflux build platform arch (release-v0.4 branch) #1697

Closed simonbaird closed 3 months ago

simonbaird commented 3 months ago

The GOOS and GOARCH env vars need to be set explicitly, otherwise we just build the linux x86 binary over and over. Looks like this regression was introduced in commit b8db99c2.

I think restoring the export on those two vars would also have worked.

Ref: https://issues.redhat.com/browse/SECURESIGN-1054

(cherry picked to release-v0.4 branch from main branch commit d62ea87fc5bbf9ff8367faf6429ee9a1045fc5f2)

This is the release branch version of #1696.

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 86.66%. Comparing base (e53a8aa) to head (ffd12cf).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/enterprise-contract/ec-cli/pull/1697/graphs/tree.svg?width=650&height=150&src=pr&token=CY5ORXJB33&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enterprise-contract)](https://app.codecov.io/gh/enterprise-contract/ec-cli/pull/1697?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enterprise-contract) ```diff @@ Coverage Diff @@ ## release-v0.4 #1697 +/- ## ================================================ + Coverage 80.01% 86.66% +6.64% ================================================ Files 65 76 +11 Lines 4818 5158 +340 ================================================ + Hits 3855 4470 +615 + Misses 963 688 -275 ``` | [Flag](https://app.codecov.io/gh/enterprise-contract/ec-cli/pull/1697/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enterprise-contract) | Coverage Δ | | |---|---|---| | [acceptance](https://app.codecov.io/gh/enterprise-contract/ec-cli/pull/1697/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enterprise-contract) | `71.77% <ø> (?)` | | | [generative](https://app.codecov.io/gh/enterprise-contract/ec-cli/pull/1697/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enterprise-contract) | `80.01% <ø> (ø)` | | | [integration](https://app.codecov.io/gh/enterprise-contract/ec-cli/pull/1697/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enterprise-contract) | `80.01% <ø> (ø)` | | | [unit](https://app.codecov.io/gh/enterprise-contract/ec-cli/pull/1697/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enterprise-contract) | `80.01% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enterprise-contract#carryforward-flags-in-the-pull-request-comment) to find out more. [see 41 files with indirect coverage changes](https://app.codecov.io/gh/enterprise-contract/ec-cli/pull/1697/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enterprise-contract)
simonbaird commented 3 months ago

The pre-merge build only creates one binary, so we'll need to wait for the post-merge build to double check it's doing the right thing.

But I did test it locally and it seems to be working as expected.