ci: push envbuilder image to local registry ()

This commit is contained in:
Cian Johnston 2024-08-12 11:51:06 +01:00 committed by GitHub
parent a2a5fcf79b
commit f8a49e84ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View file

@ -41,15 +41,20 @@ test-registry-container: .registry-cache
# Pulls images referenced in integration tests and pushes them to the local cache.
.PHONY: test-images-push
test-images-push: .registry-cache/docker/registry/v2/repositories/test-ubuntu
test-images-push: .registry-cache/docker/registry/v2/repositories/test-ubuntu .registry-cache/docker/registry/v2/repositories/envbuilder
.PHONY: test-images-pull
test-images-pull:
docker pull ubuntu:latest
docker tag ubuntu:latest localhost:5000/test-ubuntu:latest
docker pull ghcr.io/coder/envbuilder-preview:latest
docker tag ghcr.io/coder/envbuilder-preview:latest localhost:5000/envbuilder:latest
.registry-cache:
mkdir -p .registry-cache && chmod -R ag+w .registry-cache
.registry-cache/docker/registry/v2/repositories/test-ubuntu:
docker push localhost:5000/test-ubuntu:latest
.registry-cache/docker/registry/v2/repositories/envbuilder:
docker push localhost:5000/envbuilder:latest

View file

@ -74,7 +74,7 @@ func quote(s string) string {
func setup(ctx context.Context, t testing.TB, files map[string]string) testDependencies {
t.Helper()
envbuilderImage := getEnvOrDefault("ENVBUILDER_IMAGE", "ghcr.io/coder/envbuilder-preview")
envbuilderImage := getEnvOrDefault("ENVBUILDER_IMAGE", "localhost:5000/envbuilder")
envbuilderVersion := getEnvOrDefault("ENVBUILDER_VERSION", "latest")
envbuilderImageRef := envbuilderImage + ":" + envbuilderVersion