mirror of
https://github.com/TECHNOFAB11/bumpver.git
synced 2025-12-12 14:30:09 +01:00
use podman instead of docker when available
This commit is contained in:
parent
15c7ea00df
commit
1e4cd7cf34
1 changed files with 7 additions and 6 deletions
|
|
@ -53,7 +53,6 @@ CONDA_ENV_BIN_PYTHON_PATHS := \
|
||||||
| sed 's!\(_pypy3[[:digit:]]\)!\1/bin/pypy3!g' \
|
| sed 's!\(_pypy3[[:digit:]]\)!\1/bin/pypy3!g' \
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
empty :=
|
empty :=
|
||||||
literal_space := $(empty) $(empty)
|
literal_space := $(empty) $(empty)
|
||||||
|
|
||||||
|
|
@ -70,6 +69,8 @@ DEV_ENV_PY := $(DEV_ENV)/bin/python
|
||||||
|
|
||||||
RSA_KEY_PATH := $(HOME)/.ssh/$(PKG_NAME)_gitlab_runner_id_rsa
|
RSA_KEY_PATH := $(HOME)/.ssh/$(PKG_NAME)_gitlab_runner_id_rsa
|
||||||
|
|
||||||
|
DOCKER := $(shell which podman || which docker)
|
||||||
|
|
||||||
DOCKER_BASE_IMAGE := registry.gitlab.com/mbarkhau/pycalver/base
|
DOCKER_BASE_IMAGE := registry.gitlab.com/mbarkhau/pycalver/base
|
||||||
|
|
||||||
GIT_HEAD_REV = $(shell git rev-parse --short HEAD)
|
GIT_HEAD_REV = $(shell git rev-parse --short HEAD)
|
||||||
|
|
@ -531,8 +532,8 @@ devtest:
|
||||||
## Run `make lint mypy test` using docker
|
## Run `make lint mypy test` using docker
|
||||||
.PHONY: citest
|
.PHONY: citest
|
||||||
citest:
|
citest:
|
||||||
docker build --file Dockerfile --tag tmp_citest_$(PKG_NAME) .
|
$(DOCKER) build --file Dockerfile --tag tmp_citest_$(PKG_NAME) .
|
||||||
docker run --tty tmp_citest_$(PKG_NAME) make lint mypy test test_compat
|
$(DOCKER) run --tty tmp_citest_$(PKG_NAME) make lint mypy test test_compat
|
||||||
|
|
||||||
|
|
||||||
## -- Build/Deploy --
|
## -- Build/Deploy --
|
||||||
|
|
@ -604,18 +605,18 @@ dist_publish: bump_version dist_build dist_upload
|
||||||
.PHONY: docker_build
|
.PHONY: docker_build
|
||||||
docker_build:
|
docker_build:
|
||||||
@if [[ -f "$(RSA_KEY_PATH)" ]]; then \
|
@if [[ -f "$(RSA_KEY_PATH)" ]]; then \
|
||||||
docker build \
|
$(DOCKER) build \
|
||||||
--build-arg SSH_PRIVATE_RSA_KEY="$$(cat '$(RSA_KEY_PATH)')" \
|
--build-arg SSH_PRIVATE_RSA_KEY="$$(cat '$(RSA_KEY_PATH)')" \
|
||||||
--file docker_base.Dockerfile \
|
--file docker_base.Dockerfile \
|
||||||
--tag $(DOCKER_BASE_IMAGE):$(DOCKER_IMAGE_VERSION) \
|
--tag $(DOCKER_BASE_IMAGE):$(DOCKER_IMAGE_VERSION) \
|
||||||
--tag $(DOCKER_BASE_IMAGE) \
|
--tag $(DOCKER_BASE_IMAGE) \
|
||||||
.; \
|
.; \
|
||||||
else \
|
else \
|
||||||
docker build \
|
$(DOCKER) build \
|
||||||
--file docker_base.Dockerfile \
|
--file docker_base.Dockerfile \
|
||||||
--tag $(DOCKER_BASE_IMAGE):$(DOCKER_IMAGE_VERSION) \
|
--tag $(DOCKER_BASE_IMAGE):$(DOCKER_IMAGE_VERSION) \
|
||||||
--tag $(DOCKER_BASE_IMAGE) \
|
--tag $(DOCKER_BASE_IMAGE) \
|
||||||
.; \
|
.; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
docker push $(DOCKER_BASE_IMAGE)
|
# $(DOCKER) push $(DOCKER_BASE_IMAGE)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue