Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FROM python:2
- WORKDIR /usr/src/app
- ENV NLTK_DATA /usr/src/app/nltk_data
- COPY . ./
- RUN pip install --no-cache-dir .
- RUN python -m nltk.downloader -d $NLTK_DATA punkt stopwords
- RUN pip install --no-cache-dir pytest
- node {
- stage('Run Unit Tests') {
- if (env.BRANCH_NAME == 'master') {
- unitTest()
- }
- if (env.BRANCH_NAME == 'develop') {
- unitTest()
- }
- }
- }
- def unitTest() {
- checkout scm
- def sdkImage = docker.build("testimg:${env.BUILD_ID}")
- sdkImage.inside {
- sh 'pytest'
- }
- }
- [platform-sdk_jenkins-new-OZS4ZK4TTC2Y2TSIVNRUMYUQBZI6VGBJZHRED4FUDV7ZCYUFQRAQ] Running shell script
- + pytest
- ============================= test session starts ==============================
- platform linux2 -- Python 2.7.14, pytest-3.3.1, py-1.5.2, pluggy-0.6.0
- rootdir: /var/lib/jenkins/workspace/platform-sdk_jenkins-new-OZS4ZK4TTC2Y2TSIVNRUMYUQBZI6VGBJZHRED4FUDV7ZCYUFQRAQ, inifile:
- collected 27 items / 1 errors
- ==================================== ERRORS ====================================
- ____________________ ERROR collecting tests/test_finder.py _____________________
- ImportError while importing test module '/var/lib/jenkins/workspace/platform-sdk_jenkins-new-OZS4ZK4TTC2Y2TSIVNRUMYUQBZI6VGBJZHRED4FUDV7ZCYUFQRAQ/tests/test_finder.py'.
- Hint: make sure your test modules/packages have valid Python names.
- Traceback:
- tests/test_finder.py:1: in <module>
- from stridesdk import Doc, finder
- /usr/local/lib/python2.7/site-packages/pyximport/pyximport.py:458: in load_module
- language_level=self.language_level)
- /usr/local/lib/python2.7/site-packages/pyximport/pyximport.py:233: in load_module
- exec("raise exc, None, tb", {'exc': exc, 'tb': tb})
- /usr/local/lib/python2.7/site-packages/pyximport/pyximport.py:215: in load_module
- inplace=build_inplace, language_level=language_level)
- /usr/local/lib/python2.7/site-packages/pyximport/pyximport.py:191: in build_module
- reload_support=pyxargs.reload_support)
- /usr/local/lib/python2.7/site-packages/pyximport/pyxbuild.py:102: in pyx_to_dll
- dist.run_commands()
- /usr/local/lib/python2.7/distutils/dist.py:953: in run_commands
- self.run_command(cmd)
- /usr/local/lib/python2.7/distutils/dist.py:972: in run_command
- cmd_obj.run()
- /usr/local/lib/python2.7/site-packages/Cython/Distutils/old_build_ext.py:186: in run
- _build_ext.build_ext.run(self)
- /usr/local/lib/python2.7/distutils/command/build_ext.py:340: in run
- self.build_extensions()
- /usr/local/lib/python2.7/site-packages/Cython/Distutils/old_build_ext.py:193: in build_extensions
- ext.sources = self.cython_sources(ext.sources, ext)
- /usr/local/lib/python2.7/site-packages/Cython/Distutils/old_build_ext.py:328: in cython_sources
- self.mkpath(os.path.dirname(target))
- /usr/local/lib/python2.7/distutils/cmd.py:352: in mkpath
- dir_util.mkpath(name, mode, dry_run=self.dry_run)
- /usr/local/lib/python2.7/distutils/dir_util.py:76: in mkpath
- "could not create '%s': %s" % (head, exc.args[-1]))
- E ImportError: Building module stridesdk.finder failed: ["DistutilsFileError: could not create '/.pyxbld': Permission deniedn"]
Add Comment
Please, Sign In to add comment