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

mlAddHostNameTokens=true doesn't seem to create the custom tokens for each host #450

Closed
darrelcox opened this issue Mar 28, 2019 · 2 comments

Comments

@darrelcox
Copy link

darrelcox commented Mar 28, 2019

After adding the mlAddHostNameTokens=true to my gradle.properties file. I added this task to my build.gradle file :

task printInfo {
    doLast {
        println "1st host (mlHostName1): " + mlAppConfig.customTokens.get("%%mlHostName1%%")
        println "2nd host (mlHostName2): " + mlAppConfig.customTokens.get("%%mlHostName2%%")
        println "3rd host (mlHostName3): " + mlAppConfig.customTokens.get("%%mlHostName3%%")
        println "4th host (mlHostName4): " + mlAppConfig.customTokens.get("%%mlHostName4%%")
        println "5th host (mlHostName5): " + mlAppConfig.customTokens.get("%%mlHostName5%%")
        println "6th host (mlHostName6): " + mlAppConfig.customTokens.get("%%mlHostName6%%")
        println "7th host (mlHostName7): " + mlAppConfig.customTokens.get("%%mlHostName7%%")
        println "8th host (mlHostName8): " + mlAppConfig.customTokens.get("%%mlHostName8%%")
        println "9th host (mlHostName9): " + mlAppConfig.customTokens.get("%%mlHostName9%%")
        println "10th host (mlHostName10): " + mlAppConfig.customTokens.get("%%mlHostName10%%")
    }
}

Then I run : gradle -i -Penv=prod -Pconfirm=true printInfo but I'm getting this output :

1st host (mlHostName1): null
2nd host (mlHostName2): null
3rd host (mlHostName3): null
4th host (mlHostName4): null
5th host (mlHostName5): null
6th host (mlHostName6): null
7th host (mlHostName7): null
8th host (mlHostName8): null
9th host (mlHostName9): null
10th host (mlHostName10): null

However, starting with 3.13.0 I would expect see the hostname values according to the description from https://github.com/marklogic-community/ml-app-deployer/wiki/Scheduled-Tasks.

What am I doing wrong?

gradle -v

------------------------------------------------------------
Gradle 5.3.1
------------------------------------------------------------

Build time:   2019-03-28 09:09:23 UTC
Revision:     f2fae6ba563cfb772c8bc35d31e43c59a5b620c3

Kotlin:       1.3.21
Groovy:       2.5.4
Ant:          Apache Ant(TM) version 1.9.13 compiled on July 10 2018
JVM:          1.8.0_121 (Oracle Corporation 25.121-b13)
OS:           Mac OS X 10.14.4 x86_64

build.gradle plugins are :

plugins {
    id "net.saliman.properties" version "1.4.6"
    id "com.marklogic.ml-gradle" version "3.13.0"
    id 'nu.studer.credentials' version '1.0.4' 
}

Thanks,
Darrel

@rjrudin
Copy link
Contributor

rjrudin commented Mar 29, 2019

The mlHostName* properties are added when any commands are executed by the mlAppDeployer object. Before the first command is executed, the value of mlAddHostNameTokens is checked, and if it's true, the host name properties are set.

I'll make that more clear in the docs.

@rjrudin rjrudin closed this as completed Mar 29, 2019
rjrudin added a commit that referenced this issue Aug 23, 2024
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

No branches or pull requests

2 participants