Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to pass environmental variables? #350

Open
antonalechnovic opened this issue Jun 14, 2020 · 1 comment
Open

How to pass environmental variables? #350

antonalechnovic opened this issue Jun 14, 2020 · 1 comment
Labels
question Further information is requested

Comments

@antonalechnovic
Copy link

https://www.jfrog.com/confluence/display/JFROG/Gradle+Artifactory+Plugin

"Controlling how environment variables are exposed

As shown in the example above, you can control which environment variables are exposed in clientConfig.setIncludeEnvVars using clientConfig.setEnvVarsExcludePatterns and clientConfig.setEnvVarsIncludePatterns. These calls specify which environment variables should be excluded or included respectively using a parameter which is a comma-separated list of expressions to exclude or include. The expressions can use a star ('*') wildcard to specify multiple environment variables."

After enabling this flag I tried various voodoo ways to populate variables with 0 effect:

ARTIFACTORY_PUBLISH_CONTEXT-URL=bla.com
ARTIFACTORY_PUBLISH_CONTEXT_URL=bla.com
ARTIFACTORY_PUBLISH_CONTEXTURL=bla.com

???

@antonalechnovic antonalechnovic added the question Further information is requested label Jun 14, 2020
@antonalechnovic
Copy link
Author

Same as gradle devs, same artifactory plugin devs seems to be lost in their own worlds.
According to source code:

    public void setIncludeEnvVars(Boolean enabled) {
        rootConfig.setBooleanValue(INCLUDE_ENV_VARS, enabled);
    }

Nothing to do with System.getenv(propertyName) which anyone else would believe it's doing. So you can only pass -D parameter style and not environmental variable to configure artifactory plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant