GitGuardian / ggshield

Find and fix 400+ types of hardcoded secrets and 70+ types of infrastructure-as-code misconfigurations.
https://gitguardian.com
MIT License
1.59k stars 139 forks source link

Standalone linux packages #878

Closed agateau-gg closed 3 months ago

agateau-gg commented 3 months ago

Context

This PR does the following:

What has been done

Quite a lot of refactoring happened:

I also extended the doc on this topic a bit. doc/dev/os-packages.md now contains a flowchart of build-os-packages steps.

Testing

Since build_release_assets.yml is now used by ci.yml, it is executed by this PR. Neverthless, I temporarily added a faketag.yml workflow to test the changes from tag.yml. It's a copy of tag.yml with all the publishing steps replacing by code listing the expected assets to publish. I will remove the commit adding that file before merging (This is similar to what I did in #871).

Review

Best reviewed commit by commit.

agateau-gg commented 3 months ago

Looks good, I'm just curious about one thing: our package is named "os-ubuntu-22.04" but it can most likely be installed on all versions of ubuntu ? could the naming discourage users ?

This name is internal: it's generated by GitHub when it combines the job name and the matrix values. If you download it from the run summary page you can see it contains the following files:

The deb file does not mention any Ubuntu version. I can confirm it works on Ubuntu 22.04 and Debian 12 (It does not work on older versions though, because it needs a glibc >= the-one-in-ubuntu-22.04. We would need to build it on an older distribution to fix this)

pierrelalanne commented 3 months ago

Hi @agateau-gg: I see the last commit introduces a faketag CI workflow. Is this intentional, how is it supposed to be used ?

agateau-gg commented 3 months ago

Hi @agateau-gg: I see the last commit introduces a faketag CI workflow. Is this intentional, how is it supposed to be used ?

@pierrelalanne this workflow is there for testing. I am going to remove it before merging.

You can see a run of it here

See the "Testing" section in the PR description for more details.