-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
manager: Adding docker multi-arch support
In this PR we moved all docker-related build processes back to goreleaser, so build, publish and manifest creation (which we need to support multi-arch images) will be done here instead of `Scylla-pkg`. Since we always want to publish our docker images (including in master) I have created a dedicated yaml file configuration for our docker build process As a result, for releases only, we will be able to publish the release to GitHub Closes: #3278 This should be merged together with scylladb/scylla-pkg#3615
- Loading branch information
1 parent
1b4217f
commit ebcdc71
Showing
5 changed files
with
113 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
project_name: scylla-manager | ||
dist: release-docker | ||
builds: | ||
- skip: true | ||
|
||
dockers: | ||
- ids: | ||
- server | ||
- client | ||
use: docker | ||
goos: linux | ||
goarch: amd64 | ||
image_templates: | ||
- "scylladb/scylla-manager:{{ .Version }}-x86_64" | ||
dockerfile: | ||
docker/scylla-manager.dockerfile | ||
extra_files: | ||
- docker/scylla-manager.yaml | ||
- release | ||
build_flag_templates: | ||
- "--build-arg=BASE_IMAGE=ubuntu:22.04" | ||
- "--build-arg=ARCH=amd64" | ||
|
||
- ids: | ||
- server | ||
- client | ||
use: docker | ||
goos: linux | ||
goarch: arm64 | ||
image_templates: | ||
- "scylladb/scylla-manager:{{ .Version }}-aarch64" | ||
dockerfile: | ||
docker/scylla-manager.dockerfile | ||
extra_files: | ||
- docker/scylla-manager.yaml | ||
- release/ | ||
build_flag_templates: | ||
- "--build-arg=BASE_IMAGE=arm64v8/ubuntu:22.04" | ||
- "--build-arg=ARCH=arm64" | ||
|
||
- ids: | ||
- agent | ||
use: docker | ||
goos: linux | ||
goarch: amd64 | ||
image_templates: | ||
- "scylladb/scylla-manager-agent:{{ .Version }}-x86_64" | ||
dockerfile: | ||
docker/scylla-manager-agent.dockerfile | ||
extra_files: | ||
- docker/scylla-manager.yaml | ||
- release | ||
build_flag_templates: | ||
- "--build-arg=BASE_IMAGE=ubuntu:22.04" | ||
- "--build-arg=ARCH=amd64" | ||
|
||
- ids: | ||
- agent | ||
use: docker | ||
goos: linux | ||
goarch: arm64 | ||
image_templates: | ||
- "scylladb/scylla-manager-agent:{{ .Version }}-aarch64" | ||
dockerfile: | ||
docker/scylla-manager-agent.dockerfile | ||
extra_files: | ||
- docker/scylla-manager.yaml | ||
- release | ||
build_flag_templates: | ||
- "--build-arg=BASE_IMAGE=arm64v8/ubuntu:22.04" | ||
- "--build-arg=ARCH=arm64" | ||
|
||
docker_manifests: | ||
- id: scylla-manager | ||
name_template: "scylladb/scylla-manager:{{ .Version }}" | ||
image_templates: | ||
- "scylladb/scylla-manager:{{ .Version }}-x86_64" | ||
- "scylladb/scylla-manager:{{ .Version }}-aarch64" | ||
create_flags: | ||
- --insecure | ||
push_flags: | ||
- --insecure | ||
skip_push: false | ||
|
||
- id: scylla-manager-agent | ||
name_template: "scylladb/scylla-manager-agent:{{ .Version }}" | ||
image_templates: | ||
- "scylladb/scylla-manager-agent:{{ .Version }}-x86_64" | ||
- "scylladb/scylla-manager-agent:{{ .Version }}-aarch64" | ||
create_flags: | ||
- --insecure | ||
push_flags: | ||
- --insecure | ||
skip_push: false | ||
|
||
checksum: | ||
name_template: 'checksums' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,34 @@ | ||
RELEASE := 0.$(shell date +%Y%m%d).$(shell git describe --always) | ||
VERSION ?= 3.3.0-dev | ||
PUBLISH := 0 | ||
|
||
ifdef $$VERSION | ||
VERSION := $$VERSION | ||
endif | ||
|
||
ifeq ($(PUBLISH),0) | ||
publish = --skip=publish | ||
VERSION_NAME := $(VERSION)-$(RELEASE) | ||
else | ||
VERSION_NAME := v$(VERSION) | ||
endif | ||
|
||
$(shell echo $(VERSION) > .version) | ||
$(shell echo $(RELEASE) > .release) | ||
|
||
GORELEASER := goreleaser --clean | ||
.PHONY: release | ||
release: | ||
git tag $(VERSION_NAME) || true | ||
$(GORELEASER) --skip=publish --skip=validate | ||
$(GORELEASER) $(publish) --skip=validate --config .goreleaser.yaml | ||
$(GORELEASER) --skip=validate --config .goreleaser-docker.yaml | ||
|
||
.PHONY: snapshot | ||
snapshot: | ||
GORELEASER_CURRENT_TAG=$(VERSION_NAME) $(GORELEASER) --snapshot | ||
GORELEASER_CURRENT_TAG=$(VERSION_NAME) | ||
$(GORELEASER) --snapshot --skip=publish --skip=validate --config .goreleaser.yaml | ||
$(GORELEASER) --skip=validate --config .goreleaser-docker.yaml | ||
|
||
.PHONY: clean | ||
clean: | ||
@rm -Rf release | ||
@rm -Rf release release-docker .version .release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters