From 5f6d6c3b706ffb1cc20d5d589d82c74de980542d Mon Sep 17 00:00:00 2001 From: darkdragon-001 Date: Fri, 22 May 2020 08:10:07 +0200 Subject: [PATCH] Facilitate selective running of single CI stages (#9663) Pass '--target core' to docker build in order to only test core. Pass '--target frontend' to docker build in order to only test frontend. Pass '--target gateway' to docker build in order to only test gateway. Numerical references might be supported in the future: https://github.com/moby/buildkit/issues/1503 --- Dockerfile.simpleci | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile.simpleci b/Dockerfile.simpleci index c1a8245ce..de3b4f0f6 100644 --- a/Dockerfile.simpleci +++ b/Dockerfile.simpleci @@ -1,7 +1,7 @@ #------------------------------------------------------------- -# Stage 1: Build and Unit tests +# Stage 0: Build and Unit tests #------------------------------------------------------------- -FROM golang:1.13 +FROM golang:1.13 AS core COPY . /go/src/github.com/minio/minio WORKDIR /go/src/github.com/minio/minio @@ -42,9 +42,9 @@ RUN make verify RUN make verify-healing #------------------------------------------------------------- -# Stage 2: Test Frontend +# Stage 1: Test Frontend #------------------------------------------------------------- -FROM node:10.15-stretch-slim +FROM node:10.15-stretch-slim AS frontend ENV SIMPLE_CI 1 @@ -55,9 +55,9 @@ RUN yarn RUN yarn test #------------------------------------------------------------- -# Stage 3: Run Gateway Tests +# Stage 2: Run Gateway Tests #------------------------------------------------------------- -FROM ubuntu:18.04 +FROM ubuntu:18.04 AS gateway COPY --from=0 /go/src/github.com/minio/minio/minio /usr/bin/minio COPY buildscripts/gateway-tests.sh /usr/bin/gateway-tests.sh