Due to some maintenance issues, this service has been switched in read-only mode, you can find more information about the why

and how to migrate your plugin documentation in this blogpost

Skip to end of metadata
Go to start of metadata

Plugin Information

View Variables Replace on the plugin site for more information.

This Jenkins plugin allow to replace easily variables in files content.

Features

  • Search and replace variables using

        - FilePath,

        - Variables prefix,

        - Variables suffix

        - Variables list ( Name / Value )

Requirements

Jenkins

Jenkins version 2.7.3 or newer is required.


Freestyle job configuration


Pipeline job configuration

variableReplace(
	configs: [
		variablesReplaceConfig(
			configs: [
				variablesReplaceItemConfig( 
					name: 'DATABASE_HOST',
					value: 'localhost'
				),
				variablesReplaceItemConfig( 
					name: 'DATABASE_NAME',
					value: 'my_db'
				),
				variablesReplaceItemConfig( 
					name: 'DATABASE_PORT',
					value: '3306'
				),
				variablesReplaceItemConfig( 
					name: 'DATABASE_PASSWORD',
					value: '123456'
				)
			],
			fileEncoding: 'UTF-8', 
			filePath: 'database-config.php', 
			variablesPrefix: '#{', 
			variablesSuffix: '}#'
            )]
)
  • No labels