blob: df820ed35bf63c9a972abdba5a9667b7eea07898 [file] [log] [blame]
Mohammed Naser12207172024-02-05 18:49:35 -05001VERSION --use-copy-link --try 0.8
2
Mohammed Naser12207172024-02-05 18:49:35 -05003unit.go:
4 FROM golang:1.21
5 RUN go install github.com/jstemmer/go-junit-report/v2@latest
6 COPY --dir go.mod go.sum /src
7 WORKDIR /src
8 RUN go mod download
9 COPY --dir charts/ cmd/ internal/ roles/ tools/ /src
10 TRY
11 RUN go test -v 2>&1 ./... | go-junit-report -set-exit-code > junit-go.xml
12 FINALLY
13 SAVE ARTIFACT /src/junit-go.xml AS LOCAL junit-go.xml
14 END
15
vexxhost-bot134680a2024-07-19 04:30:48 +020016build.venv.runtime:
Mohammed Naserda994232024-04-13 12:34:01 -040017 FROM ubuntu:jammy
vexxhost-bot134680a2024-07-19 04:30:48 +020018 RUN \
19 apt-get update -qq
Mohammed Naserda994232024-04-13 12:34:01 -040020 RUN \
21 apt-get install -qq -y --no-install-recommends \
22 build-essential git python3-dev python3-pip python3-venv
vexxhost-bot134680a2024-07-19 04:30:48 +020023 COPY requirements.txt ./
Mohammed Naser8613c862023-04-24 17:26:51 -040024 RUN python3 -m venv /venv
25 ENV PATH=/venv/bin:$PATH
26 RUN pip install -r requirements.txt
Mohammed Naser1de55192023-04-28 17:13:35 -040027 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:
Mohammed Naserda994232024-04-13 12:34:01 -040042 FROM ubuntu:jammy
Mohammed Naser1de55192023-04-28 17:13:35 -040043 ENV ANSIBLE_PIPELINING=True
Mohammed Naserda994232024-04-13 12:34:01 -040044 RUN \
45 apt-get update -qq && \
46 apt-get install -qq -y --no-install-recommends \
Mohammed Naser171a7572024-06-25 13:59:04 -040047 python3 rsync openssh-client && \
Mohammed Naserda994232024-04-13 12:34:01 -040048 apt-get clean && \
49 rm -rf /var/lib/apt/lists/*
Mohammed Nasere720d782023-07-10 15:57:21 -040050 COPY +build.venv.runtime/venv /venv
51 ENV PATH=/venv/bin:$PATH
52 COPY +build.collections/ /usr/share/ansible
Mohammed Naser1de55192023-04-28 17:13:35 -040053 ARG tag=latest
Mohammed Naser1dfea6b2024-02-09 01:04:26 -050054 ARG REGISTRY=ghcr.io/vexxhost/atmosphere
Mohammed Naser12207172024-02-05 18:49:35 -050055 SAVE IMAGE --push ${REGISTRY}:${tag}