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.

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"

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 or yaml
  • targetFiles: The pattern of the files to transform. It can be a single file or a pattern like *.json or *.yml

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.2.1.tar.gz (6.0 kB view hashes)

Uploaded Source

Built Distribution

Supported by

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