Can anyone explain why I get the following error : + python unittests.py
python: can't open file 'unittests.py': [Errno 2] No such file or directory
This is my jenkinsfile:
pipeline {
agent any
stages {
stage('prepare') {
steps {
git credentialsId: 'git-cred', url: 'https://github.com/nada809/DockerProject.git'
}
}
stage('Test') {
agent {
docker {
image 'python:3.8-slim-buster'
}
}
steps {
sh 'pip install flask && pip install xmlrunner'
dir("app"){
sh 'python unittests.py'}
}
}
}
}
And this is my project structure:
the unittests file is under app folder.
Thanks in advance.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…