Mohammed Naser | 1de5519 | 2023-04-28 17:13:35 -0400 | [diff] [blame] | 1 | VERSION --use-copy-link 0.7 |
Mohammed Naser | 8613c86 | 2023-04-24 17:26:51 -0400 | [diff] [blame] | 2 | |
Mohammed Naser | 1de5519 | 2023-04-28 17:13:35 -0400 | [diff] [blame] | 3 | build.wheels: |
Mohammed Naser | 7060df8 | 2023-12-29 15:12:17 -0500 | [diff] [blame] | 4 | FROM ./images/builder+image |
Mohammed Naser | 8613c86 | 2023-04-24 17:26:51 -0400 | [diff] [blame] | 5 | COPY pyproject.toml poetry.lock ./ |
Mohammed Naser | 1de5519 | 2023-04-28 17:13:35 -0400 | [diff] [blame] | 6 | ARG --required only |
| 7 | RUN poetry export --only=${only} -f requirements.txt --without-hashes > requirements.txt |
Mohammed Naser | 8613c86 | 2023-04-24 17:26:51 -0400 | [diff] [blame] | 8 | RUN pip wheel -r requirements.txt --wheel-dir=/wheels |
| 9 | SAVE ARTIFACT requirements.txt |
| 10 | SAVE ARTIFACT /wheels |
Mohammed Naser | 1de5519 | 2023-04-28 17:13:35 -0400 | [diff] [blame] | 11 | SAVE IMAGE --cache-hint |
Mohammed Naser | 8613c86 | 2023-04-24 17:26:51 -0400 | [diff] [blame] | 12 | |
Mohammed Naser | 1de5519 | 2023-04-28 17:13:35 -0400 | [diff] [blame] | 13 | build.venv: |
| 14 | ARG --required only |
| 15 | FROM +build.wheels --only ${only} |
Mohammed Naser | 8613c86 | 2023-04-24 17:26:51 -0400 | [diff] [blame] | 16 | RUN python3 -m venv /venv |
| 17 | ENV PATH=/venv/bin:$PATH |
| 18 | RUN pip install -r requirements.txt |
Mohammed Naser | 1de5519 | 2023-04-28 17:13:35 -0400 | [diff] [blame] | 19 | SAVE IMAGE --cache-hint |
| 20 | |
| 21 | build.venv.dev: |
| 22 | FROM +build.venv --only main,dev |
Mohammed Naser | 8613c86 | 2023-04-24 17:26:51 -0400 | [diff] [blame] | 23 | SAVE ARTIFACT /venv |
| 24 | |
Mohammed Naser | 1de5519 | 2023-04-28 17:13:35 -0400 | [diff] [blame] | 25 | build.venv.runtime: |
| 26 | FROM +build.venv --only main |
| 27 | SAVE ARTIFACT /venv |
| 28 | |
| 29 | build.collections: |
| 30 | FROM +build.venv.runtime |
| 31 | COPY charts /src/charts |
| 32 | COPY meta /src/meta |
| 33 | COPY playbooks /src/playbooks |
| 34 | COPY plugins /src/plugins |
| 35 | COPY roles /src/roles |
| 36 | COPY galaxy.yml /src/galaxy.yml |
| 37 | RUN ansible-galaxy collection install --collections-path /usr/share/ansible/collections /src |
| 38 | SAVE ARTIFACT /usr/share/ansible/collections |
| 39 | SAVE IMAGE --cache-hint |
| 40 | |
| 41 | image: |
Mohammed Naser | 7060df8 | 2023-12-29 15:12:17 -0500 | [diff] [blame] | 42 | FROM ./images/base+image |
Mohammed Naser | 1de5519 | 2023-04-28 17:13:35 -0400 | [diff] [blame] | 43 | ENV ANSIBLE_PIPELINING=True |
Mohammed Naser | aa48ddb | 2023-12-30 00:11:22 -0500 | [diff] [blame] | 44 | DO ./images+APT_INSTALL --PACKAGES "rsync openssh-client" |
Mohammed Naser | e720d78 | 2023-07-10 15:57:21 -0400 | [diff] [blame] | 45 | COPY +build.venv.runtime/venv /venv |
| 46 | ENV PATH=/venv/bin:$PATH |
| 47 | COPY +build.collections/ /usr/share/ansible |
Mohammed Naser | 1de5519 | 2023-04-28 17:13:35 -0400 | [diff] [blame] | 48 | ARG tag=latest |
Mohammed Naser | ccc70cc | 2023-04-28 22:20:34 +0000 | [diff] [blame] | 49 | SAVE IMAGE --push ghcr.io/vexxhost/atmosphere:${tag} |
Mohammed Naser | 8613c86 | 2023-04-24 17:26:51 -0400 | [diff] [blame] | 50 | |
Mohammed Naser | 7060df8 | 2023-12-29 15:12:17 -0500 | [diff] [blame] | 51 | images: |
Mohammed Naser | e81021f | 2024-01-01 22:49:30 -0500 | [diff] [blame] | 52 | BUILD ./images/glance+image |
Mohammed Naser | 7060df8 | 2023-12-29 15:12:17 -0500 | [diff] [blame] | 53 | BUILD ./images/cluster-api-provider-openstack+image |
| 54 | |
Mohammed Naser | 8613c86 | 2023-04-24 17:26:51 -0400 | [diff] [blame] | 55 | pin-images: |
Mohammed Naser | 1de5519 | 2023-04-28 17:13:35 -0400 | [diff] [blame] | 56 | FROM +build.venv.dev |
ricolin | b8ab017 | 2023-06-01 15:41:02 +0800 | [diff] [blame] | 57 | COPY roles/defaults/vars/main.yml /defaults.yml |
Mohammed Naser | 8613c86 | 2023-04-24 17:26:51 -0400 | [diff] [blame] | 58 | COPY build/pin-images.py /usr/local/bin/pin-images |
| 59 | RUN /usr/local/bin/pin-images /defaults.yml /pinned.yml |
ricolin | b8ab017 | 2023-06-01 15:41:02 +0800 | [diff] [blame] | 60 | SAVE ARTIFACT /pinned.yml AS LOCAL roles/defaults/vars/main.yml |
Mohammed Naser | d03bba3 | 2023-04-25 12:54:58 +0000 | [diff] [blame] | 61 | |
| 62 | gh: |
| 63 | FROM alpine:3 |
| 64 | RUN apk add --no-cache github-cli |
| 65 | |
| 66 | trigger-image-sync: |
| 67 | FROM +gh |
| 68 | ARG --required project |
| 69 | RUN --secret GITHUB_TOKEN gh workflow run --repo vexxhost/docker-openstack-${project} sync.yml |
Mohammed Naser | 0c42887 | 2023-09-21 12:59:20 +0000 | [diff] [blame] | 70 | |
| 71 | image-sync: |
| 72 | FROM golang:1.19 |
| 73 | ARG --required project |
| 74 | WORKDIR /src |
| 75 | COPY . /src |
| 76 | RUN --secret GITHUB_TOKEN go run ./cmd/atmosphere-ci image repo sync ${project} |