Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Objective

We have previously specified how Azure Synapse Artifacts deployment can be achieved using FlexDeploy in this article. In the current article we are going to elaborate more on how to implement package-based deployment for the same.

Design

There are two approaches we follow here:

  • Approach A: (Recommended)

First Phase - Configuring a Generic Package based project. Select the JSON objects (say Linked Services, Pipeline etc.), generate the ARM template based on the selected resources and store it in a repository. This repository may contain all the ARM templates corresponding to different packages. Will showcase it later in this tutorial.

Second Phase - Configuring another package-based project that will fetching the ARM template from the repository as specified in previous phase and initiate the Synapse Release pipeline to deploy them to target workspaces.

The benefit of the second approach is there would be more control over the ARM template which can be edited as needed by adding a new parameter or variables etc.

  • Approach B:

Configuring a Generic Package based project. Select the JSON objects (say Linked Services, Pipeline etc.), generate the ARM template based on the selected resources and deploy the ARM template to target workspaces. In this case the customization on parameters needs to be directly done on the JSON files by the user.

Flow (Approach A)

Workflow configuration for generating ARM template and upload to Repository

Build Workflow:

Note: For uploading the ARM template to repository, we have created another DevOps repository as az-synapse-arm and configured it in FlexDeploy-Integration with the code SYNAPSEARM.

If you have some other repository present in GITHUB or Azure DevOps anywhere and want to use that, then please create accordingly and use the correct Instance Code in the workflow pasted below.

image-20240329-080026.png
 GenerateARMAndSyncToGIT
<?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>GenerateARMAndSyncToGIT</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>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># Source directory (parent directory A)
SRC_DIR=$FD_TEMP_DIR

# Target directory (parent directory B)
DEST_DIR=$FD_TEMP_DIR/JSON

mkdir -p $FD_TEMP_DIR/JSON
chmod -R 777 $FD_TEMP_DIR/JSON

# Copy .json files while preserving directory structure
find &quot;$SRC_DIR&quot; -type f -name &quot;*.json&quot; | while read -r file; do
    # Get the directory path relative to the source
    rel_path=$(dirname &quot;${file#$SRC_DIR/}&quot;)
    
    # Create the same directory structure in the target
    mkdir -p &quot;$DEST_DIR/$rel_path&quot;
    
    # Copy the file to the target directory
    cp &quot;$file&quot; &quot;$DEST_DIR/$rel_path&quot;
done

echo &quot;All JSON files have been copied successfully.&quot;</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>publishArtifacts</ns1:Name>
         <ns1:StepId>2</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>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>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 + &quot;-&quot; + ARTIFACTS_PACKAGE_NAME).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>PACKAGE_VERSION</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 + &quot;/JSON&quot;</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>buildPipeline</ns1:Name>
         <ns1:StepId>3</ns1:StepId>
         <ns0:InvokePlugin>
            <ns0:PluginName>FlexagonAzurePlugin</ns0:PluginName>
            <ns0:PluginOperation>buildPipeline</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_BUILD_DEFINITION_ID</ns0:Name>
                  <ns0:ValueType>Text</ns0:ValueType>
                  <ns0:Encrypted>false</ns0:Encrypted>
                  <ns1:Type>String</ns1:Type>
                  <ns0:Text></ns0:Text>
               </ns0:PluginInput>
               <ns0:PluginInput>
                  <ns0:Name>FDAZ_DEVOPS_INP_DEFINITION_NAME</ns0:Name>
                  <ns0:ValueType>Expression</ns0:ValueType>
                  <ns0:Encrypted>false</ns0:Encrypted>
                  <ns1:Type>String</ns1:Type>
                  <ns0:Value>
                     <ns0:Expression>BUILD_DEFINITION_NAME</ns0:Expression>
                  </ns0:Value>
               </ns0:PluginInput>
               <ns0:PluginInput>
                  <ns0:Name>FDAZ_DEVOPS_INP_QUEUE_ID</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_COMMIT_ID</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_BRANCH_NAME</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>&quot;workspaceName:cicd-demo-test##artifactsPackageName:&quot; + (FD_PACKAGE_NAME + &quot;-&quot; + ARTIFACTS_PACKAGE_NAME).toLowerCase() + &quot;##feedName:&quot; + PROJECT_NAME + &quot;/&quot; + 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 + &quot;-&quot; + PACKAGE_NAME).toLowerCase()</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:OutputValue>
                  <ns0:NameInCallee>FDAZ_DEVOPS_OUT_BUILD_PIPELINE_WEB_URL</ns0:NameInCallee>
               </ns0:OutputValue>
            </ns0:PluginOutputs>
            <ns0:UserOutputs/>
         </ns0:InvokePlugin>
      </ns0:Step>
      <ns0:Step>
         <ns1:Name>downloadArtifacts</ns1:Name>
         <ns1:StepId>4</ns1:StepId>
         <ns0:InvokePlugin>
            <ns0:PluginName>FlexagonAzurePlugin</ns0:PluginName>
            <ns0:PluginOperation>downloadArtifacts</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>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 + &quot;-&quot; + PACKAGE_NAME).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>PACKAGE_VERSION</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_PACKAGE_PATH</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_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>clone</ns1:Name>
         <ns1:StepId>5</ns1:StepId>
         <ns0:InvokePlugin>
            <ns0:PluginName>FlexagonGITPlugin</ns0:PluginName>
            <ns0:PluginOperation>clone</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>FDGIT_INP_INSTANCE_CODE</ns0:Name>
                  <ns0:ValueType>Text</ns0:ValueType>
                  <ns0:Encrypted>false</ns0:Encrypted>
                  <ns1:Type>String</ns1:Type>
                  <ns0:Text>SYNAPSEARM</ns0:Text>
               </ns0:PluginInput>
               <ns0:PluginInput>
                  <ns0:Name>FDGIT_INP_DEST_SUBFOLDER</ns0:Name>
                  <ns0:ValueType>Text</ns0:ValueType>
                  <ns0:Encrypted>false</ns0:Encrypted>
                  <ns1:Type>String</ns1:Type>
                  <ns0:Text>ARMTemplates</ns0:Text>
               </ns0:PluginInput>
               <ns0:PluginInput>
                  <ns0:Name>FDGIT_INP_BRANCH</ns0:Name>
                  <ns0:ValueType>Text</ns0:ValueType>
                  <ns0:Encrypted>false</ns0:Encrypted>
                  <ns1:Type>String</ns1:Type>
                  <ns0:Text>importedartifacts</ns0:Text>
               </ns0:PluginInput>
               <ns0:PluginInput>
                  <ns0:Name>FDGIT_INP_TREELESS_CLONE</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>FDGIT_INP_DEPTH</ns0:Name>
                  <ns0:ValueType>Text</ns0:ValueType>
                  <ns0:Encrypted>false</ns0:Encrypted>
                  <ns1:Type>Integer</ns1:Type>
                  <ns0:Text></ns0:Text>
               </ns0:PluginInput>
               <ns0:PluginInput>
                  <ns0:Name>FDGIT_INP_SPARSE_CHECKOUT_FOLDERS</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>copy</ns1:Name>
         <ns1:StepId>6</ns1:StepId>
         <ns0:InvokePlugin>
            <ns0:PluginName>FlexagonFilePlugin</ns0:PluginName>
            <ns0:PluginOperation>copy</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_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: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_ARTIFACTS_DIR</ns0:Expression>
                  </ns0:Value>
               </ns0:PluginInput>
               <ns0:PluginInput>
                  <ns0:Name>FDFILE_INP_TARGET_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+&quot;/ARMTemplates/&quot;+FD_PACKAGE_NAME</ns0:Expression>
                  </ns0:Value>
               </ns0:PluginInput>
               <ns0:PluginInput>
                  <ns0:Name>FDFILE_INP_CLEAN_DIRECTORY</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:PluginInputs>
            <ns0:UserInputs/>
            <ns0:PluginOutputs/>
            <ns0:UserOutputs/>
         </ns0:InvokePlugin>
      </ns0:Step>
      <ns0:Step>
         <ns1:Name>add</ns1:Name>
         <ns1:StepId>7</ns1:StepId>
         <ns0:InvokePlugin>
            <ns0:PluginName>FlexagonGITPlugin</ns0:PluginName>
            <ns0:PluginOperation>add</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>FDGIT_INP_INSTANCE_CODE</ns0:Name>
                  <ns0:ValueType>Text</ns0:ValueType>
                  <ns0:Encrypted>false</ns0:Encrypted>
                  <ns1:Type>String</ns1:Type>
                  <ns0:Text>SYNAPSEARM</ns0:Text>
               </ns0:PluginInput>
               <ns0:PluginInput>
                  <ns0:Name>FDGIT_INP_DEST_SUBFOLDER</ns0:Name>
                  <ns0:ValueType>Text</ns0:ValueType>
                  <ns0:Encrypted>false</ns0:Encrypted>
                  <ns1:Type>String</ns1:Type>
                  <ns0:Text>ARMTemplates</ns0:Text>
               </ns0:PluginInput>
               <ns0:PluginInput>
                  <ns0:Name>FDGIT_INP_FILELIST</ns0:Name>
                  <ns0:ValueType>Text</ns0:ValueType>
                  <ns0:Encrypted>false</ns0:Encrypted>
                  <ns1:Type>String</ns1:Type>
                  <ns0:Text>.</ns0:Text>
               </ns0:PluginInput>
            </ns0:PluginInputs>
            <ns0:UserInputs/>
            <ns0:PluginOutputs/>
            <ns0:UserOutputs/>
         </ns0:InvokePlugin>
      </ns0:Step>
      <ns0:Step>
         <ns1:Name>commit</ns1:Name>
         <ns1:StepId>8</ns1:StepId>
         <ns0:InvokePlugin>
            <ns0:PluginName>FlexagonGITPlugin</ns0:PluginName>
            <ns0:PluginOperation>commit</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>FDGIT_INP_INSTANCE_CODE</ns0:Name>
                  <ns0:ValueType>Text</ns0:ValueType>
                  <ns0:Encrypted>false</ns0:Encrypted>
                  <ns1:Type>String</ns1:Type>
                  <ns0:Text>SYNAPSEARM</ns0:Text>
               </ns0:PluginInput>
               <ns0:PluginInput>
                  <ns0:Name>FDGIT_INP_DEST_SUBFOLDER</ns0:Name>
                  <ns0:ValueType>Text</ns0:ValueType>
                  <ns0:Encrypted>false</ns0:Encrypted>
                  <ns1:Type>String</ns1:Type>
                  <ns0:Text>ARMTemplates</ns0:Text>
               </ns0:PluginInput>
               <ns0:PluginInput>
                  <ns0:Name>FDGIT_INP_NAME</ns0:Name>
                  <ns0:ValueType>Text</ns0:ValueType>
                  <ns0:Encrypted>false</ns0:Encrypted>
                  <ns1:Type>String</ns1:Type>
               </ns0:PluginInput>
               <ns0:PluginInput>
                  <ns0:Name>FDGIT_INP_EMAIL</ns0:Name>
                  <ns0:ValueType>Text</ns0:ValueType>
                  <ns0:Encrypted>false</ns0:Encrypted>
                  <ns1:Type>String</ns1:Type>
               </ns0:PluginInput>
               <ns0:PluginInput>
                  <ns0:Name>FDGIT_INP_REVISION_MESSAGE</ns0:Name>
                  <ns0:ValueType>Expression</ns0:ValueType>
                  <ns0:Encrypted>false</ns0:Encrypted>
                  <ns1:Type>String</ns1:Type>
                  <ns0:Value>
                     <ns0:Expression>&quot;ARM Template updated: &quot;+ FD_PROJECT_VERSION</ns0:Expression>
                  </ns0:Value>
               </ns0:PluginInput>
            </ns0:PluginInputs>
            <ns0:UserInputs/>
            <ns0:PluginOutputs/>
            <ns0:UserOutputs/>
         </ns0:InvokePlugin>
      </ns0:Step>
      <ns0:Step>
         <ns1:Name>push</ns1:Name>
         <ns1:StepId>9</ns1:StepId>
         <ns0:InvokePlugin>
            <ns0:PluginName>FlexagonGITPlugin</ns0:PluginName>
            <ns0:PluginOperation>push</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>FDGIT_INP_INSTANCE_CODE</ns0:Name>
                  <ns0:ValueType>Text</ns0:ValueType>
                  <ns0:Encrypted>false</ns0:Encrypted>
                  <ns1:Type>String</ns1:Type>
                  <ns0:Text>SYNAPSEARM</ns0:Text>
               </ns0:PluginInput>
               <ns0:PluginInput>
                  <ns0:Name>FDGIT_INP_DEST_SUBFOLDER</ns0:Name>
                  <ns0:ValueType>Text</ns0:ValueType>
                  <ns0:Encrypted>false</ns0:Encrypted>
                  <ns1:Type>String</ns1:Type>
                  <ns0:Text>ARMTemplates</ns0:Text>
               </ns0:PluginInput>
               <ns0:PluginInput>
                  <ns0:Name>FDGIT_INP_BRANCH</ns0:Name>
                  <ns0:ValueType>Text</ns0:ValueType>
                  <ns0:Encrypted>false</ns0:Encrypted>
                  <ns1:Type>String</ns1:Type>
                  <ns0:Text>importedartifacts</ns0:Text>
               </ns0:PluginInput>
               <ns0:PluginInput>
                  <ns0:Name>FDGIT_INP_FOLLOW_TAGS</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>
image-20241022-075449.png

Project Configuration

Create a Project by choosing the Classification: Package-based and Project Types as Generic

image-20240329-064826.png

Once it is created the Source Control needs to be configured, so that we can discover the files from the respective repository.

image-20241021-161920.png

For example, this is how the source control looks like:

image-20241021-162047.png

Discover the files using File Catalog tab

image-20241021-162149.png

Now we can create Package upon selecting specific JSON files.

image-20241021-162322.png

Click on the Configuration tab, select General and update the Build workflow with respective Target group.

image-20241021-162429.png

We are not configuring any Deploy workflow in this Project for the purpose of this Tutorial, as all we need is to generate the ARM template and upload it to GIT.

Project properties

image-20241021-162955.png

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.

Execution

Initiate Build on the selected Package.

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 & <packagename>-<fdprojectname>-arm. 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

The ARM template is now uploaded to repository

image-20241021-163546.png

The folder name is following the naming we selected for the package name in FD. If any parameter is to be added/updated or some other manipulation is to be done in the ARM template json in terms of variables or parameters, it can be done. But the integrity of the ARM template should remain intact.

Workflow configuration for fetching the ARM template from the repository and initiate the Synapse Release pipeline

  • No labels