Page MenuHomeDevCentral

Allow eggdrop to run Git commands on repositories
ClosedPublic

Authored by dereckson on Mar 16 2023, 18:18.
Tags
None
Referenced Files
F3766198: D2899.id7390.diff
Fri, Nov 22, 16:58
F3766191: D2899.id7391.diff
Fri, Nov 22, 16:57
F3765293: D2899.diff
Fri, Nov 22, 11:33
Unknown Object (File)
Mon, Nov 18, 08:01
Unknown Object (File)
Fri, Nov 15, 06:27
Unknown Object (File)
Tue, Nov 12, 16:55
Unknown Object (File)
Tue, Nov 12, 11:41
Unknown Object (File)
Mon, Nov 11, 23:14
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 Not Applicable
Unit
Tests Not Applicable

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"
}