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

Allow running exec directly from a Container object

XMLWordPrintable

      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.

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

              Created:
              Updated: