jfrog / artifactory-gradle-plugin

JFrog Gradle plugin for Build Info extraction and Artifactory publishing.
Apache License 2.0
20 stars 15 forks source link

No environment variables in build info JSON #84

Open StenSoft opened 8 months ago

StenSoft commented 8 months ago

Describe the bug

With clientConfig.isIncludeEnvVars = true set, there are no environment variables in the generated build info JSON. Custom properties added with buildInfo.addEnvironmentProperty are not there either. I suspect that the issue is that the environment is not stored in org.jfrog.build.api.Build but its parent BaseBuildBean's properties.

Current behavior

There are no environment variables in the generated build info JSON

Reproduction steps

No response

Expected behavior

Environment variables are in the generated build info JSON

Artifactory Gradle plugin version

5.1.10

Operating system type and version

Debian Linux 12.2

JFrog Artifactory version

7.68.7

Gradle version

8.3

yahavi commented 7 months ago

Thanks for flagging the problem, @StenSoft! I attempted to recreate it using this example, but the build-info got populated with the environment variables. To further investigate, could you share additional details about your build script?

StenSoft commented 7 months ago

Hi, our setup is quite complex and uses Kotlin Scripts instead of Groovy. I'll try to reproduce it with a project based on the example.