Page MenuHomeDevCentral

Allow eggdrop to run Git commands on repositories
ClosedPublic

Authored by dereckson on Mar 16 2023, 18:18.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Mar 17, 22:40
Unknown Object (File)
Sun, Mar 17, 13:42
Unknown Object (File)
Tue, Mar 12, 12:29
Unknown Object (File)
Tue, Mar 12, 08:04
Unknown Object (File)
Sun, Mar 10, 08:54
Unknown Object (File)
Thu, Mar 7, 04:10
Unknown Object (File)
Feb 26 2024, 09:47
Unknown Object (File)
Feb 22 2024, 16:17
Subscribers
None

Details

Summary

To gather metadata about deployed versions, git rev-parse
can be used to get the hash of the current commit.

This requires ownership on repository or an allowlist.
As repositories don't belong to the eggdrop user, a Git configuration
file with a safe repositories allowlist is generated.

Repositories covered:

Ref T1790

Test Plan

Tested with Wearg

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Passed
Unit
No Test Coverage
Branch
main
Build Status
Buildable 4575
Build 4843: arc lint + arc unit

Event Timeline

dereckson created this revision.
dereckson retitled this revision from Allow eggdrop to run git commands on repositories to Allow eggdrop to run Git commands on repositories.
This revision is now accepted and ready to land.Mar 16 2023, 18:19

Example command

18:22:00 <Dereckson> .tcl exec sh -c "cd scripts && git rev-parse HEAD"
18:22:00 <Wearg> Tcl: 542851e2bc550ef3d837a6386e5a1b47fb533d1d

Example of use in Sentry payload

The release and modules key will use this feature:

"release"     : "542851e2bc550ef3d837a6386e5a1b47fb533d1d",
"modules"     : {
    "Rabbitmq" : "1fece45336b971f3208e523fb41b7ce4321ecc72",
    "Tdom"     : "0.9.1",
    "Fbsql"    : "33ab3b29e9cb19871c7e69b342bcef0b8f2121cc",
    "Tls"      : "1.7.18"
}