Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
295 commits
Select commit Hold shift + click to select a range
786a392
Add support for read-object as a background process to retrieve missi…
Jul 18, 2017
dc93ec6
gvfs: allow overriding core.gvfs
derrickstolee Apr 15, 2020
e390e36
vfs: fix case where directories not handled correctly
jamill Nov 20, 2018
8fa554a
t7524: add test for verbose status deserialzation
jeffhostetler Apr 11, 2020
4201236
sha1_file: when writing objects, skip the read_object_hook
dscho Sep 8, 2017
e981a8d
BRANCHES.md: Add explanation of branches and using forks
Jul 27, 2018
9b96c74
backwards-compatibility: support the post-indexchanged hook
dscho May 28, 2019
1179c21
deserialize-status: silently fallback if we cannot read cache file
jeffhostetler May 13, 2020
cf634f9
credential: set trace2_child_class for credential manager children
jeffhostetler Oct 3, 2019
4cc1a45
sub-process: do not borrow cmd pointer from caller
jeffhostetler Sep 18, 2019
70208f6
sub-process: add subprocess_start_argv()
jeffhostetler Sep 18, 2019
4e11a09
sha1-file: add function to update existing loose object cache
jeffhostetler Sep 24, 2019
860333d
packfile: add install_packed_git_and_mru()
jeffhostetler Sep 25, 2019
7005600
gvfs:trace2:data: add trace2 tracing around read_object_process
jeffhostetler Sep 26, 2018
84429a8
index-pack: avoid immediate object fetch while parsing packfile
jeffhostetler Sep 24, 2019
4048a77
gvfs:trace2:data: status deserialization information
jeffhostetler Sep 26, 2018
7c57ecf
gvfs-helper: create tool to fetch objects using the GVFS Protocol
jeffhostetler Aug 13, 2019
6974ece
gvfs:trace2:data: status serialization
jeffhostetler Jan 7, 2019
a0339ee
gvfs-helper: fix race condition when creating loose object dirs
derrickstolee Oct 4, 2019
11b16d7
gvfs:trace2:data: add vfs stats
jeffhostetler Nov 19, 2018
d11f33d
sha1-file: create shared-cache directory if it doesn't exist
jeffhostetler Oct 7, 2019
c51a97c
trace2: refactor setting process starting time
jeffhostetler Apr 15, 2019
8476996
gvfs-helper: better handling of network errors
jeffhostetler Oct 8, 2019
57977a6
trace2:gvfs:experiment: clear_ce_flags_1
jeffhostetler Apr 30, 2019
e7f22f3
gvfs-helper-client: properly update loose cache with fetched OID
jeffhostetler Oct 8, 2019
19ea8b3
trace2:gvfs:experiment: report_tracking
jeffhostetler Apr 30, 2019
5f4b283
gvfs-helper: V2 robust retry and throttling
jeffhostetler Oct 10, 2019
0a9c606
trace2:gvfs:experiment: read_cache: annotate thread usage in read-cache
jeffhostetler Jun 14, 2019
9a7eae5
gvfs-helper: expose gvfs/objects GET and POST semantics
jeffhostetler Oct 21, 2019
a88d648
trace2:gvfs:experiment: read-cache: time read/write of cache-tree ext…
jeffhostetler Jul 9, 2019
9068d9e
gvfs-helper: dramatically reduce progress noise
derrickstolee Oct 24, 2019
69fb2cd
gvfs-helper: add prefetch support
jeffhostetler Nov 11, 2019
389f50f
cache-tree: use `r` instead of `the_repository` in Trace2
jeffhostetler Jun 3, 2019
b97eed3
gvfs-helper-client.h: define struct object_id
derrickstolee Nov 4, 2019
1971259
gvfs-helper: add prefetch .keep file for last packfile
jeffhostetler Nov 26, 2019
add25f0
trace2:gvfs:experiment: add region to apply_virtualfilesystem()
jeffhostetler Jul 16, 2019
bbfd5f3
gvfs-helper: handle pack-file after single POST request
derrickstolee Nov 11, 2019
d5ee8ca
gvfs-helper: do one read in my_copy_fd_len_tail()
derrickstolee Dec 16, 2019
8c62152
trace2:gvfs:experiment: add region around unpack_trees()
jeffhostetler Jul 16, 2019
67caae7
test-gvfs-prococol, t5799: tests for gvfs-helper
jeffhostetler Oct 25, 2019
2a05711
gvfs-helper: move content-type warning for prefetch packs
derrickstolee Dec 16, 2019
7c2291f
trace2:gvfs:experiment: add region to cache_tree_fully_valid()
jeffhostetler Jul 16, 2019
70da9dc
gvfs-helper: move result-list construction into install functions
jeffhostetler Nov 13, 2019
cbca37c
fetch: use gvfs-helper prefetch under config
derrickstolee Dec 17, 2019
a982d57
trace2:gvfs:experiment: add unpack_entry() counter to unpack_trees() …
jeffhostetler Jul 16, 2019
00518d5
t5799: add support for POST to return either a loose object or packfile
jeffhostetler Nov 13, 2019
b049a7c
gvfs-helper: better support for concurrent packfile fetches
jeffhostetler Dec 18, 2019
821a047
trace2:gvfs:experiment: increase default event depth for unpack-tree …
jeffhostetler Jul 25, 2019
1d51a33
t5799: cleanup wc-l and grep-c lines
jeffhostetler Nov 13, 2019
a35ffe5
remote-curl: do not call fetch-pack when using gvfs-helper
derrickstolee Feb 3, 2020
582ab22
update-microsoft-git: create barebones builtin
derrickstolee Apr 29, 2021
722e0ce
trace2:gvfs:experiment: add data for check_updates() in unpack_trees()
jeffhostetler Jul 25, 2019
1724379
gvfs-helper: verify loose objects after write
derrickstolee Sep 18, 2020
134b59c
fetch: reprepare packs before checking connectivity
derrickstolee Mar 12, 2020
85addbc
homebrew: add GitHub workflow to release Cask
mjcheetham Jul 24, 2020
ae16127
update-microsoft-git: Windows implementation
derrickstolee Apr 29, 2021
b8a9179
Trace2:gvfs:experiment: capture more 'tracking' details
jeffhostetler Jul 26, 2019
83609c8
t7599: create corrupt blob test
jeffhostetler Sep 18, 2020
3a19170
gvfs-helper: retry when creating temp files
derrickstolee Dec 26, 2019
87d9fc2
upload-pack: fix race condition in error messages
derrickstolee Aug 27, 2019
a35270b
maintenance: care about gvfs.sharedCache config
derrickstolee Dec 15, 2020
eb21c2c
unpack-trees:virtualfilesystem: Improve efficiency of clear_ce_flags
neerajsi-msft2 Feb 6, 2021
30f94f5
Adding winget workflows
Apr 29, 2021
55df01c
update-microsoft-git: use brew on macOS
derrickstolee Apr 29, 2021
121b177
Adding readme for microsoft/git
May 4, 2021
aff7112
Merge core VFS features
dscho Jun 11, 2018
b6bcd44
Merge advanced VFS-specific features
dscho Jun 11, 2018
365e1e3
Merge virtualfilesystem hook
dscho Jun 11, 2018
c6f9f43
Merge updates to serialized status
dscho Jun 11, 2018
d884b95
Merge trace2 experimental regions
jeffhostetler Apr 23, 2019
6f31af4
Merge first wave of gvfs-helper feature
jeffhostetler Nov 14, 2019
f921b44
Merge gvfs-helper prefetch feature
derrickstolee Dec 17, 2019
7329bcd
Merge upstreamable patches
dscho Oct 18, 2018
3fd3da4
Merge pull request #301: Update 'git maintenance' to match upstream
derrickstolee Dec 15, 2020
c7e675f
Merge pull request #315: unpack-trees:virtualfilesystem: Improve effi…
derrickstolee Feb 16, 2021
59b1203
Merge pull request #328: Adding winget workflow
derrickstolee Apr 30, 2021
d59bb37
scalar register: set recommended config settings
derrickstolee Apr 12, 2021
4ad23ee
scalar: implement the `clone` subcommand
dscho Apr 12, 2021
bf77fc8
Merge pull request #329: Add `git update-microsoft-git`
derrickstolee Apr 30, 2021
144a942
scalar register/unregister: start/stop maintenance on repository
derrickstolee Apr 12, 2021
5aacfc6
scalar: test `scalar clone`
dscho Apr 14, 2021
10fa371
Implement `scalar diagnose`
dscho Apr 16, 2021
9ba09a4
scalar: allow reconfiguring an existing enlistment
dscho May 27, 2021
75a2682
Merge pull request #333: update microsoft/git README
derrickstolee May 17, 2021
5a21b9c
Start porting `scalar.exe` to C
dscho Apr 10, 2021
147b2d8
scalar: implement 'scalar list'
derrickstolee Apr 12, 2021
0ad4283
scalar clone: suppress warning about `init.defaultBranch`
dscho Apr 14, 2021
41c9ea2
scalar diagnose: include disk space information
dscho Apr 22, 2021
4cc2f2c
scalar reconfigure: optionally handle all registered enlistments
dscho May 27, 2021
5e05787
ci: run Scalar's Functional Tests
dscho Jun 8, 2021
afa38fe
t1092: mark passing test as success
derrickstolee May 28, 2021
51d8825
scalar: add a test script
dscho Apr 14, 2021
fc87ec4
scalar unregister: handle deleted enlistment directory gracefully
dscho May 14, 2021
b4dd2a2
scalar clone: respect --single-branch
dscho Apr 16, 2021
e245688
scalar: teach `diagnose` to gather packfile info
mjcheetham May 19, 2021
2d6c4dc
scalar: implement the `run` command
derrickstolee Apr 14, 2021
8927b17
scalar: support the `config` command for backwards compatibility
dscho May 27, 2021
77dff8d
Merge pull request #371 from dscho/run-scalar-functional-tests-and-fi…
dscho Jun 9, 2021
ae7012f
Merge branch 'barebones-scalar'
dscho May 3, 2021
c1baf65
Merge branch 'scalar-register-unregister-list'
dscho May 3, 2021
44756cb
scalar: implement a minimal JSON parser
dscho Apr 26, 2021
d38b83d
Merge branch 'scalar-clone'
dscho May 3, 2021
292f526
scalar clone: support GVFS-enabled remote repositories
dscho Apr 16, 2021
64f1d74
scalar: teach `diagnose` to gather loose objs info
mjcheetham May 19, 2021
ebc699b
Merge branch 'scalar-run'
dscho May 3, 2021
8b45547
test-gvfs-protocol: also serve smart protocol
dscho Apr 16, 2021
5868343
scalar diagnose: show a spinner while staging content
dscho Apr 28, 2021
4fda53a
Merge branch 'scalar-reconfigure'
dscho Jun 1, 2021
9664235
gvfs-helper: add the `endpoint` command
dscho Apr 26, 2021
ce860ba
scalar: implement the `delete` command
mjcheetham May 12, 2021
97078ee
Merge branch 'scalar-diagnose'
dscho May 3, 2021
8529607
dir_inside_of(): handle directory separators correctly
dscho May 14, 2021
134dcf9
scalar: start documenting the command
dscho May 3, 2021
960b967
scalar: implement the `version` command
dscho May 10, 2021
7b7dd39
Merge branch 'scalar-delete'
dscho May 19, 2021
004649f
scalar: disable authentication in unattended mode
dscho May 6, 2021
2386175
scalar: document the `clone` subcommand
dscho Apr 27, 2021
2a8bc00
scalar: enable built-in FSMonitor on `register`
mjcheetham May 19, 2021
d7c86da
scalar: accept -C and -c options before the subcommand
dscho Apr 29, 2021
559e216
Merge branch 'scalar-version'
dscho May 21, 2021
be54b01
scalar: do initialize `gvfs.sharedCache`
dscho May 3, 2021
297ba56
scalar: document `list`, `register` and `unregister`
dscho Apr 27, 2021
332a9b9
scalar unregister: stop FSMonitor daemon
dscho Apr 22, 2021
a000609
Merge branch 'scalar-c-and-C'
dscho May 3, 2021
6e57a38
scalar diagnose: include shared cache info
dscho Jun 1, 2021
e2444be
git help: special-case `scalar`
dscho May 4, 2021
b4abc7d
git_config_set_multivar_in_file_gently(): add a lock timeout
dscho May 18, 2021
9f9d66e
scalar: document the remaining subcommands
dscho May 3, 2021
f01e7dd
Merge branch 'scalar-and-builtin-fsmonitor'
dscho May 3, 2021
3ffa083
scalar: only try GVFS protocol on https:// URLs
dscho Apr 28, 2021
c4fc4bf
scalar: implement the `help` subcommand
dscho May 18, 2021
80763d2
scalar: set the config write-lock timeout to 150ms
dscho May 18, 2021
05f7e16
Merge branch 'scalar-docs'
dscho May 3, 2021
c04c7d2
scalar: verify that we can use a GVFS-enabled repository
dscho Apr 16, 2021
fa6cea8
NOT-TO-UPSTREAM: ci: build `scalar.exe`, too
dscho Apr 14, 2021
5872180
Optionally include `scalar` when building/testing Git
dscho May 4, 2021
f3e0c4e
Merge branch 'scalar-gentler-config-locking'
dscho May 19, 2021
09924b1
scalar: add the `cache-server` command
dscho Apr 23, 2021
3ddc31a
ci(windows): also run `scalar` tests
dscho Apr 14, 2021
a171c1f
Merge branch 'include-scalar-in-build'
dscho May 4, 2021
75bfd81
scalar: add a test toggle to skip accessing the vsts/info endpoint
dscho May 12, 2021
ad0597b
Merge branch 'scalar-ci'
dscho May 3, 2021
14439a3
Merge branch 'scalar-with-gvfs'
dscho May 3, 2021
e6d827e
scalar: add retry logic to run_git()
derrickstolee Jun 17, 2021
c5043b4
scalar: add docs from microsoft/scalar
derrickstolee Jun 16, 2021
c82b384
Merge pull request #366 from dscho/features/scalar-2.32.0
dscho Jun 9, 2021
5a840e6
scalar: only retry a full clone if not using GVFS protocol
derrickstolee Jun 17, 2021
0c6d339
Merge pull request #377: Update README to include Scalar CLI details
derrickstolee Jun 17, 2021
9706d53
gvfs: disable the built-in FSMonitor
dscho Jun 18, 2021
85c26cb
Merge pull request #378: Scalar: Fix some flaky tests with retry logi…
derrickstolee Jun 18, 2021
35a1f85
Add workflow for apt-get release
dscho Jun 25, 2021
ffc0705
release: create initial Windows installer build workflow
vdye Jul 16, 2021
b4d9a89
release: add Mac OSX installer build
vdye Jul 16, 2021
88caf91
release: build unsigned Ubuntu .deb package
vdye Jul 16, 2021
b617339
sparse-index: create expand_to_pattern_list()
derrickstolee Sep 3, 2021
de92642
release: add signing step for .deb package
vdye Jul 16, 2021
a2c38f9
Merge pull request #379 from dscho/disable-fsmonitor-with-gvfs
dscho Jun 18, 2021
5624d3d
dir: add path_matches_cone_mode_pattern_list()
derrickstolee Sep 3, 2021
8a8df8a
sparse-checkout: add config to disable deleting dirs
derrickstolee Aug 22, 2021
061207f
release: create draft GitHub release with packages & installers
vdye Jul 16, 2021
de88116
add/rm: allow adding sparse entries when virtual
derrickstolee Jun 29, 2021
7be559f
Merge pull request #386 from ldennington/add-release-apt-get-workflow
Jun 28, 2021
7017a57
sparse-index: introduce partially-sparse indexes
derrickstolee Sep 3, 2021
b8c4777
diff: ignore sparse paths in diffstat
derrickstolee Jul 26, 2021
14c9076
release: continue pestering until user upgrades
derrickstolee Oct 6, 2021
9b3c78b
Merge pull request #392: add: allow adding sparse entries when virtual
derrickstolee Jul 1, 2021
3ddbed8
cache-tree: implement cache_tree_find_path()
derrickstolee Sep 3, 2021
3a24570
merge-ort: expand only for out-of-cone conflicts
derrickstolee Jul 28, 2021
07f83fe
Merge pull request #399 from vdye/feature/build-installers
vdye Jul 29, 2021
5397671
sparse-checkout: --no-sparse-index needs a full index
derrickstolee Sep 3, 2021
2ee760a
Merge branch 'sparse-index/merge' into vfs-2.33.0
derrickstolee Aug 24, 2021
0cf3e91
Makefile: disable cURL warnings on gvfs-helper.c
derrickstolee Aug 3, 2021
8e84cde
sparse-index: partially expand directories
derrickstolee Sep 3, 2021
30128ee
scalar: enable untracked cache unconditionally
derrickstolee Jun 21, 2021
64edce5
t7524: test no longer fails
derrickstolee Aug 22, 2021
407b49f
merge-ort: ignore skip-worktree bit with virtual filesystem
derrickstolee Aug 17, 2021
8f19983
sparse-index: complete partial expansion
derrickstolee Sep 3, 2021
aa9ba70
repo-settings: enable sparse index by default
derrickstolee Jun 15, 2021
f30efb2
Use GIT_FORCE_UNTRACKED_CACHE in functional tests
derrickstolee Aug 27, 2021
959d09f
Merge pull request #410: Sparse Index: latest integrations
derrickstolee Aug 24, 2021
e0a51e2
sparse-checkout: integrate with sparse index
derrickstolee Sep 3, 2021
75ba2be
Merge pull request #414: Make sparse index the default
derrickstolee Aug 26, 2021
7df3246
dir: force untracked cache with core.untrackedCache
derrickstolee Aug 30, 2021
a57a78a
reset: add test demonstrating mixed reset outside sparse checkout
vdye Sep 1, 2021
6f8310c
reset: expand test coverage in sparse checkout
vdye Sep 1, 2021
f222f38
sparse-index: update command for expand/collapse test
vdye Sep 1, 2021
2ef2175
update-index (bugfix): `--cacheinfo` should block directories
vdye Sep 10, 2021
e2ee09c
sparse-index: integrate with reset
vdye Aug 25, 2021
8b86c14
update-index: add tests for sparse-checkout compatibility
vdye Sep 9, 2021
8c95488
sparse-index: make non-mixed `reset` sparse-aware
vdye Sep 1, 2021
6853dfa
Merge pull request #421: Sparse index: integrate with the `sparse-che…
derrickstolee Sep 7, 2021
5d7bdff
checkout-index: expand sparse checkout compatibility tests
vdye Sep 9, 2021
df1b1eb
update-index: integrate with sparse index
vdye Sep 9, 2021
437eb57
sparse-index: make mixed `reset` sparse-aware
vdye Aug 31, 2021
dee0322
Merge pull request #415: scalar: enable untracked cache unconditionally
derrickstolee Sep 7, 2021
e6a6ab3
read-tree: add performance test in p2000
vdye Sep 15, 2021
16f0d44
checkout-index: add `--sparse` option
vdye Sep 10, 2021
7838b0d
update-index: remove sparse index expansion for --cacheinfo
vdye Sep 9, 2021
e14c68d
diff: enable and test the sparse index
ldennington Sep 10, 2021
e6380d1
Merge pull request #417 from vdye/sparse-index/git-reset
vdye Sep 7, 2021
3632eaa
read-tree: expand sparse checkout test coverage
vdye Sep 13, 2021
a973fb2
checkout-index: integrate with sparse index
vdye Sep 10, 2021
04d0ec6
p2000: explicitly turn off sparse index
derrickstolee Sep 13, 2021
04afc91
update-index: remove unnecessary index expansion in do_reupdate
vdye Sep 9, 2021
d6ccf37
Merge pull request #419 from ldennington/sparse-index-diff
ldennington Sep 12, 2021
f562701
p2000: add performance test for `git stash`
vdye Sep 20, 2021
3bd8898
status: bugfix directory diff in sparse index
vdye Sep 14, 2021
c553f47
checkout-index: improve `ensure_full_index` scope in `checkout_all`
vdye Sep 10, 2021
7426646
p2000: add new commands
derrickstolee Sep 13, 2021
934eac0
Merge pull request #423 from vdye/sparse-index/update-index
vdye Sep 13, 2021
93e7730
stash: integrate with sparse index
vdye Sep 16, 2021
a9b2f01
read-tree: integrate with sparse index
vdye Sep 14, 2021
e82fdce
checkout-index: add performance test for `checkout-index --all`
vdye Sep 13, 2021
599ee75
Merge pull request #425: Sparse index: add more performance tests
derrickstolee Sep 13, 2021
86948c9
merge-recursive: add merge function arg to `merge_recursive_generic`
vdye Sep 16, 2021
e15621e
read-tree: narrow scope of index expansion for `--prefix`
vdye Sep 15, 2021
a188f45
Merge pull request #424 from vdye/sparse-index/checkout-index
vdye Sep 14, 2021
3de113d
stash: use merge-ort rather than merge-recursive
vdye Sep 16, 2021
d986d73
Merge pull request #426 from vdye/sparse-index/read-tree
vdye Sep 20, 2021
25fa08a
clean: integrate with sparse index
vdye Sep 22, 2021
f4aa414
unpack-trees: improve performance of `next_cache_entry`
vdye Sep 21, 2021
bd8a9b2
Merge pull request #428 from vdye/sparse-index/stash
vdye Sep 21, 2021
e6b8d26
stash: expand testing for `git stash -u`
vdye Sep 22, 2021
fa511ac
Merge pull request #429 from vdye/unpack-trees/fast-cache-traversal
vdye Sep 21, 2021
5a1a49d
sequencer: avoid progress when stderr is redirected
derrickstolee Sep 23, 2021
9f00bb7
unpack-trees: expand conditions for sparse result index
vdye Sep 24, 2021
57f7801
checkout-index: perform lazy index expansion for `--sparse`
vdye Sep 24, 2021
a42b583
Merge pull request #430 from vdye/sparse-index/clean
vdye Sep 23, 2021
756e72f
reset: rename is_missing to !is_in_reset_tree
vdye Oct 6, 2021
5d0baa3
blame: enable and test the sparse index
ldennington Sep 17, 2021
6016c91
stash: move sparse index test for `stash -u`
vdye Sep 24, 2021
7ddb662
Merge pull request #432: sequencer: avoid progress when stderr is red…
derrickstolee Sep 23, 2021
46d7323
reset: preserve skip-worktree bit in mixed reset
vdye Oct 11, 2021
9fe7c4d
fixup! t1092: test interesting sparse-checkout scenarios
ldennington Sep 27, 2021
8ad262a
Merge pull request #433 from vdye/remove-index-expansions
vdye Sep 24, 2021
4612a92
fixup! reset: expand test coverage for sparse checkouts
vdye Sep 27, 2021
9fbcdc7
update-microsoft-git: interface with apt-get on Linux
derrickstolee Sep 29, 2021
0b5dc77
Merge pull request #431 from ldennington/sparse-index-blame
ldennington Sep 27, 2021
a2b2a2c
sparse-index: fix index.sparse inline usage
vdye Oct 11, 2021
3eb8f1e
Merge pull request #434: Integrate `git update-microsoft-git` with `a…
derrickstolee Sep 29, 2021
976eabc
fetch/pull: use the sparse index
derrickstolee Oct 21, 2021
01a4aaa
Merge pull request #444 from vdye/reset-upstream-changes
vdye Oct 13, 2021
c521d45
Merge pull request #455: fetch/pull: use the sparse index
derrickstolee Oct 26, 2021
bb85014
sparse-checkout: disable cone mode on init with invalid patterns
vdye Nov 8, 2021
1a2c87e
sparse: add vfs-specific precautions
derrickstolee Oct 31, 2021
b8f77ab
sparse-checkout: fail cone mode add with existing invalid patterns
vdye Nov 9, 2021
24e26bb
t0001: drop memory-leak check
derrickstolee Oct 31, 2021
ccd32fb
sparse-checkout: require starting '/' in cone mode patterns
vdye Nov 9, 2021
6f3cfc8
t9099: mock out scheduler with GIT_TEST_MAINT_SCHEDULER
derrickstolee Oct 31, 2021
df46e3c
Merge pull request #465 from vdye/bugfix/sparse-checkout-fixes
vdye Nov 10, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 117 additions & 0 deletions .github/scripts/sign-debian-packages.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
import json
import os
import glob
import pprint
import subprocess
import sys

esrp_tool = os.path.join("esrp", "tools", "EsrpClient.exe")

AAD_ID = "38aa33bc-a7e7-4007-bfb2-e8b17f04aadc"
WORKSPACE = os.environ['GITHUB_WORKSPACE'].strip()
ARTIFACTS_DIR = os.environ['ARTIFACTS_DIR'].strip()

def main():
source_root_location = os.path.join(WORKSPACE, ARTIFACTS_DIR, "unsigned")
destination_location = os.path.join(WORKSPACE, ARTIFACTS_DIR)

files = glob.glob(os.path.join(source_root_location, "*.deb"))

print("Found files:")
pprint.pp(files)

if len(files) < 1 or not files[0].endswith(".deb"):
print("Error: cannot find .deb to sign")
exit(1)

file_to_sign = os.path.basename(files[0])

auth_json = {
"Version": "1.0.0",
"AuthenticationType": "AAD_CERT",
"TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"ClientId": AAD_ID,
"AuthCert": {
"SubjectName": f"CN={AAD_ID}.microsoft.com",
"StoreLocation": "LocalMachine",
"StoreName": "My",
},
"RequestSigningCert": {
"SubjectName": f"CN={AAD_ID}",
"StoreLocation": "LocalMachine",
"StoreName": "My",
}
}

input_json = {
"Version": "1.0.0",
"SignBatches": [
{
"SourceLocationType": "UNC",
"SourceRootDirectory": source_root_location,
"DestinationLocationType": "UNC",
"DestinationRootDirectory": destination_location,
"SignRequestFiles": [
{
"CustomerCorrelationId": "01A7F55F-6CDD-4123-B255-77E6F212CDAD",
"SourceLocation": file_to_sign,
"DestinationLocation": os.path.join("signed", file_to_sign),
}
],
"SigningInfo": {
"Operations": [
{
"KeyCode": "CP-450779-Pgp",
"OperationCode": "LinuxSign",
"Parameters": {},
"ToolName": "sign",
"ToolVersion": "1.0",
}
]
}
}
]
}

policy_json = {
"Version": "1.0.0",
"Intent": "production release",
"ContentType": "Debian package",
}

configs = [
("auth.json", auth_json),
("input.json", input_json),
("policy.json", policy_json),
]

for filename, data in configs:
with open(filename, 'w') as fp:
json.dump(data, fp)

# Run ESRP Client
esrp_out = "esrp_out.json"
result = subprocess.run(
[esrp_tool, "sign",
"-a", "auth.json",
"-i", "input.json",
"-p", "policy.json",
"-o", esrp_out,
"-l", "Verbose"],
cwd=WORKSPACE)

if result.returncode != 0:
print("Failed to run ESRPClient.exe")
sys.exit(1)

if os.path.isfile(esrp_out):
print("ESRP output json:")
with open(esrp_out, 'r') as fp:
pprint.pp(json.load(fp))

signed_file = os.path.join(destination_location, "signed", file_to_sign)
if os.path.isfile(signed_file):
print(f"Success!\nSigned {signed_file}")

if __name__ == "__main__":
main()
Loading