Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Now let's talk about Extract WebCatalog workflow. This workflow will execute 6 steps as shown below.

  1. Clone git repository where objects are stored.
  2. Extract WebCatalog files in to local git repository folder. Extract will be generally done from development environment. Based Number of objects extracted will depend on whether All Files or Package build is executing, number of objects will be extracted.
  3. Clone git repository where objects are stored.
  4. Copy files extracted in step 1 to cloned repository.
  5. Add any new files in local git repository.
  6. Commit any changes to local git repository. It is possible that nothing is found to commit if there were no changes on development server.
  7. Push changes to remote repository.

Image Modified

Here is source code for the workflow. You will need to update this workflow to indicate project Git instance code and sparse checkout folder for catalog objects. Also, keep in mind that we are running this build against master branch(stream), if you want to commit on different branch then create stream on project appropriately.

Code Block
<?xml version="1.0" encoding="UTF-8"?>
<ns0:WorkFlow xmlns:ns1="http://flexagon.com/flexdeploy/workflow/common" xmlns:ns0="http://flexagon.com/flexdeploy/workflow">
   <ns1:Name>Extract WebCatalog</ns1:Name>
   <ns1:Description></ns1:Description>
   <ns0:Steps>
      <ns0:Step>
         <ns1:Name>obiBuild<Name>Git Clone</ns1:Name>
         <ns1:StepId>1</ns1:StepId>
         <ns0:InvokePlugin>
            <ns0:PluginName>FlexagonOBIEEPlugin<PluginName>FlexagonGITPlugin</ns0:PluginName>
            <ns0:PluginOperation>obiBuild<PluginOperation>clone</ns0:PluginOperation>
            <ns0:consumesArtifacts>false</ns0:consumesArtifacts>
            <ns0:producesArtifacts>false</ns0:producesArtifacts>
            <ns0:PluginInputs>
               <ns0:PluginInput>
                  <ns0:Name>FDOBIEEName>FDGIT_INP_COPYINSTANCE_PERMISSIONS<CODE</ns0:Name>
                  <ns0:ValueType>Text</ns0:ValueType>
                  <ns0:Encrypted>false</ns0:Encrypted>
                  <ns1:Type>Boolean<Type>String</ns1:Type>
                  <ns0:Text>true<Text>GITDEMO</ns0:Text>
               </ns0:PluginInput>
               <ns0:PluginInput>
                  <ns0:Name>FDOBIEEName>FDGIT_INP_RECURSIVEDEST_CAT_BUILD<SUBFOLDER</ns0:Name>
                  <ns0:ValueType>Text</ns0:ValueType>
                  <ns0:Encrypted>false</ns0:Encrypted>
                  <ns1:Type>Boolean<Type>String</ns1:Type>
                  <ns0:Text>true<Text>../obieefiles</ns0:Text>
               </ns0:PluginInput>
               </ns0<ns0:PluginInputs>PluginInput>
            <ns0:UserInputs/>      <ns0:Name>FDGIT_INP_BRANCH</ns0:Name>
      <ns0:PluginOutputs/>             <ns0:UserOutputs/>ValueType>Expression</ns0:ValueType>
           </ns0:InvokePlugin>       <<ns0:Encrypted>false</ns0:Step>Encrypted>
        <ns0:Step>          <ns1:Name>Git Clone<Type>String</ns1:Name>Type>
            <ns1:StepId>2</ns1:StepId>
         <ns0:InvokePlugin>
Value>
           <ns0:PluginName>FlexagonGITPlugin</ns0:PluginName>             <ns0:PluginOperation>clone<Expression>FDBLD_STREAM_NAME</ns0:PluginOperation>Expression>
            <ns0:consumesArtifacts>false</ns0:consumesArtifacts>      </ns0:Value>
      <ns0:producesArtifacts>false</ns0:producesArtifacts>             <ns0:PluginInputs></ns0:PluginInput>
               <ns0:PluginInput>
                  <ns0:Name>FDGIT_INP_INSTANCE_CODE<DEPTH</ns0:Name>
                  <ns0:ValueType>Text</ns0:ValueType>
                  <ns0:Encrypted>false</ns0:Encrypted>
                  <ns1:Type>String<Type>Integer</ns1:Type>
                  <ns0:Text>GITDEMO<Text>1</ns0:Text>
               </ns0:PluginInput>
               <ns0:PluginInput>
                  <ns0:Name>FDGIT_INP_DESTSPARSE_CHECKOUT_SUBFOLDER<FOLDERS</ns0:Name>
                  <ns0:ValueType>Text</ns0:ValueType>
                  <ns0:Encrypted>false</ns0:Encrypted>
                  <ns1:Type>String</ns1:Type>
                  <ns0:Text>../obieefiles<Text>OBIEECatalog</ns0:Text>
               </ns0:PluginInput>
            </ns0:PluginInputs>
  <ns0:PluginInput>          <ns0:UserInputs/>
        <ns0:Name>FDGIT_INP_BRANCH</ns0:Name>      <ns0:PluginOutputs/>
            <ns0:ValueType>Expression<UserOutputs/ns0:ValueType>>
         </ns0:InvokePlugin>
        <ns0:Encrypted>false<</ns0:Encrypted>Step>
      <ns0:Step>
           <ns1:Type>String<Name>obiExtractForSCM</ns1:Type>Name>
         <ns1:StepId>2</ns1:StepId>
         <ns0:Value>InvokePlugin>
            <ns0:PluginName>FlexagonOBIEEPlugin</ns0:PluginName>
            <ns0:Expression>FDBLD_STREAM_NAME<PluginOperation>obiExtractForSCM</ns0:Expression>PluginOperation>
                  </ns0:Value>
               <<ns0:consumesArtifacts>false</ns0:PluginInput>consumesArtifacts>
               <ns0:PluginInput>
                  <ns0:Name>FDGIT_INP_DEPTH<<ns0:producesArtifacts>false</ns0:Name>producesArtifacts>
                  <ns0:ValueType>Text</ns0:ValueType>
                  <ns0:Encrypted>false</ns0:Encrypted>
                  <ns1:Type>Integer</ns1:Type>
                  <ns0:Text>1</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:Text>OBIEECatalog</ns0:Text>
               </ns0:PluginInput>
            </ns0:PluginInputs>
            <ns0:UserInputs/>
            <ns0:PluginOutputs/>
            <ns0:UserOutputs/>
         </ns0:InvokePlugin>
      </ns0:Step>
      <ns0:Step>
         <ns1:Name>Copy downloaded files to Git Repository</ns1:Name>
         <ns1:StepId>3</ns1:StepId>
         <ns0:InvokePlugin>
            <ns0:PluginName>FlexagonShellPlugin</ns0:PluginName>
            <ns0:PluginOperation>partialExecute</ns0:PluginOperation>
            <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># copy files from FD_TEMP_DIR to FD_TEMP_DIR + '/../obieefiles/OBIEECatalog'
# copy and at same time apply extension to file also.

SOURCE_FILE_MODIFIED=`echo "${SOURCE_FILE/:/%3a}"`
EXT=$FILE_EXTENSION
SOURCE_EXT_WITH_DOT=""
if [ "$OBJECT_TYPE_CODE" = "FOLDER" ]
then
    EXT="fldr"
    SOURCE_EXT_WITH_DOT=".catalog"
fi
if [ "$OBJECT_TYPE_CODE" = "ANALYSIS" ]
then
    EXT="anlys"
fi
if [ "$OBJECT_TYPE_CODE" = "DASHBOARD" ]
then
    EXT="db"
fi
if [ "$OBJECT_TYPE_CODE" = "DASHBOARD_PROMPT" ]
then
    EXT="dbp"
fi
if [ "$OBJECT_TYPE_CODE" = "REPORT" ]
then
    EXT="rprt"
fi
if [ "$OBJECT_TYPE_CODE" = "DATAMODEL" ]
then
    EXT="dm"
fi
if [ "$OBJECT_TYPE_CODE" = "STYLE_TEMPLATE" ]
then
    EXT="st"
fi
if [ "$OBJECT_TYPE_CODE" = "METADATA" ]
then
    EXT="md"
fi
if [ "$OBJECT_TYPE_CODE" = "KPI" ]
then
    EXT="kpi"
fi
if [ "$OBJECT_TYPE_CODE" = "FILTER" ]
then
    EXT="fltr"
fi
mkdir -p "$FD_TEMP_DIR/../obieefiles/OBIEECatalog$FILE_PATH_PREFIX"
TARGET_FILE=$FD_TEMP_DIR/../obieefiles/OBIEECatalog$FILE_PATH_PREFIX/$FILE_NAME.$EXT
if [ "$OBJECT_TYPE_CODE" = "OTHER" ]
then
    TARGET_FILE=$FD_TEMP_DIR/../obieefiles/OBIEECatalog$FILE_PATH_PREFIX/$FILE_NAME
fi
echo "Source file is $SOURCE_FILE_MODIFIED$SOURCE_EXT_WITH_DOT"
echo "Target file is $TARGET_FILE"
cp "$SOURCE_FILE_MODIFIED$SOURCE_EXT_WITH_DOT" "$TARGET_FILE"</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>true</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>true</ns0:Text>
               </ns0:PluginInput><ns0:PluginInputs>
               <ns0:PluginInput>
                  <ns0:Name>FDSHELLName>FDOBIEE_INP_RESTRICTEXPORT_ENVIRONMENT<FOLDER</ns0:Name>
                  <ns0:ValueType>Expression<ValueType>Text</ns0:ValueType>
                  <ns0:Encrypted>false</ns0:Encrypted>
                  <ns1:Type>String</ns1:Type>
                  <ns0:Value>
                     <ns0:Expression>FD_INSTANCE_CODE</ns0:Expression>
                  </ns0:Value>Text>../obieefiles/OBIEECatalog</ns0:Text>
               </ns0:PluginInput>
               <ns0:PluginInput>
                  <ns0:Name>FDSHELLName>FDOBIEE_INP_NOCOPY_SECURE_VARIABLES<PERMISSIONS</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 any new Files</ns1:Name>
         <ns1:StepId>4</ns1:StepId>
         <ns0:InvokePlugin>
            <ns0:PluginName>FlexagonGITPlugin</ns0:PluginName>
            <ns0:PluginOperation>add</ns0:PluginOperation>
            <ns0:consumesArtifacts>false</ns0:consumesArtifacts>
            <ns0:producesArtifacts>false</ns0:producesArtifacts>
            <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>GITDEMO</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>../obieefiles</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>--all .</ns0:Text>
               </ns0:PluginInput>
            </ns0:PluginInputs>
            <ns0:UserInputs/>
            <ns0:PluginOutputs/>
            <ns0:UserOutputs/>
         </ns0:InvokePlugin>
      </ns0:Step>
      <ns0:Step>
         <ns1:Name>Commit to Git</ns1:Name>
         <ns1:StepId>5</ns1:StepId>
         <ns0:InvokePlugin>
            <ns0:PluginName>FlexagonGITPlugin</ns0:PluginName>
            <ns0:PluginOperation>commit</ns0:PluginOperation>
            <ns0:consumesArtifacts>false</ns0:consumesArtifacts>
            <ns0:producesArtifacts>false</ns0:producesArtifacts>
            <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>GITDEMO</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>../obieefiles</ns0:Text>
               </ns0:PluginInput>
               <ns0:PluginInput>
                  <ns0:Name>FDGIT_INP_NAME</ns0:Name>
                  <ns0:ValueType>Expression</ns0:ValueType>
                  <ns0:Encrypted>false</ns0:Encrypted>
                  <ns1:Type>String</ns1:Type>
                  <ns0:Value>
                     <ns0:Expression>FD_WF_USER</ns0:Expression>
                  </ns0:Value>
               </ns0:PluginInput>
               <ns0:PluginInput>
                  <ns0:Name>FDGIT_INP_EMAIL</ns0:Name>
                  <ns0:ValueType>Expression</ns0:ValueType>
                  <ns0:Encrypted>false</ns0:Encrypted>
                  <ns1:Type>String</ns1:Type>
                  <ns0:Value>
                     <ns0:Expression>FD_WF_USER_EMAIL</ns0:Expression>
                  </ns0:Value>
               </ns0:PluginInput>
               <ns0:PluginInput>
                  <ns0:Name>FDGIT_INP_REVISION_MESSAGE</ns0:Name>
                  <ns0:ValueType>Text</ns0:ValueType>
                  <ns0:Encrypted>false</ns0:Encrypted>
                  <ns1:Type>String</ns1:Type>
                  <ns0:Text>new obiee files</ns0:Text>
               </ns0:PluginInput>
            </ns0:PluginInputs>
            <ns0:UserInputs/>
            <ns0:PluginOutputs/>
            <ns0:UserOutputs/>
         </ns0:InvokePlugin>
      </ns0:Step>
      <ns0:Step>
         <ns1:Name>Push to Central Repository</ns1:Name>
         <ns1:StepId>6</ns1:StepId>
         <ns0:InvokePlugin>
            <ns0:PluginName>FlexagonGITPlugin</ns0:PluginName>
            <ns0:PluginOperation>push</ns0:PluginOperation>
            <ns0:consumesArtifacts>false</ns0:consumesArtifacts>
            <ns0:producesArtifacts>false</ns0:producesArtifacts>
            <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>GITDEMO</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>../obieefiles</ns0:Text>
               </ns0:PluginInput>
               <ns0:PluginInput>
                  <ns0:Name>FDGIT_INP_BRANCH</ns0:Name>
                  <ns0:ValueType>Expression</ns0:ValueType>
                  <ns0:Encrypted>false</ns0:Encrypted>
                  <ns1:Type>String</ns1:Type>
                  <ns0:Value>
                     <ns0:Expression>FDBLD_STREAM_NAME</ns0:Expression>
                  </ns0:Value>
               </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>