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
This commit is contained in:
darkdragon-001 2020-05-22 08:10:07 +02:00 committed by GitHub
parent d15042470e
commit 5f6d6c3b70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -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