Compare commits

...

3 commits

Author SHA1 Message Date
425aaf9dc0 Playbook: fix build and publish ci image
Some checks failed
/ test (push) Successful in 47s
/ build (push) Failing after 1s
2024-12-06 03:35:08 +01:00
c97e3123c9 Playbook: build and publish ci image 2024-12-06 03:34:01 +01:00
a1a499b370 Containers: use public registry
Some checks failed
/ test (push) Failing after 1s
/ build (push) Has been skipped
2024-12-06 03:16:21 +01:00
6 changed files with 33 additions and 15 deletions

View file

@ -1,6 +1,6 @@
# Build: podman build -t code.philo.ydns.eu/philorg/treetrail-backend-base -f Containerfile.base
FROM tiptop:5000/treetrail-backend-deps
FROM code.philo.ydns.eu/philorg/treetrail-backend-deps
ENV PYTHONPATH $UV_PROJECT_ENVIRONMENT/lib/python3.12/site-packages
ARG APP_VERSION=0.0.0

View file

@ -1,6 +1,6 @@
# Build: podman build -t code.philo.ydns.eu/philorg/treetrail-backend-ci -f Containerfile.ci
FROM tiptop:5000/python-ci
FROM code.philo.ydns.eu/philorg/python-ci
COPY ./pyproject.toml ./README.md ./uv.lock /_lock/

View file

@ -1,6 +1,6 @@
# Build: podman build -t code.philo.ydns.eu/philorg/treetrail-backend-deps -f Containerfile.deps
FROM tiptop:5000/trixie_python
FROM code.philo.ydns.eu/philorg/trixie_python
COPY ./pyproject.toml ./README.md ./uv.lock /_lock/

View file

@ -1,5 +1,5 @@
# Build: podman build -t code.philo.ydns.eu/philorg/treetrail-backend-full -f Containerfile.full_copy
FROM localhost/trixie_python
FROM code.philo.ydns.eu/philorg/trixie_python
ENV PYTHONPATH $UV_PROJECT_ENVIRONMENT/lib/python3.12/site-packages
ENV PATH=/app/bin:$PATH

View file

@ -1,6 +1,6 @@
# Build: podman build -t code.philo.ydns.eu/philorg/trixie_python -f Containerfile.trixie_python
FROM debian:trixie-slim
FROM docker.io/library/debian:trixie-slim
RUN <<EOT
apt-get update -qy

View file

@ -4,7 +4,8 @@
vars:
force_rm: false
cache: false
repository: tiptop:5000
repository: code.philo.ydns.eu
organisation: philorg
tasks:
#- name: Read conf
@ -16,9 +17,31 @@
ansible.builtin.debug:
var: force_rm
- name: Get the version from git
command: git describe --dirty --tags
register: version
args:
chdir: "{{ playbook_dir }}"
- name: Build the base CI image
containers.podman.podman_image:
name: treetrail-backend-ci
tag: "{{ version.stdout }}"
state: build
path: "{{ playbook_dir }}"
build:
format: oci
force_rm: "{{ force_rm }}"
cache: "{{ cache }}"
file: Containerfile.ci
push: true
push_args:
dest: "{{ repository }}/{{ organisation }}/treetrail-backend-ci"
- name: Build the base image, only with python dependencies
containers.podman.podman_image:
name: treetrail-backend-deps
tag: "{{ version.stdout }}"
state: build
path: "{{ playbook_dir }}"
build:
@ -28,17 +51,12 @@
file: Containerfile.deps
push: true
push_args:
dest: "{{ repository }}/treetrail-backend-deps"
- name: Get the version from git
command: git describe --dirty --tags
register: version
args:
chdir: "{{ playbook_dir }}"
dest: "{{ repository }}/{{ organisation }}"
- name: Build the backend container image
containers.podman.podman_image:
name: "treetrail-backend:{{ version.stdout }}"
name: treetrail-backend
tag: "{{ version.stdout }}"
state: build
force: true
path: "{{ playbook_dir }}"
@ -50,4 +68,4 @@
extra_args: "--build-arg APP_VERSION={{ version.stdout }}"
push: true
push_args:
dest: "{{ repository }}/treetrail-backend:{{ version.stdout }}"
dest: "{{ repository }}/{{ organisation }}"