Skip to content
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

package: use wolfi prefix #13357

Merged
merged 6 commits into from
Jun 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .buildkite/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ notify:
env:
IMAGE_UBUNTU_X86_64: "family/core-ubuntu-2004"
IMAGE_UBUNTU_ARM_64: "core-ubuntu-2004-aarch64"
GENERATE_CHAINGUARD_IMAGES: true
GENERATE_WOLFI_IMAGES: true

steps:
- group: "Package"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
# If no PR event or if a PR event that's caused by a non-fork and non dependabot actor
if: github.event_name != 'pull_request' || ( github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false && github.actor != 'dependabot[bot]' )
env:
GENERATE_CHAINGUARD_IMAGES: true
GENERATE_WOLFI_IMAGES: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
Expand Down
18 changes: 9 additions & 9 deletions packaging.mk
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@ DOCKER_IMAGES := \
build/docker/apm-server-ubi-$(APM_SERVER_VERSION).txt \
build/docker/apm-server-ubi-$(APM_SERVER_VERSION)-SNAPSHOT.txt

# If GENERATE_CHAINGUARD_IMAGES is set then generate chainguard docker images.
ifdef GENERATE_CHAINGUARD_IMAGES
# If GENERATE_WOLFI_IMAGES is set then generate wolfi docker images.
ifdef GENERATE_WOLFI_IMAGES
DOCKER_IMAGES := $(DOCKER_IMAGES) \
build/docker/apm-server-chainguard-$(APM_SERVER_VERSION).txt \
build/docker/apm-server-chainguard-$(APM_SERVER_VERSION)-SNAPSHOT.txt
build/docker/apm-server-wolfi-$(APM_SERVER_VERSION).txt \
build/docker/apm-server-wolfi-$(APM_SERVER_VERSION)-SNAPSHOT.txt
endif

build/docker/%.txt: DOCKER_IMAGE_TAG := docker.elastic.co/apm/apm-server:%
build/docker/%.txt: VERSION := $(APM_SERVER_VERSION)
build/docker/%.txt: DOCKER_FILE_ARGS := -f packaging/docker/Dockerfile
build/docker/%-SNAPSHOT.txt: VERSION := $(APM_SERVER_VERSION)-SNAPSHOT
build/docker/apm-server-ubi-%.txt: DOCKER_BUILD_ARGS+=--build-arg BASE_IMAGE=docker.elastic.co/ubi9/ubi-minimal
build/docker/apm-server-chainguard-%.txt: DOCKER_FILE_ARGS := -f packaging/docker/Dockerfile.chainguard
build/docker/apm-server-wolfi-%.txt: DOCKER_FILE_ARGS := -f packaging/docker/Dockerfile.wolfi

INTERNAL_DOCKER_IMAGE := docker.elastic.co/observability-ci/apm-server-internal

Expand All @@ -54,15 +54,15 @@ $(DOCKER_IMAGES):
--build-arg GOLANG_VERSION=$(GOLANG_VERSION) \
--build-arg VERSION=$(VERSION) \
$(DOCKER_BUILD_ARGS) \
--tag $(INTERNAL_DOCKER_IMAGE):$(VERSION)$(if $(findstring arm64,$(GOARCH)),-arm64)$(if $(findstring chainguard,$(@)),-chainguard) \
--tag $(INTERNAL_DOCKER_IMAGE):$(VERSION)$(if $(findstring arm64,$(GOARCH)),-arm64)$(if $(findstring wolfi,$(@)),-wolfi) \
$(DOCKER_FILE_ARGS) .

# Docker image tarballs. We distribute UBI Docker images only for AMD64.
DOCKER_IMAGE_SUFFIX := docker-image$(if $(findstring arm64,$(GOARCH)),-arm64).tar.gz
DOCKER_IMAGE_PREFIXES := apm-server $(if $(findstring amd64,$(GOARCH)), apm-server-ubi)
# If GENERATE_CHAINGUARD_IMAGES is set then generate chainguard docker images.
ifdef GENERATE_CHAINGUARD_IMAGES
DOCKER_IMAGE_PREFIXES := $(DOCKER_IMAGE_PREFIXES) apm-server-chainguard
# If GENERATE_WOLFI_IMAGES is set then generate wolfi docker images.
ifdef GENERATE_WOLFI_IMAGES
DOCKER_IMAGE_PREFIXES := $(DOCKER_IMAGE_PREFIXES) apm-server-wolfi
endif
DOCKER_IMAGE_RELEASE_TARBALLS := $(patsubst %, $(DISTDIR)/%-$(APM_SERVER_VERSION)-$(DOCKER_IMAGE_SUFFIX), $(DOCKER_IMAGE_PREFIXES))
DOCKER_IMAGE_SNAPSHOT_TARBALLS := $(patsubst %, $(DISTDIR)/%-$(APM_SERVER_VERSION)-SNAPSHOT-$(DOCKER_IMAGE_SUFFIX), $(DOCKER_IMAGE_PREFIXES))
Expand Down