12
12
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
13
# See the License for the specific language governing permissions and
14
14
# limitations under the License.
15
+ FROM registry.access.redhat.com/ubi8/go-toolset:1.21.13-1.1727869850 AS builder
16
+ ARG LIBRARY_REPO="https://github.com/devfile/registry-support"
17
+ ARG LIBRARY_REF="main"
18
+ USER root
19
+ WORKDIR /registry-test
20
+
21
+ COPY . .
22
+
23
+ # Fetch library repository
24
+ RUN git clone ${LIBRARY_REPO} -b ${LIBRARY_REF} /registry-support
25
+
26
+ # Build the registry library and add to builder path
27
+ RUN cd /registry-support/registry-library && ./build.sh && cp /registry-support/registry-library/registry-library /usr/local/bin/registry-library
28
+
29
+ # Build the test binary
30
+ RUN /registry-test/build.sh
31
+
15
32
FROM registry.access.redhat.com/ubi8/ubi-minimal AS license
16
33
ARG LICENSE_REPO="devfile/registry-support"
17
34
ARG LICENSE_REF="main"
@@ -21,17 +38,15 @@ USER root
21
38
RUN mkdir -p /licenses
22
39
RUN curl -sL https://raw.githubusercontent.com/${LICENSE_REPO}/refs/heads/${LICENSE_REF}/LICENSE -o /licenses/LICENSE
23
40
24
- FROM registry.access.redhat.com/ubi8/go-toolset:1.21.13-1.1727869850
41
+ FROM registry.access.redhat.com/ubi8/ubi-minimal
25
42
USER root
26
43
WORKDIR /registry-test
27
44
28
- COPY . .
45
+ # Add registry library to runner path
46
+ COPY --from=builder /usr/local/bin/registry-library /usr/local/bin/registry-library
29
47
30
- # Build the registry library and add to path
31
- RUN cd /registry-test/registry-library && ./build.sh && cp /registry-test/registry-library/registry-library /usr/local/bin/registry-library
32
-
33
- # Build the test binary
34
- RUN /registry-test/build.sh
48
+ # Add test binary to working directory of runner
49
+ COPY --from=builder /registry-test/devfile-registry-integration /registry-test/devfile-registry-integration
35
50
36
51
# Add license
37
52
RUN mkdir -p /licenses
0 commit comments