Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-40625

Handling virtualenv and nodeenv in jenkins pipeline plugin

      Hi ,

      I will be great if you could help me with the below request.

      How I should define "withEnv " variable in jenkins pipeline for activativating "virtualenv" and "nodeenv" in "jenkinsfile"?

      Please note that I have installed virtualenv and nodeenv as a local user on CentOs. Also I have attached the build logs with this request for your reference.

      Thanks in advance

          [JENKINS-40625] Handling virtualenv and nodeenv in jenkins pipeline plugin

          Oleg Nenashev added a comment -

          Please ask in Jenkins User mailing list or in the IRC chat. Jenkins JIRA is a bugtracker, not a helpdesk

          Oleg Nenashev added a comment - Please ask in Jenkins User mailing list or in the IRC chat. Jenkins JIRA is a bugtracker, not a helpdesk

          Sorin Sbarnea added a comment -

          oleg_nenashev, I think that the user noted a real issue with the pipelines, one that we are ware about. Because this is a very common use case I think Jenkins should provide clear clear documentation about it.

          Reactivating the venv on each sh line is insane, hard to maintain and likely to break. We need to find a nice and clean solution for this, one that benefits from the power of DSL.

          Sorin Sbarnea added a comment - oleg_nenashev , I think that the user noted a real issue with the pipelines, one that we are ware about. Because this is a very common use case I think Jenkins should provide clear clear documentation about it. Reactivating the venv on each sh line is insane, hard to maintain and likely to break. We need to find a nice and clean solution for this, one that benefits from the power of DSL.

          Oleg Nenashev added a comment -

          ssbarnea reopened the issue. Please update the description by your expectations regarding the Pipeline docs

          Oleg Nenashev added a comment - ssbarnea reopened the issue. Please update the description by your expectations regarding the Pipeline docs

          Andrew Bayer added a comment -

          ssbarnea - you can do something like

          sh("""
          virtualenv ...
          python somethingOrOther.py
          python someOtherCommand.py
          // etc
          """)
          

          Andrew Bayer added a comment - ssbarnea - you can do something like sh(""" virtualenv ... python somethingOrOther.py python someOtherCommand.py // etc """)

            ssbarnea Sorin Sbarnea
            bharath8593 bharath kumar
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: