Skip to content

Commit

Permalink
dbld: use AxoSyslog repo
Browse files Browse the repository at this point in the history
Signed-off-by: László Várady <[email protected]>
  • Loading branch information
MrAnno committed May 17, 2024
1 parent a21b40c commit 995aa57
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion dbld/images/devshell.dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG CONTAINER_REGISTRY
FROM $CONTAINER_REGISTRY/dbld-tarball:latest
FROM $CONTAINER_REGISTRY/axosyslog-dbld-tarball:latest

ARG ARG_IMAGE_PLATFORM
ARG COMMIT
Expand Down
2 changes: 1 addition & 1 deletion dbld/images/tarball.dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG CONTAINER_REGISTRY
FROM $CONTAINER_REGISTRY/dbld-debian-testing:latest
FROM $CONTAINER_REGISTRY/axosyslog-dbld-debian-testing:latest

ARG ARG_IMAGE_PLATFORM
ARG COMMIT
Expand Down
34 changes: 17 additions & 17 deletions dbld/rules
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ TARBALL_IMAGE ?= tarball
DEFAULT_DEB_IMAGE=ubuntu-noble
DEFAULT_RPM_IMAGE=almalinux-8
DOCKER=docker
CONTAINER_REGISTRY ?= ghcr.io/syslog-ng
CONTAINER_REGISTRY ?= ghcr.io/axoflow
MODE ?= snapshot
VERSION ?= $(shell MODE=${MODE} scripts/version.sh)
DOCKER_RUN_ARGS=-e USER_NAME_ON_HOST=$(shell whoami) \
Expand Down Expand Up @@ -53,7 +53,7 @@ GIT_RELEASE_TAG=syslog-ng-$(VERSION)
CONFIGURE_OPTS=--enable-debug --enable-manpages --with-python=3 --prefix=/install $(CONFIGURE_ADD)
DBLD_RULES=$(MAKE) --no-print-directory -f $(DBLD_DIR)/rules

DOCKER_SHELL=$(DOCKER) run $(DOCKER_RUN_ARGS) --rm -ti ${CONTAINER_REGISTRY}/dbld-$* /dbld/shell
DOCKER_SHELL=$(DOCKER) run $(DOCKER_RUN_ARGS) --rm -ti ${CONTAINER_REGISTRY}/axosyslog-dbld-$* /dbld/shell

-include dbld/rules.conf

Expand Down Expand Up @@ -97,10 +97,10 @@ help:

bootstrap: bootstrap-$(DEFAULT_IMAGE)
bootstrap-%: setup
$(DOCKER) run $(DOCKER_RUN_ARGS) --rm -i ${CONTAINER_REGISTRY}/dbld-$* /dbld/bootstrap
$(DOCKER) run $(DOCKER_RUN_ARGS) --rm -i ${CONTAINER_REGISTRY}/axosyslog-dbld-$* /dbld/bootstrap

make-%: setup
$(DOCKER) run $(DOCKER_RUN_ARGS) --rm -i ${CONTAINER_REGISTRY}/dbld-$(DEFAULT_IMAGE) /dbld/make $(MAKE_ARGS) $*
$(DOCKER) run $(DOCKER_RUN_ARGS) --rm -i ${CONTAINER_REGISTRY}/axosyslog-dbld-$(DEFAULT_IMAGE) /dbld/make $(MAKE_ARGS) $*

tarball-from-root: setup
@if [ -f $(ROOT_DIR)/../$(TARBALL_BASENAME) ] && [ ! -f $(TARBALL) ]; then \
Expand All @@ -122,7 +122,7 @@ tarball-%: tarball-from-root
fi; \
echo "Git status follows:" && \
( $(GIT) status || echo "Git not found..." ) && \
$(DOCKER) run $(DOCKER_RUN_ARGS) --rm -i ${CONTAINER_REGISTRY}/dbld-$* /dbld/tarball; \
$(DOCKER) run $(DOCKER_RUN_ARGS) --rm -i ${CONTAINER_REGISTRY}/axosyslog-dbld-$* /dbld/tarball; \
else \
echo "Tarball $(TARBALL) is up to date (except files excluded by $(DBLD_DIR)/tarball-changes.ignore)"; \
fi
Expand All @@ -141,20 +141,20 @@ pkg-tarball: pkg-tarball-$(TARBALL_IMAGE)
#
pkg-tarball-%: tarball-%
@if ! tar --strip-components=1 --show-transformed-names -tvf $(TARBALL) | grep ' debian/rules$$' > /dev/null; then \
$(DOCKER) run $(DOCKER_RUN_ARGS) --rm -i ${CONTAINER_REGISTRY}/dbld-$* /dbld/pkg-tarball; \
$(DOCKER) run $(DOCKER_RUN_ARGS) --rm -i ${CONTAINER_REGISTRY}/axosyslog-dbld-$* /dbld/pkg-tarball; \
fi

package: package-$(DEFAULT_IMAGE)
package-%: pkg-tarball
$(DOCKER) run $(DOCKER_RUN_ARGS) --rm -i ${CONTAINER_REGISTRY}/dbld-$* /dbld/package
$(DOCKER) run $(DOCKER_RUN_ARGS) --rm -i ${CONTAINER_REGISTRY}/axosyslog-dbld-$* /dbld/package

deb: deb-$(DEFAULT_DEB_IMAGE)
deb-%: pkg-tarball
$(DOCKER) run $(DOCKER_RUN_ARGS) --rm -i ${CONTAINER_REGISTRY}/dbld-$* /dbld/deb
$(DOCKER) run $(DOCKER_RUN_ARGS) --rm -i ${CONTAINER_REGISTRY}/axosyslog-dbld-$* /dbld/deb

rpm: rpm-$(DEFAULT_RPM_IMAGE)
rpm-%: pkg-tarball
$(DOCKER) run $(DOCKER_RUN_ARGS) --rm -i ${CONTAINER_REGISTRY}/dbld-$* /dbld/rpm
$(DOCKER) run $(DOCKER_RUN_ARGS) --rm -i ${CONTAINER_REGISTRY}/axosyslog-dbld-$* /dbld/rpm

validate-tree-clean:
@if ! $(GIT) diff-index --quiet HEAD; then \
Expand All @@ -169,10 +169,10 @@ validate-version-format:
fi

prepare-release: setup validate-tree-clean validate-version-format
$(DOCKER) run $(DOCKER_RUN_ARGS) --rm -i ${CONTAINER_REGISTRY}/dbld-$(TARBALL_IMAGE) /dbld/prepare-release $(VERSION)
$(DOCKER) run $(DOCKER_RUN_ARGS) --rm -i ${CONTAINER_REGISTRY}/axosyslog-dbld-$(TARBALL_IMAGE) /dbld/prepare-release $(VERSION)

validate-release: validate-tree-clean validate-version-format
$(DOCKER) run $(DOCKER_RUN_ARGS) --rm -i ${CONTAINER_REGISTRY}/dbld-$(TARBALL_IMAGE) /dbld/validate-release-version $(VERSION)
$(DOCKER) run $(DOCKER_RUN_ARGS) --rm -i ${CONTAINER_REGISTRY}/axosyslog-dbld-$(TARBALL_IMAGE) /dbld/validate-release-version $(VERSION)

@if $(GIT) rev-parse --verify -q "$(GIT_RELEASE_TAG)" > /dev/null; then \
echo "Your git tree already has $(GIT_RELEASE_TAG), this might indicate a duplicate release, please remove that first."; \
Expand Down Expand Up @@ -202,7 +202,7 @@ clean:
run: run-$(DEFAULT_IMAGE)
run: RUN_COMMAND=echo Specify RUN_COMMAND to do something sensible here
run-%: setup
$(DOCKER) run $(DOCKER_RUN_ARGS) --rm -ti ${CONTAINER_REGISTRY}/dbld-$* bash -c "$(RUN_COMMAND)"
$(DOCKER) run $(DOCKER_RUN_ARGS) --rm -ti ${CONTAINER_REGISTRY}/axosyslog-dbld-$* bash -c "$(RUN_COMMAND)"

shell: shell-$(DEFAULT_IMAGE)
shell-%: setup
Expand All @@ -216,20 +216,20 @@ image-devshell: image-tarball
image-tarball: image-debian-testing
image-%:
$(DBLD_DIR)/prepare-image-build $* && \
$(DOCKER) build $(DOCKER_BUILD_ARGS) --build-arg=ARG_IMAGE_PLATFORM=$* --build-arg=COMMIT=$$($(GIT) rev-parse --short HEAD || echo "") --build-arg=CONTAINER_REGISTRY=${CONTAINER_REGISTRY} --network=host -t ${CONTAINER_REGISTRY}/dbld-$* -f $(DBLD_DIR)/images/$*.dockerfile $(DBLD_DIR)
$(DOCKER) build $(DOCKER_BUILD_ARGS) --build-arg=ARG_IMAGE_PLATFORM=$* --build-arg=COMMIT=$$($(GIT) rev-parse --short HEAD || echo "") --build-arg=CONTAINER_REGISTRY=${CONTAINER_REGISTRY} --network=host -t ${CONTAINER_REGISTRY}/axosyslog-dbld-$* -f $(DBLD_DIR)/images/$*.dockerfile $(DBLD_DIR)

push-images: $(foreach image,$(IMAGES), push-image-$(image))
push-image-%:
@echo "Pushing image: $*"
$(DOCKER) push ${CONTAINER_REGISTRY}/dbld-$*
$(DOCKER) push ${CONTAINER_REGISTRY}/axosyslog-dbld-$*

pull-images: $(foreach image,$(BUILDER_IMAGES), pull-image-$(image))
pull-image: pull-image-$(DEFAULT_IMAGE)
pull-image-%:
$(DOCKER) pull ${CONTAINER_REGISTRY}/dbld-$*
$(DOCKER) pull ${CONTAINER_REGISTRY}/axosyslog-dbld-$*

cache-image-%:
@IMAGE=${CONTAINER_REGISTRY}/dbld-$*:latest; \
@IMAGE=${CONTAINER_REGISTRY}/axosyslog-dbld-$*:latest; \
IMAGE_ID=$$($(DOCKER) images -q $$IMAGE | head -1); \
WATCHED_FILES="dbld packaging/rhel/syslog-ng.spec packaging/debian/control"; \
if [ "$$IMAGE_ID" = "" ]; then \
Expand Down Expand Up @@ -257,7 +257,7 @@ cache-image-%:
exec: exec-$(DEFAULT_IMAGE)
exec: EXEC_COMMAND=echo Specify EXEC_COMMAND to do something sensible here
exec-%: setup
@container=`$(DOCKER) ps | grep dbld-$* | head -1 | cut -d ' ' -f1`; \
@container=`$(DOCKER) ps | grep axosyslog-dbld-$* | head -1 | cut -d ' ' -f1`; \
$(DOCKER) exec -ti $$container $(EXEC_COMMAND)

login: login-$(DEFAULT_IMAGE)
Expand Down

0 comments on commit 995aa57

Please sign in to comment.