Guest User

Untitled

a guest
Dec 18th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.04 KB | None | 0 0
  1. FROM python:2
  2. WORKDIR /usr/src/app
  3. ENV NLTK_DATA /usr/src/app/nltk_data
  4. COPY . ./
  5. RUN pip install --no-cache-dir .
  6. RUN python -m nltk.downloader -d $NLTK_DATA punkt stopwords
  7. RUN pip install --no-cache-dir pytest
  8.  
  9. node {
  10. stage('Run Unit Tests') {
  11. if (env.BRANCH_NAME == 'master') {
  12. unitTest()
  13. }
  14. if (env.BRANCH_NAME == 'develop') {
  15. unitTest()
  16. }
  17. }
  18. }
  19. def unitTest() {
  20. checkout scm
  21. def sdkImage = docker.build("testimg:${env.BUILD_ID}")
  22. sdkImage.inside {
  23. sh 'pytest'
  24. }
  25. }
  26.  
  27. [platform-sdk_jenkins-new-OZS4ZK4TTC2Y2TSIVNRUMYUQBZI6VGBJZHRED4FUDV7ZCYUFQRAQ] Running shell script
  28. + pytest
  29.  
  30. ============================= test session starts ==============================
  31. platform linux2 -- Python 2.7.14, pytest-3.3.1, py-1.5.2, pluggy-0.6.0
  32. rootdir: /var/lib/jenkins/workspace/platform-sdk_jenkins-new-OZS4ZK4TTC2Y2TSIVNRUMYUQBZI6VGBJZHRED4FUDV7ZCYUFQRAQ, inifile:
  33. collected 27 items / 1 errors
  34.  
  35. ==================================== ERRORS ====================================
  36. ____________________ ERROR collecting tests/test_finder.py _____________________
  37. ImportError while importing test module '/var/lib/jenkins/workspace/platform-sdk_jenkins-new-OZS4ZK4TTC2Y2TSIVNRUMYUQBZI6VGBJZHRED4FUDV7ZCYUFQRAQ/tests/test_finder.py'.
  38. Hint: make sure your test modules/packages have valid Python names.
  39. Traceback:
  40. tests/test_finder.py:1: in <module>
  41. from stridesdk import Doc, finder
  42. /usr/local/lib/python2.7/site-packages/pyximport/pyximport.py:458: in load_module
  43. language_level=self.language_level)
  44. /usr/local/lib/python2.7/site-packages/pyximport/pyximport.py:233: in load_module
  45. exec("raise exc, None, tb", {'exc': exc, 'tb': tb})
  46. /usr/local/lib/python2.7/site-packages/pyximport/pyximport.py:215: in load_module
  47. inplace=build_inplace, language_level=language_level)
  48. /usr/local/lib/python2.7/site-packages/pyximport/pyximport.py:191: in build_module
  49. reload_support=pyxargs.reload_support)
  50. /usr/local/lib/python2.7/site-packages/pyximport/pyxbuild.py:102: in pyx_to_dll
  51. dist.run_commands()
  52. /usr/local/lib/python2.7/distutils/dist.py:953: in run_commands
  53. self.run_command(cmd)
  54. /usr/local/lib/python2.7/distutils/dist.py:972: in run_command
  55. cmd_obj.run()
  56. /usr/local/lib/python2.7/site-packages/Cython/Distutils/old_build_ext.py:186: in run
  57. _build_ext.build_ext.run(self)
  58. /usr/local/lib/python2.7/distutils/command/build_ext.py:340: in run
  59. self.build_extensions()
  60. /usr/local/lib/python2.7/site-packages/Cython/Distutils/old_build_ext.py:193: in build_extensions
  61. ext.sources = self.cython_sources(ext.sources, ext)
  62. /usr/local/lib/python2.7/site-packages/Cython/Distutils/old_build_ext.py:328: in cython_sources
  63. self.mkpath(os.path.dirname(target))
  64. /usr/local/lib/python2.7/distutils/cmd.py:352: in mkpath
  65. dir_util.mkpath(name, mode, dry_run=self.dry_run)
  66. /usr/local/lib/python2.7/distutils/dir_util.py:76: in mkpath
  67. "could not create '%s': %s" % (head, exc.args[-1]))
  68. E ImportError: Building module stridesdk.finder failed: ["DistutilsFileError: could not create '/.pyxbld': Permission deniedn"]
Add Comment
Please, Sign In to add comment