Advertisement
Guest User

Untitled

a guest
Feb 17th, 2020
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. export CONTAINER_NAME=$(uuidgen)
  2.  
  3. # Rebuild the image if needed
  4. docker build -t "${IMAGE_NAME}:latest" ./
  5.  
  6. # Make sure the script is killed after 1h
  7. (sleep 3600; docker stop "${CONTAINER_NAME}")&
  8.  
  9. # Run tests
  10. docker run --rm \
  11. --name "$CONTAINER_NAME" \
  12. -e TARGET_ENV="${TARGET_ENV}" \
  13. -e DATA_RETENTION="${DATA_RETENTION}" \
  14. -e REPORT_NAME="${REPORT_NAME}" \
  15. -e CUCUMBER_TAGS="${CUCUMBER_TAGS}" \
  16. -e CUCUMBER_THREADS="25" \
  17. -e JENKINS_USER="$(id -u):$(id -g)" \
  18. -v "$PWD:/srv/test-factory" \
  19. -v "/srv/test-factory/node_modules/" \
  20. -v "/home/ubuntu/chromedriver/chromedriver-${CHROMEDRIVER_VERSION}:/chrome/chromedriver" \
  21. -v "/home/ubuntu/chrome/google-chrome-${CHROME_VERSION}_amd64.deb:/chrome/google-chrome.deb" \
  22. -v "/home/ubuntu/CFGV3-TF-Cache/CFGV3-TF-Docker:/srv/test-factory/cache" \
  23. -v "$PWD/cache/country:/srv/test-factory/cache/country" \
  24. "${IMAGE_NAME}:latest"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement