A plugin for lemniscat to transform files
Project description
lemniscat.plugin.filetransform
A plugin to transform one or more files into a lemniscat workflow
Description
This plugin allows you to transform one or more files into a lemniscat workflow. This plugin replace all attributes in the file by the value of the variables in the lemniscat runtime.
Supported formats: JSON, YAML, HCL (Terraform)
For example, if you have a file config.json with the following content:
{
"url": "",
"port": ""
}
and you have the following variables in your lemniscat workflow:
- url: "http://localhost"
- port: "8080"
the plugin will transform the file into:
{
"url": "http://localhost",
"port": "8080"
}
Usage
Pre-requisites
In order to use this plugin, you need to add plugin into the required section of your manifest file.
requirements:
- name: lemniscat.plugin.filetransform
version: 0.2.0
Transform json file with variables
- task: filetransform
displayName: 'set json file'
steps:
- run
parameters:
folderPath: ${{ filepath }}
fileType: json
targetFiles: "*.json"
Transform yaml file with variables
- task: filetransform
displayName: 'set yaml file'
steps:
- run
parameters:
folderPath: ${{ filepath }}
fileType: yaml
targetFiles: "*.yml"
Transform HCL file with variables (Terraform)
- task: filetransform
displayName: 'set terraform configuration'
steps:
- run
parameters:
folderPath: ${{ filepath }}
fileType: hcl
targetFiles: "*.tf"
Transform Terraform variables file (.tfvars)
- task: filetransform
displayName: 'set terraform variables'
steps:
- run
parameters:
folderPath: ${{ filepath }}
fileType: hcl
targetFiles: "*.tfvars"
Inputs
Parameters
folderPath: The path of the folder where the files to transform are locatedfileType: The type of the file to transform. It can bejson,yaml, orhcltargetFiles: The pattern of the files to transform. It can be a single file or a pattern like*.json,*.yml,*.tf, or*.tfvars
Outputs
No outputs
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lemniscat_plugin_filetransform-0.3.0.tar.gz.
File metadata
- Download URL: lemniscat_plugin_filetransform-0.3.0.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79e4cd666dde2a455e37600353dc2916ef68d05f04a4c2029d40e91057b49d42
|
|
| MD5 |
28d805439dcb1d9264e67f14d89ca8f2
|
|
| BLAKE2b-256 |
af061652a139d24f7fdb043a99b6e1203a1ca12c31554c6b45603f38bb60fdf0
|
File details
Details for the file lemniscat_plugin_filetransform-0.3.0-py3-none-any.whl.
File metadata
- Download URL: lemniscat_plugin_filetransform-0.3.0-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8870501ca522b6c1d723498b57901a9474170b496861764f1260a436b655bd46
|
|
| MD5 |
17e8bca361e71a32811ddac73def52c8
|
|
| BLAKE2b-256 |
903fcabbf09313d2fc11fde776e587629479b0095acb7c17af24490dc00e4287
|