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

🐛 ENVAR replaced when defined. #648

Merged
merged 1 commit into from
Jun 10, 2024
Merged

🐛 ENVAR replaced when defined. #648

merged 1 commit into from
Jun 10, 2024

Conversation

jortel
Copy link
Contributor

@jortel jortel commented Jun 10, 2024

ENVAR replaced (only) when defined. This prevents replacing variables not associated with ENVAR. For example, in the addon-analyzer, requested resources are expressed in the metadata as $(var).

For example:

  metadata:
    provider:
      address: localhost:$(PORT)
      initConfig:
      - providerSpecificConfig:
          bundles: /jdtls/java-analyzer-bundle/java-analyzer-bundle.core/target/java-analyzer-bundle.core-1.0.0-SNAPSHOT.jar
          depOpenSourceLabelsFile: /usr/local/etc/maven.default.index
          lspServerPath: /jdtls/bin/jdtls
          mavenSettingsFile: $(maven.settings.path)
      name: java
    resources:
    - fields:
      - key: maven.settings.path
        name: settings
        path: /shared/creds/maven/settings.xml
      selector: identity:kind=maven
  selector: tag:Language=Java || !tag:Language

An alternative would be a different syntax. Perhaps $((var)). $[var] $/maven.settings.path/
The $(maven.settings.path) should not be replaced with "" since it's not an ENVAR.

Signed-off-by: Jeff Ortel <jortel@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants