-
Notifications
You must be signed in to change notification settings - Fork 43
chore: add Makefile and local registry cache #138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
./scripts/develop.sh | ||
|
||
build: scripts/envbuilder-$(GOARCH) | ||
./scripts/build.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These seem like they should be phony atm?
|
||
.PHONY: test | ||
test: test-registry test-images | ||
go test -count=1 ./... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Count will disable go caching, let's remove it as I imagine anyone developing the project would prefer caching on?
.registry-cache: | ||
mkdir -p .registry-cache && chmod -R ag+w .registry-cache | ||
|
||
.registry-cache/docker/registry/v2/repositories/envbuilder-test-alpine: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should perhaps depend on the test-registry
?
@@ -605,7 +609,7 @@ func TestPrivateRegistry(t *testing.T) { | |||
}) | |||
t.Run("Auth", func(t *testing.T) { | |||
t.Parallel() | |||
image := setupPassthroughRegistry(t, "library/alpine", ®istryAuth{ | |||
image := setupPassthroughRegistry(t, "envbuilder-test-alpine:latest", ®istryAuth{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it intentional to use hard-coded name here, compared to e.g. testImageAlpine
?
Makefile
Note: there is an existing in-memory registry implementation that I looked into using instead, but this was cheaper to implement.