TotalALM / VSTS-Tasks

35 stars 23 forks source link

Tokenizing variables with hyphens not working #35

Closed patpicos closed 2 months ago

patpicos commented 6 years ago

I have a config file with placeholders to replace. Most of them come from Keyvault and have hyphens in them.

The tokenizer does not replace them. Looking at the log, the regex shows the problem. An additional character is required in the list

2018-10-15T18:57:03.6158657Z Regex: __([A-Za-z0-9.]*|_)*__...
    "spark.hadoop.javax.jdo.option.ConnectionURL" = "jdbc:sqlserver://__azueus2-sqldb-metastore-fqdn__:1433;database=__azueus2-sqldb-metastore-database__;encrypt=true;trustServerCertificate=true;create=false;loginTimeout=300"
    "spark.hadoop.javax.jdo.option.ConnectionUserName" = "__azueus2-sqldb-metastore-user__"
    "spark.hadoop.javax.jdo.option.ConnectionPassword" = "__azueus2-sqldb-metastore-password__"
    "spark.hadoop.javax.jdo.option.ConnectionDriverName" = "com.microsoft.sqlserver.jdbc.SQLServerDriver"
    "spark.sql.hive.metastore.jars" = "maven"
    "spark.sql.hive.metastore.version" = "2.3.0"
    "hive.metastore.schema.verification" = "true"
    "hive.metastore.schema.verification.record.version" = "true"
    "spark.hadoop.dfs.adls.oauth2.access.token.provider.type" = "ClientCredential"
    "spark.hadoop.dfs.adls.oauth2.client.id" = "__spn-application-principalId__"
    "spark.hadoop.dfs.adls.oauth2.credential" = "__spn-application-principalKey__"
patpicos commented 5 years ago

any updates?

suphero commented 4 years ago

Same regex fails to replace variables with "I" (capital i) characters.

For example: "Customerid" replaced but "CustomerId" does not replaced.

I think customizable regex pattern can be a proper solution.

suphero commented 4 years ago

I have created a Pull Request #40 to customize the regex pattern

patpicos commented 2 months ago

closing as I am no longer working with this