Can't cd to /home/ubuntu/project

Building on the built-in node in workspace /var/lib/jenkins/workspace/Todo-Dev
[Todo-Dev] $ /bin/sh -xe /tmp/

  • cd /home/ubuntu/projects/django-todo
    /tmp/ 2: cd: can’t cd to /home/ubuntu/projects/django-todo
    Build step ‘Execute shell’ marked build as failure
    Finished: FAILURE

Jenkins setup:

The Jenkins controller is running as a user that does not have permission to change directory to “/home/ubuntu/projects/django-todo”. There are many alternatives to solve that specific problem, but the log output hints that you may be just getting started with Jenkins and would benefit from the Jenkins tutorials.

Save your project in a source code repository (like GitHub, Bitbucket, GitLab, or Gitea), then checkout that source code from your Jenkins jobs and build from the copy that Jenkins retrieved from the source code repository. Define a Jenkins agent so that you’re running jobs on a Jenkins agent instead of running them on the Jenkins controller.

The Jenkins tutorials can help you understand how to do those types of things. Since your command line mentions Django, you might try the “Build a Python app with PyInstaller” tutorial