Details

    • Similar Issues:

      Description

      I would like to configure influxdb server endpoint from groovy scripts on top of beeing able to do it from the UI

      Details:

      I would like to put a groovy script in init.groovy.d and load it at jenkins startup in order to configure influxdb target.

      example:

      import jenkinsci.plugins.influxdb.models.Target

      def influxdb = Jenkins.instance.getDescriptorByType(jenkinsci.plugins.influxdb.DescriptorImpl)

      def target = new Target()
      target.description = 'mydb'
      target.url = 'http://10.10.10.10:8086'
      target.username = 'admin'
      target.password = 'admin'
      target.database = 'db0'

      influxdb.targets = [ target ]

      influxdb.save()

      There are no method setTargets at this time https://github.com/jenkinsci/influxdb-plugin/blob/master/src/main/java/jenkinsci/plugins/influxdb/DescriptorImpl.java

       

        Attachments

          Activity

          Hide
          zougi Frederic Rousseau added a comment -
          Show
          zougi Frederic Rousseau added a comment - I submitted PR https://github.com/jenkinsci/influxdb-plugin/pull/31  
          Hide
          zougi Frederic Rousseau added a comment -

          I created PR on branch dev as asked: https://github.com/jenkinsci/influxdb-plugin/pull/35

           

          Show
          zougi Frederic Rousseau added a comment - I created PR on branch dev as asked: https://github.com/jenkinsci/influxdb-plugin/pull/35  
          Hide
          zougi Frederic Rousseau added a comment - - edited

          Issue is not resolved! why was this closed!? It's been 21 days PR https://github.com/jenkinsci/influxdb-plugin/pull/35 is waiting to be merged

          Show
          zougi Frederic Rousseau added a comment - - edited Issue is not resolved! why was this closed!? It's been 21 days PR https://github.com/jenkinsci/influxdb-plugin/pull/35  is waiting to be merged
          Hide
          aleksisimell Aleksi Simell added a comment -

          Frederic Rousseau It was resolved 2 days ago by now an inactive user (so probably a bot). Thanks for reopening the issue.

          As to the speed of merging the PR. I know it's been a few weeks already without any progress and I apologize for that. I've been extremely busy the last few months, but now the project I work on went on hold for the Summer, so now I should have more time to look into the open issues and PRs.

          Show
          aleksisimell Aleksi Simell added a comment - Frederic Rousseau It was resolved 2 days ago by now an inactive user (so probably a bot). Thanks for reopening the issue. As to the speed of merging the PR. I know it's been a few weeks already without any progress and I apologize for that. I've been extremely busy the last few months, but now the project I work on went on hold for the Summer, so now I should have more time to look into the open issues and PRs.
          Show
          scoheb Scott Hebert added a comment - I created https://github.com/jenkinsci/influxdb-plugin/pull/44  to address the concerns of PR   https://github.com/jenkinsci/influxdb-plugin/pull/35
          Hide
          aleksisimell Aleksi Simell added a comment -

          This feature is implemented by Pull requests 35 and 46.

          Show
          aleksisimell Aleksi Simell added a comment - This feature is implemented by Pull requests 35 and 46.

            People

            • Assignee:
              aleksisimell Aleksi Simell
              Reporter:
              zougi Frederic Rousseau
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: