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

New Relic Deployment Notifier Plugin doesn't work properly with Pipeline Syntax Jobs

XMLWordPrintable

      I am experiencing issues with the plugin.
      The version which is available via Jenkins UI and the latest official release on github is 1.8. This version doesn't support pipeline syntax at all and works only as a freestyle job, the one that you create via UI.
      In the documentation https://docs.newrelic.com/docs/change-tracking/ci-cd/change-tracking-jenkins/ there is a link to the newer release 1.9-SNAPSHOT (private-b86594b0-justinlewis) which supports pipeline syntax. However, I cannot make it working.
      I always get

      17:49:56  Retrying calling New Relic API...
      17:49:56  Retrying calling New Relic API...
      17:49:56  Unable to reach New Relic to record the Deployment Id
      

      Through the freestyle job I was able to send the notification, that means the API key works, but through the Jenkinsfile something is not right.
      In the documentation is said that there are two options GraphQL API and REST API.
      The first method requires entityGuid the second one applicationId. I tried both and every time the result is the same.

      Lastly I ran the job with the same variables as I got from the xml that freestyle job uses, but no changes, the same error.

          <org.jenkinsci.plugins.newrelicnotifier.NewRelicDeploymentNotifier plugin="newrelic-deployment-notifier@1.9-SNAPSHOT">
            <notifications>
              <org.jenkinsci.plugins.newrelicnotifier.DeploymentNotificationBean>
                <apiKey>newrelic-api-key</apiKey>
                <applicationId>1500322002</applicationId>
                <description>Test</description>
                <revision>152dabdd6b2</revision>
                <changelog></changelog>
                <commit>152dabdd6b2</commit>
                <deeplink></deeplink>
                <user></user>
                <entityGuid></entityGuid>
                <deploymentId></deploymentId>
                <deploymentType>BASIC</deploymentType>
                <groupId></groupId>
                <timestamp></timestamp>
                <version>4.256.0.RC03</version>
                <european>false</european>
              </org.jenkinsci.plugins.newrelicnotifier.DeploymentNotificationBean>
            </notifications>
          </org.jenkinsci.plugins.newrelicnotifier.NewRelicDeploymentNotifier>
      

       

            step([$class: 'NewRelicDeploymentNotifier', notifications: [[
              apiKey: 'newrelic-api-key',
              applicationId: '1500322002',
              description: 'Deployment',
              revision: '152dabdd6b2',
              changelog: '',
              commit: '152dabdd6b2',
              deeplink: '',
              user: '',
              entityGuid: '',
              deploymentId: '',
              deploymentType: 'BASIC',
              groupId: '',
              timestamp: '',
              version: '4.256.0.RC03',
              european: false
            ]]])
      

      I am assuming that the plugin might contain a bug, this is the first version with the pipeline syntax support. There is no source code for this version on github, the plugins are compiled jar packages, therefore I cannot look into code and check what is going on

            mmchr Mads Mohr Christensen
            tsurankov tsurankov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: