Various files (source, configuration, test files etc.) can be setup for property replacement. FlexDeploy will perform string replacement with appropriate values based on project and deploy environment properties. You can use propertyReplacementArtifacts operation of File plugin, but in many cases specific plugin operation will automatically perform property replacement. Refer plugin documentation for property replacement support. Replacement properties must be defined using following syntax.
${{PROPERTY_NAME}}
for project properties or current instance properties.${{INSTANCE:PROPERTY_NAME}}
for specific instance properties.
Property names can be custom or defined by plugins. For example, to replace WebLogic installation folder you can use ${{FDWLS_WEBLOGIC_HOME}}
which is defined by FlexDeploy WebLogic plugin. But if you want to replace something like URL to internal service, you can define something like MYCOMPANY_PAYMENT_SERVICE_URL
on workflow as defined in Creating a Workflow and use it in your file as ${{MYCOMPANY_PAYMENT_SERVICE_URL}}
. Defining custom property is entirely up to your implementation. For example, you can just define some prefix or suffix that changes through environments as a custom property instead of defining entire URL value.
Property replacement allows various plugin operations to perform deployment to many environments using same artifact files.
For example, if your file contains string like
http://${{FDSOA_SERVER_HOST}}
:${{FDSOA_SERVER_PORT}}
/soa-infra/services/default/CalledProcess!1.0/calledprocess_client_ep?WSDL
then during deployment to Development it will be updated as
http://devhost:8001/soa-infra/services/default/CalledProcess!1.0/calledprocess_client_ep?WSDL
and during deployment to QA it will be updated as
http://qahost:9001/soa-infra/services/default/CalledProcess!1.0/calledprocess_client_ep?WSDL
Above example is based assumption that Development environment values are devhost and 8001 whereas QA environment values are qahost and 9001. And you would have defined two properties FDSOA_SERVER_HOST
and FDSOA_SERVER_PORT
on your workflow as Environment Instance scope.