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)
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
Unknown Object (File)
Mon, Nov 11, 07:05
Unknown Object (File)
Sat, Nov 9, 04:24
Unknown Object (File)
Thu, Nov 7, 23:18
Unknown Object (File)
Tue, Nov 5, 23:58
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"
}