feat(conformance): containerize KFP conformance test. (#7738)
* feat(conformance): containerize KFP conformance test. * Address code review comments. * Address code review comments. * Address code review comments. * Addressed code review comments.
This commit is contained in:
parent
e38df3a8cd
commit
3867496983
|
|
@ -0,0 +1,43 @@
|
|||
# Copyright 2022 The Kubeflow Authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Dockerfile for building the source code of conformance tests
|
||||
FROM golang:1.17.6-alpine3.15 as builder
|
||||
|
||||
RUN apk update && apk upgrade && \
|
||||
apk add --no-cache bash git openssh gcc musl-dev
|
||||
|
||||
WORKDIR /go/src/github.com/kubeflow/pipelines
|
||||
COPY . .
|
||||
|
||||
# Compile the test
|
||||
RUN GO111MODULE=on go test -c -o /test/integration/api-test backend/test/integration/*.go
|
||||
# Add test resources
|
||||
ADD backend/test/resources /test/resources
|
||||
|
||||
# Add test script.
|
||||
COPY backend/conformance/run.sh /test/integration
|
||||
RUN chmod +x /test/integration/run.sh
|
||||
|
||||
# Create a tar ball for all the test assets, to be copied into the final image.
|
||||
RUN tar -czvf /test.tar.gz /test
|
||||
|
||||
|
||||
FROM alpine:3.8
|
||||
|
||||
COPY --from=builder /test.tar.gz /
|
||||
RUN tar -xzvf /test.tar.gz
|
||||
WORKDIR /test/integration
|
||||
|
||||
ENTRYPOINT [ "./run.sh" ]
|
||||
|
|
@ -58,3 +58,11 @@ need to be regenerated and checked-in. Refer to [backend/api](./api/README.md) f
|
|||
dependencies. To update dependencies, edit [requirements.in](requirements.in)
|
||||
and run `./update_requirements.sh` to update and pin the transitive
|
||||
dependencies.
|
||||
|
||||
|
||||
## Building conformance tests (WIP)
|
||||
|
||||
Run
|
||||
```
|
||||
docker build . -f backend/Dockerfile.conformance -t <tag>
|
||||
```
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Run conformance test and generate test report.
|
||||
./api-test \
|
||||
-namespace kubeflow \
|
||||
-runIntegrationTests=true \
|
||||
-isKubeflowMode=true \
|
||||
-resourceNamespace=kf-conformance \
|
||||
-test.v \
|
||||
${ADDITIONAL_FLAGS} \
|
||||
2>&1 | tee /tmp/kfp-conformance.log
|
||||
|
||||
# Create the done file.
|
||||
touch /tmp/kfp-conformance.done
|
||||
|
||||
echo "Done..."
|
||||
# Keep the container running so the test logs can be downloaded.
|
||||
while true; do sleep 10000; done
|
||||
Loading…
Reference in New Issue