Commit graph

32 commits

Author SHA1 Message Date
Aditya Sirish A Yelgundhalli
3e7e688406
gittuf: Update how sync and propagation workflows interact
Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2025-03-05 11:21:29 -05:00
Aditya Sirish A Yelgundhalli
2dc047ec98
*: Remove some unnecessary pieces
Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2025-02-18 10:54:27 -05:00
Aditya Sirish A Yelgundhalli
3d9ec638b3
*: Add propagation flow to certain RSL workflows
Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2025-02-05 15:35:16 -05:00
Aditya Sirish A Yelgundhalli
9c9d735f40
gittuf: Add propagation workflow
Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2025-02-05 14:38:58 -05:00
Aditya Sirish
749b7df97c
*: Add support for coloring log output
Signed-off-by: Aditya Sirish <aditya@saky.in>
2025-02-01 17:58:11 -05:00
Aditya Sirish
c3148721b9
rsl: Fix gittuf rsl log buffering
This commit fixes how gittuf rsl log loads RSL entries to print.
Earlier, all entries were loaded into memory first and then printed.
This commit switches over to a buffered write approach, meaning the user
starts seeing output right away.

Signed-off-by: Aditya Sirish <aditya@saky.in>
Co-authored-by: Hao Tran <haoanhtran7@gmail.com>
2025-02-01 17:51:37 -05:00
Aditya Sirish
cdacf9cf1a
*: Add control for RSL duplicate check
The RSL entry creation flow checks to see if the latest entry for the
reference being pushed has the same target ID as the proposed new entry.
This check should be optional, depending on how the entry is created.
When created using the "gittuf rsl record" command, the check should be
performed by default. But when created using the git-remote-gittuf
transport, the check is superfluous: the push is happening and an extra
entry recording the push happened is better. This also speeds up the RSL
entry creation for a new branch via the transport, as looking for an
existing RSL entry for the branch in question is expensive (the entire
RSL history must be checked).

Signed-off-by: Aditya Sirish <aditya@saky.in>
2024-12-18 11:21:00 -05:00
Pat Zielinski
4a7bc7e168 *: Move and update signing key checks
Signed-off-by: Pat Zielinski <70954403+patzielinski@users.noreply.github.com>
2024-11-11 18:05:39 -05:00
Aditya Sirish A Yelgundhalli
eda8a89e2a
repository -> gittuf: Expose a gittuf Go API
Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2024-10-23 13:30:35 -04:00
Pat Zielinski
d571facb8d *: Add copyright notice to code files
Signed-off-by: Pat Zielinski <70954403+patzielinski@users.noreply.github.com>
2024-09-27 15:28:12 -04:00
Aditya Sirish
929e0d162d
*: Automatically reconcile local RSL with remote updates
This commit adds ReconcileLocalRSLWithRemote, which checks the local RSL
against the specified remote and reconciles the local RSL if needed. If
the local RSL doesn't exist or is strictly behind the remote RSL, then
the local RSL is updated to match the remote RSL. If the local RSL is
ahead of the remote RSL, nothing is updated. Finally, if the local and
remote RSLs have diverged, then the local only RSL entries are reapplied
over the latest entries in the remote if the local only RSL entries and
remote only entries are for different Git references.

Signed-off-by: Aditya Sirish <aditya@saky.in>
2024-09-25 14:02:59 -04:00
Aditya Sirish
2fd8d2a817
*: Support distinct src and dst refs in RSL
Signed-off-by: Aditya Sirish <aditya@saky.in>
2024-06-28 11:22:23 -04:00
Aditya Sirish
bd5baa2e32 *: Use rewritten gitinterface
Signed-off-by: Aditya Sirish <aditya@saky.in>
2024-06-21 10:36:16 -04:00
patzielinski
e8a798f5ca
Merge pull request #369 from neilnaveen/neil/fixrslrecordonrebase
Automaticaly Skip RSL Reference Entries That Point to Non-Existent Commits
2024-06-18 02:15:28 +00:00
neilnaveen
3b1af5b010 Automaticaly Skip RSL Reference Entries That Point to Non-Existent Commits
- Fixes https://github.com/gittuf/gittuf/issues/368

Signed-off-by: neilnaveen <42328488+neilnaveen@users.noreply.github.com>
2024-06-17 17:34:06 -05:00
neilnaveen
46b4bffb8d Added gittuf rsl log to log the rsl with additional information
- Added gittuf rsl log to log the rsl with additional information

Signed-off-by: neilnaveen <42328488+neilnaveen@users.noreply.github.com>
2024-05-23 09:56:23 -05:00
Aditya Sirish
0de9f978f1
cmd: Reorganize dev cmds and dev mode check
Signed-off-by: Aditya Sirish <aditya@saky.in>
2024-01-16 11:18:50 -05:00
Aditya Sirish
3fbf06a4e0
cmd: Update dev only commands
Signed-off-by: Aditya Sirish <aditya@saky.in>
2024-01-16 11:18:50 -05:00
Aditya Sirish
f940551271
*: Rename eval to developer mode
Signed-off-by: Aditya Sirish <aditya@saky.in>
2024-01-16 11:18:50 -05:00
Billy Lynch
0eb7030d71
Generate CLI docs.
Adds `DisableAutoGenTag: true` to disable timestamp in generated docs.

Signed-off-by: Billy Lynch <billy@chainguard.dev>
2024-01-12 11:50:27 -05:00
Aditya Sirish
e4b801c525
cmd: Sign eval RSL entries with chosen key
Signed-off-by: Aditya Sirish <aditya@saky.in>
2024-01-11 11:41:07 -05:00
Aditya Sirish
4cb2856a51
*: Move eval mode check out of cmd
Signed-off-by: Aditya Sirish <aditya@saky.in>
2024-01-10 19:00:43 -05:00
Pat Zielinski
d6c45fe479 *: Check if signing viable before running commands
This commit has gittuf check if signing using the user's
signing key (specified in the git configuration) is possible
for commands that require this. This is done by way of a
function in cmd/common/common.go, called in commands' PreRunE.

Signed-off-by: Pat Zielinski <70954403+patzielinski@users.noreply.github.com>
2023-11-13 15:05:30 -05:00
Aditya Sirish
a95ec8df43
*: Fix linter issues
This commit fixes issues flagged by the additional linters enabled in
the parent commit.

Signed-off-by: Aditya Sirish <aditya@saky.in>
2023-10-24 16:48:46 -04:00
Aditya Sirish
fe41edb658
cmd: Add rsl remote pull
Signed-off-by: Aditya Sirish <aditya@saky.in>
2023-10-20 12:42:18 -04:00
Aditya Sirish
d62234da11
cmd: Add rsl remote push
Signed-off-by: Aditya Sirish <aditya@saky.in>
2023-10-17 11:37:07 -04:00
Pat Zielinski
d0905e7816 Add SPDX License Identifiers to code files
Signed-off-by: Pat Zielinski <70954403+patzielinski@users.noreply.github.com>
2023-10-09 08:09:34 -04:00
Aditya Sirish
2602875c93
cmd: Add eval mode, record old commits in RSL
The CLI package checks if gittuf is in eval mode before invoking
functions that are not meant for regular use. This commit also adds the
gated invocation for the first eval function, the ability to record an
RSL entry for non-latest commits in a ref.

Signed-off-by: Aditya Sirish <aditya@saky.in>
2023-09-15 11:45:04 -04:00
Aditya Sirish
3f89457c31
cmd: Use cmd.Context instead of context.Background
Signed-off-by: Aditya Sirish <aditya@saky.in>
2023-09-12 17:40:31 -04:00
Aditya Sirish
20db25a49c
cmd: Add rsl remote check command
Signed-off-by: Aditya Sirish <aditya@saky.in>
2023-09-12 17:23:11 -04:00
Aditya Sirish
3192cdb861
Rename module to use gittuf org
Signed-off-by: Aditya Sirish <aditya@saky.in>
2023-08-30 13:13:54 -04:00
Aditya Sirish
9956b199fd
cmd: Add CLI commands for RSL manipulation
Signed-off-by: Aditya Sirish <aditya@saky.in>
2023-06-20 13:48:03 -07:00