Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-21040

Extra docker run args are ignored when provided in YAML spec

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 7.2.0, 7.1.2
    • 7.1.0, 7.1.1
    • Bamboo Specs
    • None

      Issue Summary

      Extra docker run args are ignored when provided in YAML spec

      Steps to Reproduce

      1. Import YAML spec in a repository with bamboo-specs/bamboo.yaml that has:

       

      Default Job:
        key: JOB1
        docker:
          image: ubuntu
          volumes:
            ${bamboo.working.directory}: ${bamboo.working.directory}
            ${bamboo.tmp.directory}: ${bamboo.tmp.directory}
          docker-run-arguments:
          - --net=host
      

      2. Run specs scan.

      Expected Results

      The created plan, namely docker runner config should container extra args --net=host

      Actual Results

      Docker run args are ignored. The resulting yaml looks like this:

            dockerConfiguration:
              dockerRunArguments: []
              enabled: true
              image: ubuntu
              volumes:
                ${bamboo.working.directory}: ${bamboo.working.directory}
                ${bamboo.tmp.directory}: ${bamboo.tmp.directory}
      

      Workaround

      Install attached patch:

      1. Shutdown the Bamboo server
      2. Locate <bamboo_install_dir>/atlassian_bamboo/WEB-INF/lib/atlassian-bamboo-import-export-7.1.1.jar.
      3. Replace it with the jar file attached to this ticket (it's recommended to make a backup of the original file)
      4. Start the server again
      5. Re-scan any YML Specs affected by this issue.

            [BAM-21040] Extra docker run args are ignored when provided in YAML spec

            Zuzanna Struczewska made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 599724 ]
            Martyna Wojtas (Inactive) made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 563506 ]

            Hello e7f248f097fe, thank you for comment. It will be improved at next versions of documentation

            Alexey Chystoprudov added a comment - Hello e7f248f097fe , thank you for comment. It will be improved at next versions of documentation

            Hello, kindly document this "docker-run-arguments:" into your documentation.

            Loh Kai Cong added a comment - Hello, kindly document this "docker-run-arguments:" into your documentation.
            Martyna Wojtas (Inactive) made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 510199 ]
            Jan Majkutewicz (Inactive) made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: Waiting for Release [ 12075 ] New: Closed [ 6 ]
            Marcin Gardias made changes -
            Description Original: h3. Issue Summary

            Extra docker run args are ignored when provided in YAML spec
            h3. Steps to Reproduce
             # Import YAML spec in a repository with bamboo-specs/bamboo.yaml that has:

             
            {code:java}
            Default Job:
              key: JOB1
              docker:
                image: ubuntu
                volumes:
                  ${bamboo.working.directory}: ${bamboo.working.directory}
                  ${bamboo.tmp.directory}: ${bamboo.tmp.directory}
                docker-run-arguments:
                - --net=host
            {code}
            2. Run specs scan.
            h3. Expected Results

            The created plan, namely docker runner config should container extra args --net=host
            h3. Actual Results

            Docker run args are ignored. The resulting yaml looks like this:
            {noformat}
                  dockerConfiguration:
                    dockerRunArguments: []
                    enabled: true
                    image: ubuntu
                    volumes:
                      ${bamboo.working.directory}: ${bamboo.working.directory}
                      ${bamboo.tmp.directory}: ${bamboo.tmp.directory}
            {noformat}
            h3. Workaround

            Currently there is no known workaround for this behavior. A workaround will be added here when available
            New: h3. Issue Summary

            Extra docker run args are ignored when provided in YAML spec
            h3. Steps to Reproduce
             # Import YAML spec in a repository with bamboo-specs/bamboo.yaml that has:

             
            {code:java}
            Default Job:
              key: JOB1
              docker:
                image: ubuntu
                volumes:
                  ${bamboo.working.directory}: ${bamboo.working.directory}
                  ${bamboo.tmp.directory}: ${bamboo.tmp.directory}
                docker-run-arguments:
                - --net=host
            {code}
            2. Run specs scan.
            h3. Expected Results

            The created plan, namely docker runner config should container extra args --net=host
            h3. Actual Results

            Docker run args are ignored. The resulting yaml looks like this:
            {noformat}
                  dockerConfiguration:
                    dockerRunArguments: []
                    enabled: true
                    image: ubuntu
                    volumes:
                      ${bamboo.working.directory}: ${bamboo.working.directory}
                      ${bamboo.tmp.directory}: ${bamboo.tmp.directory}
            {noformat}
            h3. Workaround

            Install attached patch:
             # Shutdown the Bamboo server
             # Locate <bamboo_install_dir>/atlassian_bamboo/WEB-INF/lib/atlassian-bamboo-import-export-7.1.1.jar.
             # Replace it with the jar file attached to this ticket (it's recommended to make a backup of the original file)
             # Start the server again
             # Re-scan any YML Specs affected by this issue.
            Marcin Gardias made changes -
            Bugfix Automation Bot made changes -
            Support reference count New: 1
            Marcin Gardias made changes -
            Fix Version/s New: 7.2.0 [ 92133 ]

              mgardias Marcin Gardias
              c64f33b2bce3 Yevhen
              Affected customers:
              1 This affects my team
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: