Dockerfile 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # Copyright 2016 The Kubernetes Authors.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. FROM BASEIMAGE
  15. COPY ginkgo /usr/local/bin/
  16. COPY e2e_node.test /usr/local/bin
  17. # This is a placeholder that will be substituted in the Makefile.
  18. COPY_SYSTEM_SPEC_FILE
  19. # The following environment variables can be override when starting the container.
  20. # FOCUS is regex matching test to run. By default run all conformance test.
  21. # SKIP is regex matching test to skip. By default skip flaky and serial test.
  22. # PARALLELISM is the number of processes the test will run in parallel.
  23. # REPORT_PATH is the path in the container to save test result and logs.
  24. # FLAKE_ATTEMPTS is the time to retry when there is a test failure. By default 2.
  25. # TEST_ARGS is the test arguments passed into the test.
  26. # EXTRA_ENVS is the extra environment variables needed for node e2e tests.
  27. ENV FOCUS="\[Conformance\]" \
  28. SKIP="\[Flaky\]|\[Serial\]" \
  29. PARALLELISM=8 \
  30. REPORT_PATH="/var/result" \
  31. FLAKE_ATTEMPTS=2 \
  32. TEST_ARGS="" \
  33. EXTRA_ENVS=""
  34. ENTRYPOINT ginkgo --focus="$FOCUS" \
  35. --skip="$SKIP" \
  36. --nodes=$PARALLELISM \
  37. --flakeAttempts=$FLAKE_ATTEMPTS \
  38. /usr/local/bin/e2e_node.test \
  39. -- --conformance=true \
  40. --prepull-images=false \
  41. --report-dir="$REPORT_PATH" \
  42. # This is a placeholder that will be substituted in the Makefile.
  43. --system-spec-name=SYSTEM_SPEC_NAME \
  44. # This is a placeholder that will be substituted in the Makefile.
  45. --system-spec-file=SYSTEM_SPEC_FILE_PATH \
  46. --extra-envs=$EXTRA_ENVS \
  47. $TEST_ARGS