Skip to main content

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:

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 located
  • fileType: The type of the file to transform. It can be json, yaml, or hcl
  • targetFiles: 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

lemniscat_plugin_filetransform-0.3.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file lemniscat_plugin_filetransform-0.3.0.tar.gz.

File metadata

File hashes

Hashes for lemniscat_plugin_filetransform-0.3.0.tar.gz
Algorithm Hash digest
SHA256 79e4cd666dde2a455e37600353dc2916ef68d05f04a4c2029d40e91057b49d42
MD5 28d805439dcb1d9264e67f14d89ca8f2
BLAKE2b-256 af061652a139d24f7fdb043a99b6e1203a1ca12c31554c6b45603f38bb60fdf0

See more details on using hashes here.

File details

Details for the file lemniscat_plugin_filetransform-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for lemniscat_plugin_filetransform-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8870501ca522b6c1d723498b57901a9474170b496861764f1260a436b655bd46
MD5 17e8bca361e71a32811ddac73def52c8
BLAKE2b-256 903fcabbf09313d2fc11fde776e587629479b0095acb7c17af24490dc00e4287

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page