1

in the context of using Gradle to drive build, testing, and further jobs/stages on Bamboo server (version 7.2.1) I've configured env. variable GRADLE_USER_HOME to save downloaded Gradle binary to project-local path with the intent to share it with further downstream jobs/stages.

But unfortunately Bamboo ignores "source" or location folder of the artifact. Excerpt from our bamboo.yaml:

Build Java application artifact:
  tasks:
    - script:
        scripts:
          - "export GRADLE_USER_HOME=${bamboo.build.working.directory}/GradleUserHome"
          - ./gradlew --no-daemon assemble
          - "echo GRADLE USER HOME content; ls -al $GRADLE_USER_HOME/; echo '---'"  # DEBUG
  artifacts:
    - name: "Gradle Wrapper installation"
      location: GradleUserHome
      pattern: '**/*.*'
      required: true
      shared: true

Debugging output of the echo command shows expected content.

But next downstream job shows that content of artifact "Gradle Wrapper installation" is installed relative to project's workspace, but not in sub-folder ./GradleUserHome as denoted by location key (just as if mentioned location config item is simply ignored with downstream jobs/stages).

Any ideas how to fix this?

Thanks

PS: Next downstream job exhibits in its log messages something like the following:

Preparing artifact 'Gradle Wrapper installation' for use at /var/atlassian/bamboo-agent02-home/xml-data/build-dir/[...] (location: )

Take notice of empty location!

Christian
  • 293
  • 2
  • 14

0 Answers0