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

Allow running exec directly from a Container object

      When you have a running container (via docker.image('foo').run() it's very useful to be able to execute a command directly in the container (eg ansible) and keep with the Jenkinsfile syntax, rather than 'sh' everything

      It should be possible to do something like the following:

      def con = docker.image('myapp').run()
      con.exec('ansible localhost /myapp/yoo.yml')
      sh 'make test'
      con.stop()
      

      Having this functionality then makes handling testing requiring multiple containers much simpler.

          [JENKINS-39746] Allow running exec directly from a Container object

          James Hogarth added a comment -

          I'm raising this separately after it was pointed out reopening tickets makes things tricky to track

          James Hogarth added a comment - I'm raising this separately after it was pointed out reopening tickets makes things tricky to track

          James Hogarth added a comment -

          James Hogarth added a comment - https://github.com/jenkinsci/docker-workflow-plugin/pull/79 is an attempt to provide this

            hogarthj James Hogarth
            hogarthj James Hogarth
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: