mirror of
https://github.com/TECHNOFAB11/bumpver.git
synced 2025-12-12 14:30:09 +01:00
use py39 on docker ci
This commit is contained in:
parent
9379984b93
commit
0219eaf557
3 changed files with 10 additions and 44 deletions
6
Makefile
6
Makefile
|
|
@ -1,12 +1,12 @@
|
|||
|
||||
PACKAGE_NAME := pycalver
|
||||
PACKAGE_NAME := bumpver
|
||||
|
||||
# This is the python version that is used for:
|
||||
# - `make fmt`
|
||||
# - `make ipy`
|
||||
# - `make lint`
|
||||
# - `make devtest`
|
||||
DEVELOPMENT_PYTHON_VERSION := python=3.8
|
||||
DEVELOPMENT_PYTHON_VERSION := python=3.9
|
||||
|
||||
# These must be valid (space separated) conda package names.
|
||||
# A separate conda environment will be created for each of these.
|
||||
|
|
@ -18,7 +18,7 @@ DEVELOPMENT_PYTHON_VERSION := python=3.8
|
|||
# - python=3.7
|
||||
# - pypy2.7
|
||||
# - pypy3.5
|
||||
SUPPORTED_PYTHON_VERSIONS := python=2.7 python=3.5 python=3.6 python=3.8 pypy2.7 pypy3.5
|
||||
SUPPORTED_PYTHON_VERSIONS := python=3.9 pypy3.5 python=2.7 pypy2.7
|
||||
|
||||
|
||||
include Makefile.bootstrapit.make
|
||||
|
|
|
|||
|
|
@ -67,9 +67,7 @@ BDIST_WHEEL_FILE_CMD = ls -1t dist/*.whl | head -n 1
|
|||
DEV_ENV := $(ENV_PREFIX)/$(DEV_ENV_NAME)
|
||||
DEV_ENV_PY := $(DEV_ENV)/bin/python
|
||||
|
||||
RSA_KEY_PATH := $(HOME)/.ssh/$(PKG_NAME)_gitlab_runner_id_rsa
|
||||
|
||||
DOCKER := $(shell which podman || which docker)
|
||||
DOCKER := $(shell which docker)
|
||||
|
||||
DOCKER_BASE_IMAGE := registry.gitlab.com/mbarkhau/pycalver/base
|
||||
|
||||
|
|
@ -604,19 +602,10 @@ dist_publish: bump_version dist_build dist_upload
|
|||
## 4. You're using WSL but didn't do export DOCKER_HOST="tcp://localhost:2375"
|
||||
.PHONY: docker_build
|
||||
docker_build:
|
||||
@if [[ -f "$(RSA_KEY_PATH)" ]]; then \
|
||||
$(DOCKER) build \
|
||||
--build-arg SSH_PRIVATE_RSA_KEY="$$(cat '$(RSA_KEY_PATH)')" \
|
||||
--file docker_base.Dockerfile \
|
||||
--tag $(DOCKER_BASE_IMAGE):$(DOCKER_IMAGE_VERSION) \
|
||||
--tag $(DOCKER_BASE_IMAGE) \
|
||||
.; \
|
||||
else \
|
||||
$(DOCKER) build \
|
||||
--file docker_base.Dockerfile \
|
||||
--tag $(DOCKER_BASE_IMAGE):$(DOCKER_IMAGE_VERSION) \
|
||||
--tag $(DOCKER_BASE_IMAGE) \
|
||||
.; \
|
||||
fi
|
||||
.;
|
||||
|
||||
# $(DOCKER) push $(DOCKER_BASE_IMAGE)
|
||||
$(DOCKER) push $(DOCKER_BASE_IMAGE)
|
||||
|
|
|
|||
|
|
@ -9,31 +9,10 @@
|
|||
|
||||
FROM registry.gitlab.com/mbarkhau/bootstrapit/env_builder AS builder
|
||||
|
||||
# gcc required for cmarkgfm on python3.8
|
||||
# https://github.com/theacodes/cmarkgfm/issues/22
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y gcc
|
||||
|
||||
RUN mkdir /root/.ssh/ && \
|
||||
ssh-keyscan gitlab.com >> /root/.ssh/known_hosts && \
|
||||
ssh-keyscan registry.gitlab.com >> /root/.ssh/known_hosts
|
||||
|
||||
ARG SSH_PRIVATE_RSA_KEY
|
||||
ENV ENV_SSH_PRIVATE_RSA_KEY=${SSH_PRIVATE_RSA_KEY}
|
||||
|
||||
# Write private key and generate public key
|
||||
RUN if ! test -z "${ENV_SSH_PRIVATE_RSA_KEY}"; then \
|
||||
echo -n "-----BEGIN RSA PRIVATE KEY-----" >> /root/.ssh/id_rsa && \
|
||||
echo -n ${ENV_SSH_PRIVATE_RSA_KEY} \
|
||||
| sed 's/-----BEGIN RSA PRIVATE KEY-----//' \
|
||||
| sed 's/-----END RSA PRIVATE KEY-----//' \
|
||||
| sed 's/ /\n/g' \
|
||||
>> /root/.ssh/id_rsa && \
|
||||
echo -n "-----END RSA PRIVATE KEY-----" >> /root/.ssh/id_rsa && \
|
||||
chmod 600 /root/.ssh/* && \
|
||||
ssh-keygen -y -f /root/.ssh/id_rsa > /root/.ssh/id_rsa.pub; \
|
||||
fi
|
||||
|
||||
ADD requirements/ requirements/
|
||||
ADD scripts/ scripts/
|
||||
|
||||
|
|
@ -48,8 +27,6 @@ RUN make build/envs.txt
|
|||
ADD requirements/ requirements/
|
||||
RUN make conda
|
||||
|
||||
RUN rm -f /root/.ssh/id_rsa
|
||||
|
||||
# Deleting pkgs implies that `conda install`
|
||||
# will have to pull all packages again.
|
||||
RUN conda clean --all --yes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue