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

Gradle-Artifactory --init-script switch persisted if configuring while job is runnning

      I have a job configured with Gradle-Artifactory Integration. If I modify the configuration of this job while a build is running the temporary --init-script argument that the plugin adds gets persisted in my configuration, which breaks subsequent builds because they get executed like this:

      gradle --init-script /tmp/init-artifactory3964670982689206905gradle --init-script /tmp/init-artifactory7422301055349082489gradle clean compile artifactoryPublish
      

      The build then fails with:

      FAILURE: Build failed with an exception.
      
      * Where:
      Initialization script '/tmp/init-artifactory7422301055349082489gradle' line: 19
      
      * What went wrong:
      Failed to notify build listener.
      > Failed to notify build listener.
         > Cannot cast object 'org.jfrog.gradle.plugin.artifactory.dsl.ArtifactoryPluginConvention@df9f4c3' with class 'org.jfrog.gradle.plugin.artifactory.dsl.ArtifactoryPluginConvention' to class 'org.jfrog.gradle.plugin.artifactory.dsl.ArtifactoryPluginConvention'
      

      The easy work-around is to stop and disable the job before modifying its configuration or just remember to remove the extra arguments before you save your config modifications.

          [JENKINS-16603] Gradle-Artifactory --init-script switch persisted if configuring while job is runnning

            eyalbe Eyal Ben Moshe
            nathanvsnap Nathan Levesque
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: