Skip to content

Commit ab38f95

Browse files
authored
Rewrite deploy to minimize API requests (#38)
* WIP: first pass at deploy * WIP: second pass, now with more cowbell * WIP: refactor coverage handling (cleaner, more consistent, no longer has to clobber top-level bin/) * WIP: the start of more "jq" tests * WIP: add a few TODOs * Add a benchmark for `om.OrderedMap.Set` I was testing a minor memory-usage improvement to `Set`, but it turns out it doesn't actually matter (and this helped me determine that, so I might as well keep it). * Add explicit `Reference.StringWithKnownDigest` unit test * WIP: refactor EnsureManifest loop with more correct handling of child manifests vs blobs * Update to use the new `ociregistry.HTTPError` for more consistent/correct HTTP error handling * WIP: remove TODO that was implemented elsewhere (and fix error message text / comment text) * WIP: also normalize descriptor field ordering * WIP: assume pre-normalized platform (no reason to normalize more than once) * WIP: initial "deploy" data munging helpers plus tests * WIP: update Jenkinsfile.deploy to use new deploy code * WIP: remove example-commands symlink so Git detects rename better * WIP: add delay for racy registry startup * WIP: remove trap once it's no longer necessary * WIP: typo * WIP: remove unnecessary TODOs
1 parent 530a108 commit ab38f95

35 files changed

+5362
-85
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,13 @@ jobs:
2929
chmod +x .bin/bashbrew
3030
.bin/bashbrew --version
3131
echo "$PWD/.bin" >> "$GITHUB_PATH"
32-
- run: .test/test.sh
32+
- run: .test/test.sh --deploy
3333
- uses: actions/upload-artifact@v4
3434
with:
3535
name: coverage
36-
path: .test/coverage**
36+
path: |
37+
.test/.coverage/coverage.*
38+
.test/.coverage/GOCOVERDIR/
3739
if-no-files-found: error
3840
- name: gofmt
3941
run: find -name '*.go' -type f -exec ./.go-env.sh gofmt -l -s -w '{}' +

.test/.coverage/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
**
2+
!.gitignore
3+
!builds.sh

.test/.coverage/builds.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../builds.sh

.test/deploy-all/in.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../builds.json

0 commit comments

Comments
 (0)