Add config files for TAS
Service configuration files enable you to specify information in the Harness service that can be referenced in other parts of the Harness application. In this topic, we'll cover using these configuration files for Tanzu Application Service (TAS, formerly PCF).
- Harness
- GitHub
-
In the Harness service, in Config Files, select Add Config File.
-
In Config File Source, select Harness, and then select Continue.
-
In Config File Identifier, enter a name for the file.
-
In File/Folder Path, select the config file from Harness file store.
For more information, go to add inline service using file store.
-
Select Add to attach multiple files as a single config file.
-
Select Submit.
For more information, go to Use config file in your deployments.
You can view the config files added to your service definition.
You can reference this config file as an expression in a pipeline from the Execution tab.
For example, in a Tanzu Command step, you can reference the config file by entering the following script in the step's Step Parameters> Script> Inline.
echo "<+configFile.getAsString("shell")>"
- Select a GitHub connector, and select Continue. You can also add a new GitHub connector here and reference it.
- In Config File Details, enter a config file name.
- Enter the name of the repository you want to reference from your GitHub account.
- In Git Fetch Type, select Latest from Branch, and then specify the Branch name.
- Enter the file path for config files from GitHub.
- Select Add File to attach multiple files as a single config file.
- Select Submit.
You can view the config files added to your service definition.
You can reference this config file as an expression in a pipeline from the Execution tab.
For example, in a Tanzu Command step, you can reference the config file by entering the following script in the step's Step Parameters> Script> Inline.
echo "<+configFile.getAsString("shellsec")>"