...
Project properties
...
Follow this link to know about the Azure DevOps Build Pipeline configuration. This must be configured prior to configuring the FlexDeploy workflows and project properties.
...
Workflow configuration for fetching the ARM template from the repository and initiate the Synapse Release pipeline
Build Workflow:
Expand |
---|
title | SynapsePackageBuildARM |
---|
|
Code Block |
---|
<?xml version="1.0" encoding="Unicode"?>
<ns0:WorkFlow xmlns:ns1="http://flexagon.com/flexdeploy/workflow/common" xmlns:ns0="http://flexagon.com/flexdeploy/workflow">
<ns1:Name>SynapsePackageBuildARM</ns1:Name>
<ns1:Description></ns1:Description>
<ns0:Steps>
<ns0:Step>
<ns1:Name>execute</ns1:Name>
<ns1:StepId>1</ns1:StepId>
<ns0:InvokePlugin>
<ns0:PluginName>FlexagonShellPlugin</ns0:PluginName>
<ns0:PluginOperation>execute</ns0:PluginOperation>
<ns0:EndpointInstanceOverrideExpression>false</ns0:EndpointInstanceOverrideExpression>
<ns0:InvokePluginTypeVersion>v2</ns0:InvokePluginTypeVersion>
<ns0:consumesArtifacts>false</ns0:consumesArtifacts>
<ns0:producesArtifacts>true</ns0:producesArtifacts>
<ns0:EndpointSelection>
<ns0:EndpointSelectionChoice>All</ns0:EndpointSelectionChoice>
</ns0:EndpointSelection>
<ns0:EndpointExecutionChoice>Any</ns0:EndpointExecutionChoice>
<ns0:PluginInputs>
<ns0:PluginInput>
<ns0:Name>FDSHELL_INP_CODE_SNIPPET</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
<ns0:Text># Define the name of the zip file to be created
ZIP_NAME=$FD_PROJECT_NAME.zip
mkdir -p $FD_TEMP_DIR/ARMTEMPLATES
find $FD_TEMP_DIR -type f -name "Template*.json" -exec cp {} $FD_TEMP_DIR/ARMTEMPLATES \;
cd $FD_TEMP_DIR/ARMTEMPLATES
# Find and zip all Template*.json files into a single zip file
zip "$ZIP_NAME" *
cp $FD_TEMP_DIR/ARMTEMPLATES/$ZIP_NAME $FD_ARTIFACTS_DIR
echo "Zip created and moved to artifacts."
</ns0:Text>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDSHELL_INP_STOP_ON_ERROR</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>Boolean</ns1:Type>
<ns0:Text>false</ns0:Text>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDSHELL_INP_DISABLE_ECHO</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>Boolean</ns1:Type>
<ns0:Text>false</ns0:Text>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDSHELL_INP_RESTRICT_ENVIRONMENT</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDSHELL_INP_NO_SECURE_VARIABLES</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>Boolean</ns1:Type>
<ns0:Text>false</ns0:Text>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDSHELL_INP_LOCK</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
</ns0:PluginInput>
</ns0:PluginInputs>
<ns0:UserInputs/>
<ns0:PluginOutputs/>
<ns0:UserOutputs/>
</ns0:InvokePlugin>
</ns0:Step>
</ns0:Steps>
</ns0:WorkFlow>
|
|
Deploy Workflow:
...
Expand |
---|
title | SynapsePackageDeployARM |
---|
|
Code Block |
---|
<?xml version="1.0" encoding="Unicode"?>
<ns0:WorkFlow xmlns:ns1="http://flexagon.com/flexdeploy/workflow/common" xmlns:ns0="http://flexagon.com/flexdeploy/workflow">
<ns1:Name>SynapsePackageDeployARM</ns1:Name>
<ns1:Description></ns1:Description>
<ns0:Variables>
<ns0:Variable>
<ns1:Name>FINALVERSION</ns1:Name>
<ns1:Type>String</ns1:Type>
<ns0:returnAsOutput>true</ns0:returnAsOutput>
<ns1:isConstant>false</ns1:isConstant>
</ns0:Variable>
<ns0:Variable>
<ns1:Name>RELEASE_ID</ns1:Name>
<ns1:Type>String</ns1:Type>
<ns0:returnAsOutput>true</ns0:returnAsOutput>
<ns1:isConstant>false</ns1:isConstant>
</ns0:Variable>
<ns0:Variable>
<ns1:Name>ENVIRONMENT_ID</ns1:Name>
<ns1:Type>String</ns1:Type>
<ns0:returnAsOutput>true</ns0:returnAsOutput>
<ns1:isConstant>false</ns1:isConstant>
</ns0:Variable>
<ns0:Variable>
<ns1:Name>RELEASE_URL</ns1:Name>
<ns1:Type>String</ns1:Type>
<ns0:returnAsOutput>true</ns0:returnAsOutput>
<ns1:isConstant>false</ns1:isConstant>
</ns0:Variable>
<ns0:Variable>
<ns1:Name>PKG_NAME</ns1:Name>
<ns1:Type>String</ns1:Type>
<ns0:returnAsOutput>true</ns0:returnAsOutput>
<ns1:isConstant>false</ns1:isConstant>
</ns0:Variable>
<ns0:Variable>
<ns1:Name>ENV_DETAILS</ns1:Name>
<ns1:Type>String</ns1:Type>
<ns0:returnAsOutput>true</ns0:returnAsOutput>
<ns1:isConstant>false</ns1:isConstant>
</ns0:Variable>
</ns0:Variables>
<ns0:Steps>
<ns0:Step>
<ns1:Name>execute</ns1:Name>
<ns1:StepId>1</ns1:StepId>
<ns0:InvokePlugin>
<ns0:PluginName>FlexagonShellPlugin</ns0:PluginName>
<ns0:PluginOperation>execute</ns0:PluginOperation>
<ns0:EndpointInstanceOverrideExpression>false</ns0:EndpointInstanceOverrideExpression>
<ns0:InvokePluginTypeVersion>v2</ns0:InvokePluginTypeVersion>
<ns0:consumesArtifacts>true</ns0:consumesArtifacts>
<ns0:producesArtifacts>false</ns0:producesArtifacts>
<ns0:EndpointSelection>
<ns0:EndpointSelectionChoice>All</ns0:EndpointSelectionChoice>
</ns0:EndpointSelection>
<ns0:EndpointExecutionChoice>Any</ns0:EndpointExecutionChoice>
<ns0:PluginInputs>
<ns0:PluginInput>
<ns0:Name>FDSHELL_INP_CODE_SNIPPET</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
<ns0:Text>mkdir -p $FD_TEMP_DIR/ARMFiles
unzip $FD_ARTIFACTS_DIR/*.zip -d $FD_TEMP_DIR/ARMFiles</ns0:Text>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDSHELL_INP_STOP_ON_ERROR</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>Boolean</ns1:Type>
<ns0:Text>false</ns0:Text>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDSHELL_INP_DISABLE_ECHO</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>Boolean</ns1:Type>
<ns0:Text>false</ns0:Text>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDSHELL_INP_RESTRICT_ENVIRONMENT</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDSHELL_INP_NO_SECURE_VARIABLES</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>Boolean</ns1:Type>
<ns0:Text>false</ns0:Text>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDSHELL_INP_LOCK</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
</ns0:PluginInput>
</ns0:PluginInputs>
<ns0:UserInputs/>
<ns0:PluginOutputs/>
<ns0:UserOutputs/>
</ns0:InvokePlugin>
</ns0:Step>
<ns0:Step>
<ns1:Name>propertyReplacement</ns1:Name>
<ns1:StepId>2</ns1:StepId>
<ns0:InvokePlugin>
<ns0:PluginName>FlexagonFilePlugin</ns0:PluginName>
<ns0:PluginOperation>propertyReplacement</ns0:PluginOperation>
<ns0:EndpointInstanceOverrideExpression>false</ns0:EndpointInstanceOverrideExpression>
<ns0:InvokePluginTypeVersion>v2</ns0:InvokePluginTypeVersion>
<ns0:consumesArtifacts>false</ns0:consumesArtifacts>
<ns0:producesArtifacts>false</ns0:producesArtifacts>
<ns0:EndpointSelection>
<ns0:EndpointSelectionChoice>All</ns0:EndpointSelectionChoice>
</ns0:EndpointSelection>
<ns0:EndpointExecutionChoice>Any</ns0:EndpointExecutionChoice>
<ns0:PluginInputs>
<ns0:PluginInput>
<ns0:Name>FDFILE_INP_SOURCE_PATH</ns0:Name>
<ns0:ValueType>Expression</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
<ns0:Value>
<ns0:Expression>FD_TEMP_DIR + "/ARMFiles"</ns0:Expression>
</ns0:Value>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDFILE_INP_FILE_FILTER</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDFILE_INP_FILE_FILTER_EXCLUDED</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
</ns0:PluginInput>
</ns0:PluginInputs>
<ns0:UserInputs/>
<ns0:PluginOutputs/>
<ns0:UserOutputs/>
</ns0:InvokePlugin>
</ns0:Step>
<ns0:Step>
<ns1:Name>Assign</ns1:Name>
<ns1:StepId>3</ns1:StepId>
<ns0:Assign>
<ns0:From>
<ns0:Expression>PACKAGE_VERSION.substring(0,PACKAGE_VERSION.lastIndexOf(".") +1) + FD_WORKFLOW_EXECUTION_ID</ns0:Expression>
</ns0:From>
<ns0:To>FINALVERSION</ns0:To>
</ns0:Assign>
</ns0:Step>
<ns0:Step>
<ns1:Name>publishArtifacts</ns1:Name>
<ns1:StepId>4</ns1:StepId>
<ns0:InvokePlugin>
<ns0:PluginName>FlexagonAzurePlugin</ns0:PluginName>
<ns0:PluginOperation>publishArtifacts</ns0:PluginOperation>
<ns0:EndpointInstanceOverrideExpression>false</ns0:EndpointInstanceOverrideExpression>
<ns0:InvokePluginTypeVersion>v2</ns0:InvokePluginTypeVersion>
<ns0:consumesArtifacts>false</ns0:consumesArtifacts>
<ns0:producesArtifacts>false</ns0:producesArtifacts>
<ns0:EndpointSelection>
<ns0:EndpointSelectionChoice>All</ns0:EndpointSelectionChoice>
</ns0:EndpointSelection>
<ns0:EndpointExecutionChoice>Any</ns0:EndpointExecutionChoice>
<ns0:PluginInputs>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_FEED</ns0:Name>
<ns0:ValueType>Expression</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
<ns0:Value>
<ns0:Expression>FEED_NAME</ns0:Expression>
</ns0:Value>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_PACKAGE_NAME</ns0:Name>
<ns0:ValueType>Expression</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
<ns0:Value>
<ns0:Expression>(FD_PACKAGE_NAME + "-" + PACKAGE_NAME + "-" + FD_ENVIRONMENT_CODE).toLowerCase()</ns0:Expression>
</ns0:Value>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_PACKAGE_VERSION</ns0:Name>
<ns0:ValueType>Expression</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
<ns0:Value>
<ns0:Expression>FINALVERSION</ns0:Expression>
</ns0:Value>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_PACKAGE_DESCRIPTION</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_PROJECT_NAME</ns0:Name>
<ns0:ValueType>Expression</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
<ns0:Value>
<ns0:Expression>PROJECT_NAME</ns0:Expression>
</ns0:Value>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_PACKAGE_PATH</ns0:Name>
<ns0:ValueType>Expression</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
<ns0:Value>
<ns0:Expression>FD_TEMP_DIR + "/ARMFiles"</ns0:Expression>
</ns0:Value>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_ADDITIONAL_PARAMS</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
</ns0:PluginInput>
</ns0:PluginInputs>
<ns0:UserInputs/>
<ns0:PluginOutputs>
<ns0:OutputValue>
<ns0:NameInCallee>FDAZ_DEVOPS_OUT_ERR</ns0:NameInCallee>
</ns0:OutputValue>
<ns0:OutputValue>
<ns0:NameInCallee>FDAZ_DEVOPS_OUT_RESP</ns0:NameInCallee>
</ns0:OutputValue>
</ns0:PluginOutputs>
<ns0:UserOutputs/>
</ns0:InvokePlugin>
</ns0:Step>
<ns0:Step>
<ns1:Name>createRelease</ns1:Name>
<ns1:StepId>5</ns1:StepId>
<ns0:InvokePlugin>
<ns0:PluginName>FlexagonAzurePlugin</ns0:PluginName>
<ns0:PluginOperation>createRelease</ns0:PluginOperation>
<ns0:EndpointInstanceOverrideExpression>false</ns0:EndpointInstanceOverrideExpression>
<ns0:InvokePluginTypeVersion>v2</ns0:InvokePluginTypeVersion>
<ns0:consumesArtifacts>false</ns0:consumesArtifacts>
<ns0:producesArtifacts>false</ns0:producesArtifacts>
<ns0:EndpointSelection>
<ns0:EndpointSelectionChoice>All</ns0:EndpointSelectionChoice>
</ns0:EndpointSelection>
<ns0:EndpointExecutionChoice>Any</ns0:EndpointExecutionChoice>
<ns0:PluginInputs>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_RELEASE_DEFINITION_ID</ns0:Name>
<ns0:ValueType>Expression</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
<ns0:Value>
<ns0:Expression>RELEASE_DEFINITION_ID</ns0:Expression>
</ns0:Value>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_ARTIFACTS_PAYLOAD</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_PROJECT_NAME</ns0:Name>
<ns0:ValueType>Expression</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
<ns0:Value>
<ns0:Expression>PROJECT_NAME</ns0:Expression>
</ns0:Value>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_VARIABLES_LIST</ns0:Name>
<ns0:ValueType>Expression</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
<ns0:Value>
<ns0:Expression>"{\"feedName\": {\"value\": \"" + PROJECT_NAME + "/" + FEED_NAME + "\"},\"packageName\": {\"value\": \"" + (FD_PACKAGE_NAME + "-" + PACKAGE_NAME + "-" + FD_ENVIRONMENT_CODE).toLowerCase() + "\"},\"packageVersion\": {\"value\": \"" + FINALVERSION + "\"}}"</ns0:Expression>
</ns0:Value>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_PROPERTIES</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_MANUAL_ENVIRONMENTS</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_RELEASE_STATUS_CHECK</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>Boolean</ns1:Type>
<ns0:Text>false</ns0:Text>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_PARTIALLY_SUCCEEDED_ENVIRONMENTS</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
</ns0:PluginInput>
</ns0:PluginInputs>
<ns0:UserInputs/>
<ns0:PluginOutputs>
<ns0:OutputValue>
<ns0:NameInCallee>FDAZ_DEVOPS_OUT_RESP</ns0:NameInCallee>
</ns0:OutputValue>
<ns0:OutputValue>
<ns0:NameInCallee>FDAZ_DEVOPS_OUT_RELEASE_WEB_URL</ns0:NameInCallee>
</ns0:OutputValue>
<ns0:OutputValue>
<ns0:NameInCallee>FDAZ_DEVOPS_OUT_REL_ENV_STAGE_DETAILS</ns0:NameInCallee>
<ns0:NameInCaller>ENV_DETAILS</ns0:NameInCaller>
</ns0:OutputValue>
<ns0:OutputValue>
<ns0:NameInCallee>FDAZ_DEVOPS_OUT_RELEASE_ID</ns0:NameInCallee>
<ns0:NameInCaller>RELEASE_ID</ns0:NameInCaller>
</ns0:OutputValue>
</ns0:PluginOutputs>
<ns0:UserOutputs/>
</ns0:InvokePlugin>
</ns0:Step>
<ns0:Step>
<ns1:Name>parseJson</ns1:Name>
<ns1:StepId>6</ns1:StepId>
<ns0:InvokePlugin>
<ns0:PluginName>FlexagonXPathPlugin</ns0:PluginName>
<ns0:PluginOperation>parseJson</ns0:PluginOperation>
<ns0:EndpointInstanceOverrideExpression>false</ns0:EndpointInstanceOverrideExpression>
<ns0:InvokePluginTypeVersion>v2</ns0:InvokePluginTypeVersion>
<ns0:consumesArtifacts>false</ns0:consumesArtifacts>
<ns0:producesArtifacts>false</ns0:producesArtifacts>
<ns0:EndpointSelection>
<ns0:EndpointSelectionChoice>All</ns0:EndpointSelectionChoice>
</ns0:EndpointSelection>
<ns0:EndpointExecutionChoice>Any</ns0:EndpointExecutionChoice>
<ns0:PluginInputs>
<ns0:PluginInput>
<ns0:Name>FDP_SOURCE</ns0:Name>
<ns0:ValueType>Expression</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
<ns0:Value>
<ns0:Expression>ENV_DETAILS</ns0:Expression>
</ns0:Value>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDP_XPATH</ns0:Name>
<ns0:ValueType>Expression</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
<ns0:Value>
<ns0:Expression>'$..[?(@.name==\''+FD_ENVIRONMENT_NAME+'\')].id'</ns0:Expression>
</ns0:Value>
</ns0:PluginInput>
</ns0:PluginInputs>
<ns0:UserInputs/>
<ns0:PluginOutputs>
<ns0:OutputValue>
<ns0:NameInCallee>FDP_VALUE</ns0:NameInCallee>
<ns0:NameInCaller>ENVIRONMENT_ID</ns0:NameInCaller>
</ns0:OutputValue>
</ns0:PluginOutputs>
<ns0:UserOutputs/>
</ns0:InvokePlugin>
</ns0:Step>
<ns0:Step>
<ns1:Name>updateReleaseEnvStatus</ns1:Name>
<ns1:StepId>7</ns1:StepId>
<ns0:InvokePlugin>
<ns0:PluginName>FlexagonAzurePlugin</ns0:PluginName>
<ns0:PluginOperation>updateReleaseEnvStatus</ns0:PluginOperation>
<ns0:EndpointInstanceOverrideExpression>false</ns0:EndpointInstanceOverrideExpression>
<ns0:InvokePluginTypeVersion>v2</ns0:InvokePluginTypeVersion>
<ns0:consumesArtifacts>false</ns0:consumesArtifacts>
<ns0:producesArtifacts>false</ns0:producesArtifacts>
<ns0:EndpointSelection>
<ns0:EndpointSelectionChoice>All</ns0:EndpointSelectionChoice>
</ns0:EndpointSelection>
<ns0:EndpointExecutionChoice>Any</ns0:EndpointExecutionChoice>
<ns0:PluginInputs>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_RELEASE_ID</ns0:Name>
<ns0:ValueType>Expression</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>Integer</ns1:Type>
<ns0:Value>
<ns0:Expression>RELEASE_ID</ns0:Expression>
</ns0:Value>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_RELEASE_ENVIRONMENT_ID</ns0:Name>
<ns0:ValueType>Expression</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>Integer</ns1:Type>
<ns0:Value>
<ns0:Expression>ENVIRONMENT_ID.substring(1,ENVIRONMENT_ID.length()-1)</ns0:Expression>
</ns0:Value>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_PROJECT_NAME</ns0:Name>
<ns0:ValueType>Expression</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
<ns0:Value>
<ns0:Expression>PROJECT_NAME</ns0:Expression>
</ns0:Value>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_RELEASE_ENVIRONMENT_STATUS</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
<ns0:Text>InProgress</ns0:Text>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_VARIABLES_LIST</ns0:Name>
<ns0:ValueType>Expression</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
<ns0:Value>
<ns0:Expression>ENVIRONMENT_VARIABLES_LIST</ns0:Expression>
</ns0:Value>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_RELEASE_COMMENT</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_SCHEDULED_DEPLOYMENT_TIME</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_REL_ENV_STATUS_CHECK</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>Boolean</ns1:Type>
<ns0:Text>true</ns0:Text>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_PARTIALLY_SUCCEEDED_STATUS_CHECK</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>Boolean</ns1:Type>
<ns0:Text>false</ns0:Text>
</ns0:PluginInput>
</ns0:PluginInputs>
<ns0:UserInputs/>
<ns0:PluginOutputs>
<ns0:OutputValue>
<ns0:NameInCallee>FDAZ_DEVOPS_OUT_RESP</ns0:NameInCallee>
</ns0:OutputValue>
<ns0:OutputValue>
<ns0:NameInCallee>FDAZ_DEVOPS_OUT_REL_ENV_WEB_URL</ns0:NameInCallee>
<ns0:NameInCaller>RELEASE_URL</ns0:NameInCaller>
</ns0:OutputValue>
</ns0:PluginOutputs>
<ns0:UserOutputs/>
</ns0:InvokePlugin>
</ns0:Step>
<ns0:Step>
<ns1:Name>packageExecute</ns1:Name>
<ns1:StepId>8</ns1:StepId>
<ns0:InvokePlugin>
<ns0:PluginName>FlexagonShellPlugin</ns0:PluginName>
<ns0:PluginOperation>packageExecute</ns0:PluginOperation>
<ns0:EndpointInstanceOverrideExpression>false</ns0:EndpointInstanceOverrideExpression>
<ns0:InvokePluginTypeVersion>v2</ns0:InvokePluginTypeVersion>
<ns0:consumesArtifacts>true</ns0:consumesArtifacts>
<ns0:producesArtifacts>false</ns0:producesArtifacts>
<ns0:EndpointSelection>
<ns0:EndpointSelectionChoice>All</ns0:EndpointSelectionChoice>
</ns0:EndpointSelection>
<ns0:EndpointExecutionChoice>Any</ns0:EndpointExecutionChoice>
<ns0:PluginInputs>
<ns0:PluginInput>
<ns0:Name>FDSHELL_INP_CODE_SNIPPET</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
<ns0:Text>echo "Deployment Completed"</ns0:Text>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDSHELL_INP_STOP_ON_ERROR</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>Boolean</ns1:Type>
<ns0:Text>false</ns0:Text>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDSHELL_INP_DISABLE_ECHO</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>Boolean</ns1:Type>
<ns0:Text>false</ns0:Text>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDSHELL_INP_RESTRICT_ENVIRONMENT</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDSHELL_INP_NO_SECURE_VARIABLES</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>Boolean</ns1:Type>
<ns0:Text>false</ns0:Text>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDSHELL_INP_PERFORM_PROPERTY_REPLACEMENT</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>Boolean</ns1:Type>
<ns0:Text>false</ns0:Text>
</ns0:PluginInput>
</ns0:PluginInputs>
<ns0:UserInputs/>
<ns0:PluginOutputs/>
<ns0:UserOutputs/>
</ns0:InvokePlugin>
</ns0:Step>
</ns0:Steps>
</ns0:WorkFlow>
|
|
Project Configuration
Create a Project by choosing the Classification: Package-based and Project Types as Generic
...
Once it is created the Source Control needs to be configured, so that we can discover the files from the respective repository. This time the source control is the one where we have uploaded the ARM template.
...
Discover the files using File Catalog tab
...
Now we can create Package upon selecting specific ARM template which is to be deployed to the Target Synapse Workspace.
...
Click on the Configuration tab, select General and update the Build and Deploy workflows with respective Target group.
...
Parameterizing the values
There are many ways to do environment specific parameter value customization. 1) Using Replacement configuration of Project 2) Specifying the parameter as ${{}} in the source json file itself or the generated ARM template 3) Edit the generated ARM template to include the parameter as ARM template parameter. We will show option 2 in the following example.
Replacement configuration on Project
Starting 7.0 we have a new feature that allows us to replace a string in any file with another string based on as it is executed to different environment. Ref: Replacements - FlexDeploy 7.0 - Confluence (atlassian.net)
For our use-case a specific parameter as below is created in the Linked Service:
...
When this source workspace is integrated with GIT, the linked service json file gets auto-synced there. One can edit the parameter manually to hold the target group property as
...
Once this is done as shown earlier, the target group property will take care of replacing it with right environment specific value during deployment.
Target Group configuration
...
Build = for build execution; UAT = for deploy execution.
Build
...
UAT
...
The Environment Specific Variables field controls the target workspace name and several other environment specific parameters. To know more follow this link.
Follow this link to know about the Azure DevOps Release Pipeline configuration. This must be configured prior to configuring the FlexDeploy workflows and project properties.
Execution
Initiate Build on the selected Package. Once done initiate the Deploy. Build produces the ARM templates as a zip bundle, which Deploy further passes on to the Azure DevOps Release Pipeline to deploy to target workspace.
...
The Output tab of createRelease step would show the Azue DevOps Release URL to further see the log in more detail:
...
Post deployment if we verify the Linked Service in UAT workspace, we see the updated values in there.
Flow (Approach B)
Azure Devops pipeline configuration
More information is here
...
Workflow configuration
Build Workflow:
Expand |
---|
title | SynapsePackageBuildJSON |
---|
|
Code Block |
---|
<?xml version="1.0" encoding="Unicode"?>
<ns0:WorkFlow xmlns:ns1="http://flexagon.com/flexdeploy/workflow/common" xmlns:ns0="http://flexagon.com/flexdeploy/workflow">
<ns1:Name>SynapsePackageBuildJSON</ns1:Name>
<ns1:Description></ns1:Description>
<ns0:Steps>
<ns0:Step>
<ns1:Name>execute</ns1:Name>
<ns1:StepId>1</ns1:StepId>
<ns0:InvokePlugin>
<ns0:PluginName>FlexagonShellPlugin</ns0:PluginName>
<ns0:PluginOperation>execute</ns0:PluginOperation>
<ns0:EndpointInstanceOverrideExpression>false</ns0:EndpointInstanceOverrideExpression>
<ns0:InvokePluginTypeVersion>v2</ns0:InvokePluginTypeVersion>
<ns0:consumesArtifacts>false</ns0:consumesArtifacts>
<ns0:producesArtifacts>true</ns0:producesArtifacts>
<ns0:EndpointSelection>
<ns0:EndpointSelectionChoice>All</ns0:EndpointSelectionChoice>
</ns0:EndpointSelection>
<ns0:EndpointExecutionChoice>Any</ns0:EndpointExecutionChoice>
<ns0:PluginInputs>
<ns0:PluginInput>
<ns0:Name>FDSHELL_INP_CODE_SNIPPET</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
<ns0:Text># Define the name of the zip file to be created
ZIP_NAME=$FD_PROJECT_NAME.zip
# Find and zip all Template*.json files into a single zip file
zip -r "$ZIP_NAME" . -i *.json
cp $FD_TEMP_DIR/$ZIP_NAME $FD_ARTIFACTS_DIR
echo "Zip created and moved to artifacts."
</ns0:Text>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDSHELL_INP_STOP_ON_ERROR</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>Boolean</ns1:Type>
<ns0:Text>false</ns0:Text>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDSHELL_INP_DISABLE_ECHO</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>Boolean</ns1:Type>
<ns0:Text>false</ns0:Text>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDSHELL_INP_RESTRICT_ENVIRONMENT</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDSHELL_INP_NO_SECURE_VARIABLES</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>Boolean</ns1:Type>
<ns0:Text>false</ns0:Text>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDSHELL_INP_LOCK</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
</ns0:PluginInput>
</ns0:PluginInputs>
<ns0:UserInputs/>
<ns0:PluginOutputs/>
<ns0:UserOutputs/>
</ns0:InvokePlugin>
</ns0:Step>
</ns0:Steps>
</ns0:WorkFlow>
|
|
Deploy Workflow:
...
Info |
---|
Note: Here ${{BLOBWSPACE_TARGET}} is configured in the input json, which is why we are configuring it here as Target properties. |
Expand |
---|
title | SynapsePackageDeployJSON |
---|
|
Code Block |
---|
<?xml version="1.0" encoding="Unicode"?>
<ns0:WorkFlow xmlns:ns1="http://flexagon.com/flexdeploy/workflow/common" xmlns:ns0="http://flexagon.com/flexdeploy/workflow">
<ns1:Name>SynapsePackageDeployJSON</ns1:Name>
<ns1:Description></ns1:Description>
<ns0:Variables>
<ns0:Variable>
<ns1:Name>FINALVERSION</ns1:Name>
<ns1:Type>String</ns1:Type>
<ns0:returnAsOutput>true</ns0:returnAsOutput>
<ns1:isConstant>false</ns1:isConstant>
</ns0:Variable>
<ns0:Variable>
<ns1:Name>RELEASE_ID</ns1:Name>
<ns1:Type>String</ns1:Type>
<ns0:returnAsOutput>true</ns0:returnAsOutput>
<ns1:isConstant>false</ns1:isConstant>
</ns0:Variable>
<ns0:Variable>
<ns1:Name>ENVIRONMENT_ID</ns1:Name>
<ns1:Type>String</ns1:Type>
<ns0:returnAsOutput>true</ns0:returnAsOutput>
<ns1:isConstant>false</ns1:isConstant>
</ns0:Variable>
<ns0:Variable>
<ns1:Name>RELEASE_URL</ns1:Name>
<ns1:Type>String</ns1:Type>
<ns0:returnAsOutput>true</ns0:returnAsOutput>
<ns1:isConstant>false</ns1:isConstant>
</ns0:Variable>
<ns0:Variable>
<ns1:Name>PKG_NAME</ns1:Name>
<ns1:Type>String</ns1:Type>
<ns0:returnAsOutput>true</ns0:returnAsOutput>
<ns1:isConstant>false</ns1:isConstant>
</ns0:Variable>
<ns0:Variable>
<ns1:Name>ENV_DETAILS</ns1:Name>
<ns1:Type>String</ns1:Type>
<ns0:returnAsOutput>true</ns0:returnAsOutput>
<ns1:isConstant>false</ns1:isConstant>
</ns0:Variable>
</ns0:Variables>
<ns0:Steps>
<ns0:Step>
<ns1:Name>execute</ns1:Name>
<ns1:StepId>1</ns1:StepId>
<ns0:InvokePlugin>
<ns0:PluginName>FlexagonShellPlugin</ns0:PluginName>
<ns0:PluginOperation>execute</ns0:PluginOperation>
<ns0:EndpointInstanceOverrideExpression>false</ns0:EndpointInstanceOverrideExpression>
<ns0:InvokePluginTypeVersion>v2</ns0:InvokePluginTypeVersion>
<ns0:consumesArtifacts>true</ns0:consumesArtifacts>
<ns0:producesArtifacts>false</ns0:producesArtifacts>
<ns0:EndpointSelection>
<ns0:EndpointSelectionChoice>All</ns0:EndpointSelectionChoice>
</ns0:EndpointSelection>
<ns0:EndpointExecutionChoice>Any</ns0:EndpointExecutionChoice>
<ns0:PluginInputs>
<ns0:PluginInput>
<ns0:Name>FDSHELL_INP_CODE_SNIPPET</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
<ns0:Text>mkdir -p $FD_TEMP_DIR/JSONFiles
unzip $FD_ARTIFACTS_DIR/*.zip -d $FD_TEMP_DIR/JSONFiles</ns0:Text>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDSHELL_INP_STOP_ON_ERROR</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>Boolean</ns1:Type>
<ns0:Text>false</ns0:Text>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDSHELL_INP_DISABLE_ECHO</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>Boolean</ns1:Type>
<ns0:Text>false</ns0:Text>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDSHELL_INP_RESTRICT_ENVIRONMENT</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDSHELL_INP_NO_SECURE_VARIABLES</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>Boolean</ns1:Type>
<ns0:Text>false</ns0:Text>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDSHELL_INP_LOCK</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
</ns0:PluginInput>
</ns0:PluginInputs>
<ns0:UserInputs/>
<ns0:PluginOutputs/>
<ns0:UserOutputs/>
</ns0:InvokePlugin>
</ns0:Step>
<ns0:Step>
<ns1:Name>propertyReplacement</ns1:Name>
<ns1:StepId>2</ns1:StepId>
<ns0:InvokePlugin>
<ns0:PluginName>FlexagonFilePlugin</ns0:PluginName>
<ns0:PluginOperation>propertyReplacement</ns0:PluginOperation>
<ns0:EndpointInstanceOverrideExpression>false</ns0:EndpointInstanceOverrideExpression>
<ns0:InvokePluginTypeVersion>v2</ns0:InvokePluginTypeVersion>
<ns0:consumesArtifacts>false</ns0:consumesArtifacts>
<ns0:producesArtifacts>false</ns0:producesArtifacts>
<ns0:EndpointSelection>
<ns0:EndpointSelectionChoice>All</ns0:EndpointSelectionChoice>
</ns0:EndpointSelection>
<ns0:EndpointExecutionChoice>Any</ns0:EndpointExecutionChoice>
<ns0:PluginInputs>
<ns0:PluginInput>
<ns0:Name>FDFILE_INP_SOURCE_PATH</ns0:Name>
<ns0:ValueType>Expression</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
<ns0:Value>
<ns0:Expression>FD_TEMP_DIR + "/JSONFiles"</ns0:Expression>
</ns0:Value>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDFILE_INP_FILE_FILTER</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDFILE_INP_FILE_FILTER_EXCLUDED</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
</ns0:PluginInput>
</ns0:PluginInputs>
<ns0:UserInputs/>
<ns0:PluginOutputs/>
<ns0:UserOutputs/>
</ns0:InvokePlugin>
</ns0:Step>
<ns0:Step>
<ns1:Name>Assign</ns1:Name>
<ns1:StepId>3</ns1:StepId>
<ns0:Assign>
<ns0:From>
<ns0:Expression>PACKAGE_VERSION.substring(0,PACKAGE_VERSION.lastIndexOf(".") +1) + FD_WORKFLOW_EXECUTION_ID</ns0:Expression>
</ns0:From>
<ns0:To>FINALVERSION</ns0:To>
</ns0:Assign>
</ns0:Step>
<ns0:Step>
<ns1:Name>publishArtifacts</ns1:Name>
<ns1:StepId>4</ns1:StepId>
<ns0:InvokePlugin>
<ns0:PluginName>FlexagonAzurePlugin</ns0:PluginName>
<ns0:PluginOperation>publishArtifacts</ns0:PluginOperation>
<ns0:EndpointInstanceOverrideExpression>false</ns0:EndpointInstanceOverrideExpression>
<ns0:InvokePluginTypeVersion>v2</ns0:InvokePluginTypeVersion>
<ns0:consumesArtifacts>false</ns0:consumesArtifacts>
<ns0:producesArtifacts>false</ns0:producesArtifacts>
<ns0:EndpointSelection>
<ns0:EndpointSelectionChoice>All</ns0:EndpointSelectionChoice>
</ns0:EndpointSelection>
<ns0:EndpointExecutionChoice>Any</ns0:EndpointExecutionChoice>
<ns0:PluginInputs>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_FEED</ns0:Name>
<ns0:ValueType>Expression</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
<ns0:Value>
<ns0:Expression>FEED_NAME</ns0:Expression>
</ns0:Value>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_PACKAGE_NAME</ns0:Name>
<ns0:ValueType>Expression</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
<ns0:Value>
<ns0:Expression>(FD_PACKAGE_NAME + "-" + ARTIFACTS_PACKAGE_NAME + "-" + FD_ENVIRONMENT_CODE).toLowerCase()</ns0:Expression>
</ns0:Value>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_PACKAGE_VERSION</ns0:Name>
<ns0:ValueType>Expression</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
<ns0:Value>
<ns0:Expression>FINALVERSION</ns0:Expression>
</ns0:Value>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_PACKAGE_DESCRIPTION</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_PROJECT_NAME</ns0:Name>
<ns0:ValueType>Expression</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
<ns0:Value>
<ns0:Expression>PROJECT_NAME</ns0:Expression>
</ns0:Value>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_PACKAGE_PATH</ns0:Name>
<ns0:ValueType>Expression</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
<ns0:Value>
<ns0:Expression>FD_TEMP_DIR + "/JSONFiles"</ns0:Expression>
</ns0:Value>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_ADDITIONAL_PARAMS</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
</ns0:PluginInput>
</ns0:PluginInputs>
<ns0:UserInputs/>
<ns0:PluginOutputs>
<ns0:OutputValue>
<ns0:NameInCallee>FDAZ_DEVOPS_OUT_ERR</ns0:NameInCallee>
</ns0:OutputValue>
<ns0:OutputValue>
<ns0:NameInCallee>FDAZ_DEVOPS_OUT_RESP</ns0:NameInCallee>
</ns0:OutputValue>
</ns0:PluginOutputs>
<ns0:UserOutputs/>
</ns0:InvokePlugin>
</ns0:Step>
<ns0:Step>
<ns1:Name>createRelease</ns1:Name>
<ns1:StepId>5</ns1:StepId>
<ns0:InvokePlugin>
<ns0:PluginName>FlexagonAzurePlugin</ns0:PluginName>
<ns0:PluginOperation>createRelease</ns0:PluginOperation>
<ns0:EndpointInstanceOverrideExpression>false</ns0:EndpointInstanceOverrideExpression>
<ns0:InvokePluginTypeVersion>v2</ns0:InvokePluginTypeVersion>
<ns0:consumesArtifacts>false</ns0:consumesArtifacts>
<ns0:producesArtifacts>false</ns0:producesArtifacts>
<ns0:EndpointSelection>
<ns0:EndpointSelectionChoice>All</ns0:EndpointSelectionChoice>
</ns0:EndpointSelection>
<ns0:EndpointExecutionChoice>Any</ns0:EndpointExecutionChoice>
<ns0:PluginInputs>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_RELEASE_DEFINITION_ID</ns0:Name>
<ns0:ValueType>Expression</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
<ns0:Value>
<ns0:Expression>RELEASE_DEFINITION_ID</ns0:Expression>
</ns0:Value>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_ARTIFACTS_PAYLOAD</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_PROJECT_NAME</ns0:Name>
<ns0:ValueType>Expression</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
<ns0:Value>
<ns0:Expression>PROJECT_NAME</ns0:Expression>
</ns0:Value>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_VARIABLES_LIST</ns0:Name>
<ns0:ValueType>Expression</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
<ns0:Value>
<ns0:Expression>"{\"feedName\": {\"value\": \"" + PROJECT_NAME + "/" + FEED_NAME + "\"},\"packageName\": {\"value\": \"" + (FD_PACKAGE_NAME + "-" + ARTIFACTS_PACKAGE_NAME + "-" + FD_ENVIRONMENT_CODE).toLowerCase() + "\"},\"packageVersion\": {\"value\": \"" + FINALVERSION + "\"}}"</ns0:Expression>
</ns0:Value>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_PROPERTIES</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_MANUAL_ENVIRONMENTS</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_RELEASE_STATUS_CHECK</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>Boolean</ns1:Type>
<ns0:Text>false</ns0:Text>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_PARTIALLY_SUCCEEDED_ENVIRONMENTS</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
</ns0:PluginInput>
</ns0:PluginInputs>
<ns0:UserInputs/>
<ns0:PluginOutputs>
<ns0:OutputValue>
<ns0:NameInCallee>FDAZ_DEVOPS_OUT_RESP</ns0:NameInCallee>
</ns0:OutputValue>
<ns0:OutputValue>
<ns0:NameInCallee>FDAZ_DEVOPS_OUT_RELEASE_WEB_URL</ns0:NameInCallee>
</ns0:OutputValue>
<ns0:OutputValue>
<ns0:NameInCallee>FDAZ_DEVOPS_OUT_REL_ENV_STAGE_DETAILS</ns0:NameInCallee>
<ns0:NameInCaller>ENV_DETAILS</ns0:NameInCaller>
</ns0:OutputValue>
<ns0:OutputValue>
<ns0:NameInCallee>FDAZ_DEVOPS_OUT_RELEASE_ID</ns0:NameInCallee>
<ns0:NameInCaller>RELEASE_ID</ns0:NameInCaller>
</ns0:OutputValue>
</ns0:PluginOutputs>
<ns0:UserOutputs/>
</ns0:InvokePlugin>
</ns0:Step>
<ns0:Step>
<ns1:Name>parseJson</ns1:Name>
<ns1:StepId>6</ns1:StepId>
<ns0:InvokePlugin>
<ns0:PluginName>FlexagonXPathPlugin</ns0:PluginName>
<ns0:PluginOperation>parseJson</ns0:PluginOperation>
<ns0:EndpointInstanceOverrideExpression>false</ns0:EndpointInstanceOverrideExpression>
<ns0:InvokePluginTypeVersion>v2</ns0:InvokePluginTypeVersion>
<ns0:consumesArtifacts>false</ns0:consumesArtifacts>
<ns0:producesArtifacts>false</ns0:producesArtifacts>
<ns0:EndpointSelection>
<ns0:EndpointSelectionChoice>All</ns0:EndpointSelectionChoice>
</ns0:EndpointSelection>
<ns0:EndpointExecutionChoice>Any</ns0:EndpointExecutionChoice>
<ns0:PluginInputs>
<ns0:PluginInput>
<ns0:Name>FDP_SOURCE</ns0:Name>
<ns0:ValueType>Expression</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
<ns0:Value>
<ns0:Expression>ENV_DETAILS</ns0:Expression>
</ns0:Value>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDP_XPATH</ns0:Name>
<ns0:ValueType>Expression</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
<ns0:Value>
<ns0:Expression>'$..[?(@.name==\''+FD_ENVIRONMENT_NAME+'\')].id'</ns0:Expression>
</ns0:Value>
</ns0:PluginInput>
</ns0:PluginInputs>
<ns0:UserInputs/>
<ns0:PluginOutputs>
<ns0:OutputValue>
<ns0:NameInCallee>FDP_VALUE</ns0:NameInCallee>
<ns0:NameInCaller>ENVIRONMENT_ID</ns0:NameInCaller>
</ns0:OutputValue>
</ns0:PluginOutputs>
<ns0:UserOutputs/>
</ns0:InvokePlugin>
</ns0:Step>
<ns0:Step>
<ns1:Name>updateReleaseEnvStatus</ns1:Name>
<ns1:StepId>7</ns1:StepId>
<ns0:InvokePlugin>
<ns0:PluginName>FlexagonAzurePlugin</ns0:PluginName>
<ns0:PluginOperation>updateReleaseEnvStatus</ns0:PluginOperation>
<ns0:EndpointInstanceOverrideExpression>false</ns0:EndpointInstanceOverrideExpression>
<ns0:InvokePluginTypeVersion>v2</ns0:InvokePluginTypeVersion>
<ns0:consumesArtifacts>false</ns0:consumesArtifacts>
<ns0:producesArtifacts>false</ns0:producesArtifacts>
<ns0:EndpointSelection>
<ns0:EndpointSelectionChoice>All</ns0:EndpointSelectionChoice>
</ns0:EndpointSelection>
<ns0:EndpointExecutionChoice>Any</ns0:EndpointExecutionChoice>
<ns0:PluginInputs>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_RELEASE_ID</ns0:Name>
<ns0:ValueType>Expression</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>Integer</ns1:Type>
<ns0:Value>
<ns0:Expression>RELEASE_ID</ns0:Expression>
</ns0:Value>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_RELEASE_ENVIRONMENT_ID</ns0:Name>
<ns0:ValueType>Expression</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>Integer</ns1:Type>
<ns0:Value>
<ns0:Expression>ENVIRONMENT_ID.substring(1,ENVIRONMENT_ID.length()-1)</ns0:Expression>
</ns0:Value>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_PROJECT_NAME</ns0:Name>
<ns0:ValueType>Expression</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
<ns0:Value>
<ns0:Expression>PROJECT_NAME</ns0:Expression>
</ns0:Value>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_RELEASE_ENVIRONMENT_STATUS</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
<ns0:Text>InProgress</ns0:Text>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_VARIABLES_LIST</ns0:Name>
<ns0:ValueType>Expression</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
<ns0:Value>
<ns0:Expression>ENVIRONMENT_VARIABLES_LIST</ns0:Expression>
</ns0:Value>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_RELEASE_COMMENT</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_SCHEDULED_DEPLOYMENT_TIME</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_REL_ENV_STATUS_CHECK</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>Boolean</ns1:Type>
<ns0:Text>true</ns0:Text>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDAZ_DEVOPS_INP_PARTIALLY_SUCCEEDED_STATUS_CHECK</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>Boolean</ns1:Type>
<ns0:Text>false</ns0:Text>
</ns0:PluginInput>
</ns0:PluginInputs>
<ns0:UserInputs/>
<ns0:PluginOutputs>
<ns0:OutputValue>
<ns0:NameInCallee>FDAZ_DEVOPS_OUT_RESP</ns0:NameInCallee>
</ns0:OutputValue>
<ns0:OutputValue>
<ns0:NameInCallee>FDAZ_DEVOPS_OUT_REL_ENV_WEB_URL</ns0:NameInCallee>
<ns0:NameInCaller>RELEASE_URL</ns0:NameInCaller>
</ns0:OutputValue>
</ns0:PluginOutputs>
<ns0:UserOutputs/>
</ns0:InvokePlugin>
</ns0:Step>
<ns0:Step>
<ns1:Name>packageExecute</ns1:Name>
<ns1:StepId>8</ns1:StepId>
<ns0:InvokePlugin>
<ns0:PluginName>FlexagonShellPlugin</ns0:PluginName>
<ns0:PluginOperation>packageExecute</ns0:PluginOperation>
<ns0:EndpointInstanceOverrideExpression>false</ns0:EndpointInstanceOverrideExpression>
<ns0:InvokePluginTypeVersion>v2</ns0:InvokePluginTypeVersion>
<ns0:consumesArtifacts>true</ns0:consumesArtifacts>
<ns0:producesArtifacts>false</ns0:producesArtifacts>
<ns0:EndpointSelection>
<ns0:EndpointSelectionChoice>All</ns0:EndpointSelectionChoice>
</ns0:EndpointSelection>
<ns0:EndpointExecutionChoice>Any</ns0:EndpointExecutionChoice>
<ns0:PluginInputs>
<ns0:PluginInput>
<ns0:Name>FDSHELL_INP_CODE_SNIPPET</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
<ns0:Text>echo "Deployment Completed"</ns0:Text>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDSHELL_INP_STOP_ON_ERROR</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>Boolean</ns1:Type>
<ns0:Text>false</ns0:Text>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDSHELL_INP_DISABLE_ECHO</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>Boolean</ns1:Type>
<ns0:Text>false</ns0:Text>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDSHELL_INP_RESTRICT_ENVIRONMENT</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>String</ns1:Type>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDSHELL_INP_NO_SECURE_VARIABLES</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>Boolean</ns1:Type>
<ns0:Text>false</ns0:Text>
</ns0:PluginInput>
<ns0:PluginInput>
<ns0:Name>FDSHELL_INP_PERFORM_PROPERTY_REPLACEMENT</ns0:Name>
<ns0:ValueType>Text</ns0:ValueType>
<ns0:Encrypted>false</ns0:Encrypted>
<ns1:Type>Boolean</ns1:Type>
<ns0:Text>false</ns0:Text>
</ns0:PluginInput>
</ns0:PluginInputs>
<ns0:UserInputs/>
<ns0:PluginOutputs/>
<ns0:UserOutputs/>
</ns0:InvokePlugin>
</ns0:Step>
</ns0:Steps>
</ns0:WorkFlow>
|
|
Project Configuration
Create a Project say SelectiveJsonDeployment, by choosing the Classification: Package-based and Project Types as Generic
...
Once it is created the Source Control needs to be configured, so that we can discover the files from the respective repository.
Note: These files are from the GIT integrated workspace that we use in Synapse for DEV environment.
...
For example, this is how the source control in Project looks like:
...
Project Properties
...
Info |
---|
Note: These are the values from the Azure DevOps Feed, Project Name that you already have configured. We have explained their configuration more here. |
Discover the files using File Catalog tab
...
Now we can create Package upon selecting specific files.
For example, here we chose two pipelines and a linked service to form the package called abstractdemo.
...
Click on the Configuration tab, select General and map the Build and Deploy workflows along with respective Target group.
...
Target Group configuration
...
Build = for build execution; UAT = for deploy execution.
Build
...
UAT
...
The Environment Specific Variables field controls the target workspace name and several other environment specific parameters. To know more follow this link.
Execution
Initiate Build on the selected Package abstractdemo.
Info |
---|
**Note: The ARM templates are published to Azure DevOps Feed as Artifacts with the package name as a keyword in it. Example: <packagename>-<fdprojectname>-json-<environmentcode>. Now Microsoft has certain restrictions on the naming of the Azure Artifacts, hence please follow the guide before you name the package that you create in FD or else adjust your workflow to be in compliance. https://learn.microsoft.com/en-us/azure/devops/organizations/settings/naming-restrictions?view=azure-devops |
...
It creates the artifacts with the zip bundle of json files.
Initiate Deploy on the built version.
...
Clicking on the createRelease step’s Output tab, you would find the release url of Azure DevOps Release pipeline. Navigating to that shows more log:
...