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

Docker template environment variables forgotten when saving config

    Details

    • Type: Task
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: docker-plugin
    • Labels:
      None
    • Environment:
      docker-plugin 1.0.4 & 1.1
      Jenkins 2.73.2 & 2.73.3
    • Similar Issues:

      Description

      To reproduce:

      1. Visit /configure
      2. Add a Docker Cloud
      3. Add a Docker Agent Template
      4. Under "Node Properties", choose "Environment variables"
      5. Create an environment variable
      6. Press "Apply" to save the config
      7. Reload the page
      8. Navigate to the Docker Agent Template
      9. See that the environment variable defined has disappeared

      Expected:

      The environment variable is retained when loading the global configuration.

       

      Environment variables are saved correctly when using the plugin, and appear in the created Docker containers as expected — they just don't re-appear when editing the global configuration.

        Attachments

          Issue Links

            Activity

            Hide
            fxnn Felix Neumann added a comment - - edited

            ...which leads to the effect, that when saving the config the next time, the environment variable config is lost. Same applies for the tool configuration for this template.

            This leads to a lot of failed builds and renders the Docker plugin unusable for us

            Edit: Increased severity to "Major", as it's a Major loss of function and there's no easy workaround (re-entering all Tool paths every time is not feasible).

            Show
            fxnn Felix Neumann added a comment - - edited ...which leads to the effect, that when saving the config the next time, the environment variable config is lost. Same applies for the tool configuration for this template. This leads to a lot of failed builds and renders the Docker plugin unusable for us Edit: Increased severity to "Major", as it's a Major loss of function and there's no easy workaround (re-entering all Tool paths every time is not feasible).
            Hide
            adam_kosseck Adam Kosseck added a comment -

            Replicated issue in Jenkins 2.73.3, googled and found this open ticket.

            We need to pass environment variables to containers for builds to complete successfully, this is a big issue for us.

            Show
            adam_kosseck Adam Kosseck added a comment - Replicated issue in Jenkins 2.73.3, googled and found this open ticket. We need to pass environment variables to containers for builds to complete successfully, this is a big issue for us.
            Hide
            ndeloof Nicolas De Loof added a comment -

            Please give 1.1 a try, this should have been fixed in this version and a test-case added to prevent this in the future.

            https://github.com/jenkinsci/docker-plugin/blob/master/src/test/java/com/nirima/jenkins/plugins/docker/DockerCloudTest.java#L63

            Show
            ndeloof Nicolas De Loof added a comment - Please give 1.1 a try, this should have been fixed in this version and a test-case added to prevent this in the future. https://github.com/jenkinsci/docker-plugin/blob/master/src/test/java/com/nirima/jenkins/plugins/docker/DockerCloudTest.java#L63
            Hide
            adam_kosseck Adam Kosseck added a comment -

            I have replicated the issue using plugin version 1.1.

            Show
            adam_kosseck Adam Kosseck added a comment - I have replicated the issue using plugin version 1.1.
            Hide
            ndeloof Nicolas De Loof added a comment - - edited

            ok, will try to reproduce

            Show
            ndeloof Nicolas De Loof added a comment - - edited ok, will try to reproduce
            Hide
            fxnn Felix Neumann added a comment -

            Still reproducible with 1.1.1.

            Show
            fxnn Felix Neumann added a comment - Still reproducible with 1.1.1.
            Hide
            fxnn Felix Neumann added a comment -

            Confirming the fix with 1.1.2. Thank you!

            Show
            fxnn Felix Neumann added a comment - Confirming the fix with 1.1.2. Thank you!

              People

              • Assignee:
                ndeloof Nicolas De Loof
                Reporter:
                orrc Christopher Orr
              • Votes:
                2 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: