blob: 027cb7bf31a0b4b695d09f8bd79d3081f0c16874 [file] [log] [blame]
Mohammed Naser86615772024-06-01 10:02:09 -04001# SPDX-License-Identifier: Apache-2.0
vexxhost-botc2fd4282024-06-26 07:04:25 +02002# Atmosphere-Rebuild-Time: 2024-06-25T13:53:44Z
Mohammed Naserda994232024-04-13 12:34:01 -04003
Mohammed Nasere5b6ff72025-01-15 16:49:44 -05004ARG REGISTRY
Mohammed Naserd30f18d2024-04-17 01:20:43 -04005ARG RELEASE
6
Yaguang Tang0953b612024-12-13 04:14:34 +08007FROM harbor.atmosphere.dev/docker.io/library/golang:1.18 AS octavia-test-server
Mohammed Naserda994232024-04-13 12:34:01 -04008ADD --keep-git-dir=true https://opendev.org/openstack/octavia-tempest-plugin.git#master /src
9RUN GO111MODULE=off CGO_ENABLED=0 GOOS=linux go build \
10 -a -ldflags '-s -w -extldflags -static' \
11 -o /build/test_server.bin \
12 /src/octavia_tempest_plugin/contrib/test_server/test_server.go
13
Mohammed Nasere5b6ff72025-01-15 16:49:44 -050014FROM ${REGISTRY}/openstack-venv-builder:${RELEASE} AS build
Mohammed Naserda994232024-04-13 12:34:01 -040015ARG TEMPEST_GIT_REF=c0da6e843a74c2392c8e87e8ff36d2fea12949c4
16ADD --keep-git-dir=true https://opendev.org/openstack/tempest.git#${TEMPEST_GIT_REF} /src/tempest
17RUN git -C /src/tempest fetch --unshallow
18ADD --keep-git-dir=true https://opendev.org/openstack/barbican-tempest-plugin.git#master /src/barbican-tempest-plugin
19RUN git -C /src/barbican-tempest-plugin fetch --unshallow
20ADD --keep-git-dir=true https://opendev.org/openstack/cinder-tempest-plugin.git#master /src/cinder-tempest-plugin
21RUN git -C /src/cinder-tempest-plugin fetch --unshallow
22ADD --keep-git-dir=true https://opendev.org/openstack/heat-tempest-plugin.git#master /src/heat-tempest-plugin
23RUN git -C /src/heat-tempest-plugin fetch --unshallow
24ADD --keep-git-dir=true https://opendev.org/openstack/keystone-tempest-plugin.git#master /src/keystone-tempest-plugin
25RUN git -C /src/keystone-tempest-plugin fetch --unshallow
26ADD --keep-git-dir=true https://opendev.org/openstack/neutron-tempest-plugin.git#master /src/neutron-tempest-plugin
27RUN git -C /src/neutron-tempest-plugin fetch --unshallow
28ADD --keep-git-dir=true https://opendev.org/openstack/octavia-tempest-plugin.git#master /src/octavia-tempest-plugin
29RUN git -C /src/octavia-tempest-plugin fetch --unshallow
30ADD https://releases.openstack.org/constraints/upper/master /upper-constraints.txt
31RUN --mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private <<EOF bash -xe
32pip3 install \
33 --constraint /upper-constraints.txt \
34 /src/tempest \
35 /src/barbican-tempest-plugin \
36 /src/cinder-tempest-plugin \
37 /src/heat-tempest-plugin \
38 /src/keystone-tempest-plugin \
39 /src/neutron-tempest-plugin \
40 /src/octavia-tempest-plugin
41EOF
42
Mohammed Nasere5b6ff72025-01-15 16:49:44 -050043FROM ${REGISTRY}/openstack-python-runtime:${RELEASE}
Mohammed Naserda994232024-04-13 12:34:01 -040044RUN <<EOF bash -xe
45apt-get update -qq
46apt-get install -qq -y --no-install-recommends \
47 iputils-ping openssh-client
48apt-get clean
49rm -rf /var/lib/apt/lists/*
50EOF
51COPY --from=octavia-test-server --link /build/test_server.bin /opt/octavia-tempest-plugin/test_server.bin
52COPY --from=build --link /var/lib/openstack /var/lib/openstack