blob: 7dbaa8897a9da9f1221f63796575e1f790ab13c4 [file] [log] [blame]
Mohammed Naser1de55192023-04-28 17:13:35 -04001VERSION --use-copy-link 0.7
Mohammed Naser8613c862023-04-24 17:26:51 -04002
Mohammed Naser1de55192023-04-28 17:13:35 -04003build.wheels:
Mohammed Naser7060df82023-12-29 15:12:17 -05004 FROM ./images/builder+image
Mohammed Naser8613c862023-04-24 17:26:51 -04005 COPY pyproject.toml poetry.lock ./
Mohammed Naser1de55192023-04-28 17:13:35 -04006 ARG --required only
7 RUN poetry export --only=${only} -f requirements.txt --without-hashes > requirements.txt
Mohammed Naser8613c862023-04-24 17:26:51 -04008 RUN pip wheel -r requirements.txt --wheel-dir=/wheels
9 SAVE ARTIFACT requirements.txt
10 SAVE ARTIFACT /wheels
Mohammed Naser1de55192023-04-28 17:13:35 -040011 SAVE IMAGE --cache-hint
Mohammed Naser8613c862023-04-24 17:26:51 -040012
Mohammed Naser1de55192023-04-28 17:13:35 -040013build.venv:
14 ARG --required only
15 FROM +build.wheels --only ${only}
Mohammed Naser8613c862023-04-24 17:26:51 -040016 RUN python3 -m venv /venv
17 ENV PATH=/venv/bin:$PATH
18 RUN pip install -r requirements.txt
Mohammed Naser1de55192023-04-28 17:13:35 -040019 SAVE IMAGE --cache-hint
20
21build.venv.dev:
22 FROM +build.venv --only main,dev
Mohammed Naser8613c862023-04-24 17:26:51 -040023 SAVE ARTIFACT /venv
24
Mohammed Naser1de55192023-04-28 17:13:35 -040025build.venv.runtime:
26 FROM +build.venv --only main
27 SAVE ARTIFACT /venv
28
29build.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
41image:
Michiel Piscaerb19c1cf2024-01-08 22:09:04 +010042 ARG RELEASE=2023.1
43 FROM ./images/cloud-archive-base+image --RELEASE ${RELEASE}
Mohammed Naser1de55192023-04-28 17:13:35 -040044 ENV ANSIBLE_PIPELINING=True
Mohammed Naseraa48ddb2023-12-30 00:11:22 -050045 DO ./images+APT_INSTALL --PACKAGES "rsync openssh-client"
Mohammed Nasere720d782023-07-10 15:57:21 -040046 COPY +build.venv.runtime/venv /venv
47 ENV PATH=/venv/bin:$PATH
48 COPY +build.collections/ /usr/share/ansible
Mohammed Naser1de55192023-04-28 17:13:35 -040049 ARG tag=latest
Mohammed Naserccc70cc2023-04-28 22:20:34 +000050 SAVE IMAGE --push ghcr.io/vexxhost/atmosphere:${tag}
Mohammed Naser8613c862023-04-24 17:26:51 -040051
Mohammed Naser7060df82023-12-29 15:12:17 -050052images:
Mohammed Naser05726e72024-01-02 14:55:33 -050053 BUILD ./images/barbican+image
Mohammed Naser9b9b3e22024-01-02 15:17:43 -050054 BUILD ./images/cinder+image
Mohammed Naser7060df82023-12-29 15:12:17 -050055 BUILD ./images/cluster-api-provider-openstack+image
Mohammed Naser6a31b342024-01-02 15:26:44 -050056 BUILD ./images/designate+image
Mohammed Naser05726e72024-01-02 14:55:33 -050057 BUILD ./images/glance+image
58 BUILD ./images/heat+image
Mohammed Naserc6392302024-01-04 00:43:02 -050059 BUILD ./images/horizon+image
60 BUILD ./images/ironic+image
61 BUILD ./images/keystone+image
62 BUILD ./images/magnum+image
63 BUILD ./images/manila+image
64 BUILD ./images/neutron+image
65 BUILD ./images/nova-ssh+image
66 BUILD ./images/nova+image
Mohammed Naser05726e72024-01-02 14:55:33 -050067 BUILD ./images/octavia+image
68 BUILD ./images/placement+image
Mohammed Nasera7301772024-01-02 15:02:39 -050069 BUILD ./images/senlin+image
Mohammed Naser7060df82023-12-29 15:12:17 -050070
Mohammed Naser8613c862023-04-24 17:26:51 -040071pin-images:
Mohammed Naser1de55192023-04-28 17:13:35 -040072 FROM +build.venv.dev
ricolinb8ab0172023-06-01 15:41:02 +080073 COPY roles/defaults/vars/main.yml /defaults.yml
Mohammed Naser8613c862023-04-24 17:26:51 -040074 COPY build/pin-images.py /usr/local/bin/pin-images
Mohammed Naserc6392302024-01-04 00:43:02 -050075 RUN --no-cache /usr/local/bin/pin-images /defaults.yml /pinned.yml
ricolinb8ab0172023-06-01 15:41:02 +080076 SAVE ARTIFACT /pinned.yml AS LOCAL roles/defaults/vars/main.yml
Mohammed Naserd03bba32023-04-25 12:54:58 +000077
78gh:
79 FROM alpine:3
80 RUN apk add --no-cache github-cli
81
82trigger-image-sync:
83 FROM +gh
84 ARG --required project
85 RUN --secret GITHUB_TOKEN gh workflow run --repo vexxhost/docker-openstack-${project} sync.yml
Mohammed Naser0c428872023-09-21 12:59:20 +000086
87image-sync:
88 FROM golang:1.19
89 ARG --required project
90 WORKDIR /src
91 COPY . /src
92 RUN --secret GITHUB_TOKEN go run ./cmd/atmosphere-ci image repo sync ${project}