diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..13dac02 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,62 @@ +# Use the latest 2.1 version of CircleCI pipeline process engine. +# See: https://circleci.com/docs/2.0/configuration-reference +version: 2.1 + +# Define a job to be invoked later in a workflow. +# See: https://circleci.com/docs/2.0/configuration-reference/#jobs +jobs: + aarch64-test: + machine: + # https://circleci.com/developer/machine/image/ubuntu-2404 + image: ubuntu-2404:2026.05.1 + resource_class: arm.medium + environment: + RUNTIME_BASE: registry.access.redhat.com/ubi10-minimal:latest + # Add steps to the job + # See: https://circleci.com/docs/2.0/configuration-reference/#steps + steps: + - checkout + - run: | + uname -a + python3 --version + # fail if not using Python 3 + python3 --version | grep "3\." + + sudo apt-get install make + make build-pkg + + aarch64-build-and-push: + machine: + # https://circleci.com/developer/machine/image/ubuntu-2404 + image: ubuntu-2404:2026.05.1 + resource_class: arm.medium + # Add steps to the job + # See: https://circleci.com/docs/2.0/configuration-reference/#steps + steps: + - checkout + - run: | + uname -a + python3 --version + # fail if not using Python 3 + python3 --version | grep "3\." + + make upload-pkg + + +# Invoke jobs via workflows +# See: https://circleci.com/docs/2.0/configuration-reference/#workflows +workflows: + aarch64-pkg-test: + when: + matches: { pattern: "^.+$", value: << pipeline.git.branch >> } + jobs: + - aarch64-test + + aarch64-pkg-release: + jobs: + - aarch64-build-and-push: + filters: + tags: + only: /^v.+$/ + branches: + ignore: /.*/ diff --git a/Dockerfile b/Dockerfile index 046b608..74206af 100755 --- a/Dockerfile +++ b/Dockerfile @@ -3,12 +3,13 @@ # Licensed under GNU Affero General Public License v3 or later (AGPLv3+) # https://www.gnu.org/licenses/agpl-3.0.html -FROM kiwitcms/kiwi AS buildroot +FROM registry.access.redhat.com/ubi10-minimal AS buildroot -USER 0 -RUN dnf -y install gcc krb5-devel python3.12-devel +RUN microdnf -y install gcc krb5-devel python3.12-devel +ENV PATH=/venv/bin:${PATH} \ + VIRTUAL_ENV=/venv +RUN python3.12 -m venv /venv -USER 1001 COPY ./requirements.txt /Kiwi/requirements.txt RUN pip3 install --no-cache-dir --upgrade pip twine wheel RUN pip3 wheel --no-deps --wheel-dir /Kiwi/dist -r /Kiwi/requirements.txt diff --git a/Makefile b/Makefile index a2c6bc7..7293c65 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,7 @@ build-pkg: rm -rf dist/ docker build --output type=local,dest=dist/ --target pkg-dist . + ls -l dist/ .PHONY: upload-pkg upload-pkg: build-pkg