blob: 7b71fc0de8eadcef75d461cf165e3d50d4c5d4c1 [file] [log] [blame]
Mohammed Naserd28fbaf2024-04-08 17:15:00 -04001# Copyright (c) 2024 VEXXHOST, Inc.
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may
4# not use this file except in compliance with the License. You may obtain
5# a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations
13# under the License.
14
Mohammed Naser19c6c8a2024-04-18 01:47:10 -040015ARG RELEASE
16
Mohammed Naserd28fbaf2024-04-08 17:15:00 -040017FROM golang:1.18 AS octavia-test-server
18ADD --keep-git-dir=true https://opendev.org/openstack/octavia-tempest-plugin.git#master /src
19RUN GO111MODULE=off CGO_ENABLED=0 GOOS=linux go build \
20 -a -ldflags '-s -w -extldflags -static' \
21 -o /build/test_server.bin \
22 /src/octavia_tempest_plugin/contrib/test_server/test_server.go
23
Mohammed Naser19c6c8a2024-04-18 01:47:10 -040024FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
Mohammed Naserd28fbaf2024-04-08 17:15:00 -040025ARG TEMPEST_GIT_REF=aeb9b13e930841c87b826d3ba917b224095f1d81
26ADD --keep-git-dir=true https://opendev.org/openstack/tempest.git#${TEMPEST_GIT_REF} /src/tempest
27RUN git -C /src/tempest fetch --unshallow
28ADD --keep-git-dir=true https://opendev.org/openstack/barbican-tempest-plugin.git#master /src/barbican-tempest-plugin
29RUN git -C /src/barbican-tempest-plugin fetch --unshallow
30ADD --keep-git-dir=true https://opendev.org/openstack/cinder-tempest-plugin.git#master /src/cinder-tempest-plugin
31RUN git -C /src/cinder-tempest-plugin fetch --unshallow
32ADD --keep-git-dir=true https://opendev.org/openstack/heat-tempest-plugin.git#master /src/heat-tempest-plugin
33RUN git -C /src/heat-tempest-plugin fetch --unshallow
34ADD --keep-git-dir=true https://opendev.org/openstack/keystone-tempest-plugin.git#master /src/keystone-tempest-plugin
35RUN git -C /src/keystone-tempest-plugin fetch --unshallow
36ADD --keep-git-dir=true https://opendev.org/openstack/neutron-tempest-plugin.git#master /src/neutron-tempest-plugin
37RUN git -C /src/neutron-tempest-plugin fetch --unshallow
38ADD --keep-git-dir=true https://opendev.org/openstack/octavia-tempest-plugin.git#master /src/octavia-tempest-plugin
39RUN git -C /src/octavia-tempest-plugin fetch --unshallow
40ADD https://releases.openstack.org/constraints/upper/master /upper-constraints.txt
41RUN --mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private <<EOF bash -xe
42pip3 install \
43 --constraint /upper-constraints.txt \
44 /src/tempest \
45 /src/barbican-tempest-plugin \
46 /src/cinder-tempest-plugin \
47 /src/heat-tempest-plugin \
48 /src/keystone-tempest-plugin \
49 /src/neutron-tempest-plugin \
50 /src/octavia-tempest-plugin
51EOF
52
Mohammed Naser19c6c8a2024-04-18 01:47:10 -040053FROM registry.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
Mohammed Naserd28fbaf2024-04-08 17:15:00 -040054RUN <<EOF bash -xe
55apt-get update -qq
56apt-get install -qq -y --no-install-recommends \
57 iputils-ping openssh-client
58apt-get clean
59rm -rf /var/lib/apt/lists/*
60EOF
61COPY --from=octavia-test-server --link /build/test_server.bin /opt/octavia-tempest-plugin/test_server.bin
62COPY --from=build --link /var/lib/openstack /var/lib/openstack