mirror of
https://github.com/hectorm/docker-qemu-reactos
synced 2025-01-08 01:55:30 +00:00
Use Zstandard to transfer Docker images between CI jobs
This commit is contained in:
parent
7687a6b533
commit
8f0793db9e
@ -17,7 +17,7 @@ default:
|
||||
build:images:
|
||||
stage: 'build:images'
|
||||
before_script:
|
||||
- 'apk add --no-cache coreutils git make xz'
|
||||
- 'apk add --no-cache coreutils git make zstd'
|
||||
script:
|
||||
- 'make IMAGE_BUILD_OPTS="--pull" build-image save-image'
|
||||
artifacts:
|
||||
@ -32,7 +32,7 @@ push:images:
|
||||
only:
|
||||
- '/^v[0-9]+$/'
|
||||
before_script:
|
||||
- 'apk add --no-cache coreutils git make xz'
|
||||
- 'apk add --no-cache coreutils git make zstd'
|
||||
- 'docker login -u "${CI_REGISTRY_USER:?}" -p "${CI_REGISTRY_PASSWORD:?}" "${CI_REGISTRY:?}"'
|
||||
script:
|
||||
- 'make load-image push-image'
|
||||
|
6
Makefile
6
Makefile
@ -22,7 +22,7 @@ endif
|
||||
|
||||
IMAGE_BUILD_OPTS :=
|
||||
|
||||
IMAGE_TARBALL := $(DISTDIR)/$(IMAGE_PROJECT).txz
|
||||
IMAGE_TARBALL := $(DISTDIR)/$(IMAGE_PROJECT).tzst
|
||||
|
||||
##################################################
|
||||
## "all" target
|
||||
@ -47,7 +47,7 @@ build-image:
|
||||
##################################################
|
||||
|
||||
define save_image
|
||||
'$(DOCKER)' save '$(1)' | xz -T0 > '$(2)'
|
||||
'$(DOCKER)' save '$(1)' | zstd -T0 -19 > '$(2)'
|
||||
endef
|
||||
|
||||
.PHONY: save-image
|
||||
@ -62,7 +62,7 @@ $(IMAGE_TARBALL): build-image
|
||||
##################################################
|
||||
|
||||
define load_image
|
||||
'$(DOCKER)' load -i '$(1)'
|
||||
zstd -dc '$(1)' | '$(DOCKER)' load
|
||||
endef
|
||||
|
||||
define tag_image
|
||||
|
Loading…
Reference in New Issue
Block a user