Versions Compared

Key

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

...

If there is no Git on an endpoint which is used for build, what can be done? Let's checkout files on Local instance (FlexDeploy) then copy it to the endpoint.

The instructions assume that DEV is the environment Code that you are trying to build from. If you use another, then please use that instead.

Instructions

  1. Create Local instance.

  2. Map Local instance to DEV environment.

  3. Make sure to map LOCALHOST endpoint to LOCAL - DEV environment instance.

 Here is workflow code.

...

Workflow code in YAML (8.0 onwards)

Code Block
name: Export on FlexDeploy Server
description: This is useful when there is no Git on development server to perform
  build.
steps:
- id: '1'
  name: Clone on FlexDeploy Server
  type: INVOKE_PLUGIN
  data:
    pluginName: FlexagonGITPlugin
    pluginOperation: cloneProjectSources
    endpointInstanceOverride:
      value: LOCAL
      isExpression: false
    consumesArtifacts: false
    producesArtifacts: false
    endpointSelection:
      choice: All
    endpointExecution:
      choice: Any
      stopOnError: false
    inputs: [
      ]
    outputs: [
      ]
    userInputs: [
      ]
    userOutputs: [
      ]
- id: '2'
  name: Copy to Transfer on FlexDeploy Server
  type: INVOKE_PLUGIN
  data:
    pluginName: FlexagonShellPlugin
    pluginOperation: execute
    endpointInstanceOverride:
      value: LOCAL
      isExpression: false
    consumesArtifacts: false
    producesArtifacts: false
    endpointSelection:
      choice: All
    endpointExecution:
      choice: Any
      stopOnError: false
    inputs:
    - name: FDSHELL_INP_CODE_SNIPPET
      value:
        value: |-
          cd $FD_TEMP_DIR
          cd $FDBLD_GIT_SOURCE1_CHECKOUT_FOLDER
          $JAVA_HOME/bin/jar -cvfM $FD_TRANSFER_DIR/transfer.jar *
        isExpression: false
      isEncrypted: false
    - name: FDSHELL_INP_STOP_ON_ERROR
      value:
        value: 'true'
        isExpression: false
      isEncrypted: false
    - name: FDSHELL_INP_DISABLE_ECHO
      value:
        value: 'false'
        isExpression: false
      isEncrypted: false
    - name: FDSHELL_INP_RESTRICT_ENVIRONMENT
      value:
        isExpression: false
      isEncrypted: false
    - name: FDSHELL_INP_NO_SECURE_VARIABLES
      value:
        value: 'false'
        isExpression: false
      isEncrypted: false
    outputs: [
      ]
    userInputs: [
      ]
    userOutputs: [
      ]
- id: '3'
  name: Copy to Temp on Endpoint
  type: INVOKE_PLUGIN
  data:
    pluginName: FlexagonShellPlugin
    pluginOperation: execute
    endpointInstanceOverride:
      value: SOAHR
      isExpression: false
    consumesArtifacts: false
    producesArtifacts: false
    endpointSelection:
      choice: All
    endpointExecution:
      choice: Any
      stopOnError: false
    inputs:
    - name: FDSHELL_INP_CODE_SNIPPET
      value:
        value: |-
          cd $FD_TEMP_DIR
          mkdir $FDBLD_GIT_SOURCE1_CHECKOUT_FOLDER
          cd $FDBLD_GIT_SOURCE1_CHECKOUT_FOLDER
          $JAVA_HOME/bin/jar -xvf $FD_TRANSFER_DIR/transfer.jar
        isExpression: false
      isEncrypted: false
    - name: FDSHELL_INP_STOP_ON_ERROR
      value:
        value: 'true'
        isExpression: false
      isEncrypted: false
    - name: FDSHELL_INP_DISABLE_ECHO
      value:
        value: 'false'
        isExpression: false
      isEncrypted: false
    - name: FDSHELL_INP_RESTRICT_ENVIRONMENT
      value:
        isExpression: false
      isEncrypted: false
    - name: FDSHELL_INP_NO_SECURE_VARIABLES
      value:
        value: 'false'
        isExpression: false
      isEncrypted: false
    outputs: [
      ]
    userInputs: [
      ]
    userOutputs: [
      ]

 Workflow code in XML (prior to 8.0)

Code Block
languagexml
<?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>Export on FlexDeploy Server</ns1:Name>
   <ns1:Description>This is useful when there is no Git on development server to perform build.</ns1:Description>
   <ns0:Steps>
      <ns0:Step>
         <ns1:Name>Clone on FlexDeploy Server</ns1:Name>
         <ns1:StepId>1</ns1:StepId>
         <ns0:InvokePlugin>
            <ns0:PluginName>FlexagonGITPlugin</ns0:PluginName>
            <ns0:PluginOperation>cloneProjectSources</ns0:PluginOperation>
            <ns0:EndpointInstanceOverride>LOCAL</ns0:EndpointInstanceOverride>
            <ns0:consumesArtifacts>false</ns0:consumesArtifacts>
            <ns0:producesArtifacts>false</ns0:producesArtifacts>
            <ns0:PluginInputs/>
            <ns0:UserInputs/>
            <ns0:PluginOutputs/>
            <ns0:UserOutputs/>
         </ns0:InvokePlugin>
      </ns0:Step>
      <ns0:Step>
         <ns1:Name>Copy to Transfer on FlexDeploy Server</ns1:Name>
         <ns1:StepId>2</ns1:StepId>
         <ns0:InvokePlugin>
            <ns0:PluginName>FlexagonShellPlugin</ns0:PluginName>
            <ns0:PluginOperation>execute</ns0:PluginOperation>
            <ns0:EndpointInstanceOverride>LOCAL</ns0:EndpointInstanceOverride>
            <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>cd $FD_TEMP_DIR
cd $FDBLD_GIT_SOURCE1_CHECKOUT_FOLDER
$JAVA_HOME/bin/jar -cvfM $FD_TRANSFER_DIR/transfer.jar *</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>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:PluginInputs>
            <ns0:UserInputs/>
            <ns0:PluginOutputs/>
            <ns0:UserOutputs/>
         </ns0:InvokePlugin>
      </ns0:Step>
      <ns0:Step>
         <ns1:Name>Copy to Temp on Endpoint</ns1:Name>
         <ns1:StepId>3</ns1:StepId>
         <ns0:InvokePlugin>
            <ns0:PluginName>FlexagonShellPlugin</ns0:PluginName>
            <ns0:PluginOperation>execute</ns0:PluginOperation>
            <ns0:EndpointInstanceOverride>SOAHR</ns0:EndpointInstanceOverride>
            <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>cd $FD_TEMP_DIR
mkdir $FDBLD_GIT_SOURCE1_CHECKOUT_FOLDER
cd $FDBLD_GIT_SOURCE1_CHECKOUT_FOLDER
$JAVA_HOME/bin/jar -xvf $FD_TRANSFER_DIR/transfer.jar</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>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:PluginInputs>
            <ns0:UserInputs/>
            <ns0:PluginOutputs/>
            <ns0:UserOutputs/>
         </ns0:InvokePlugin>
      </ns0:Step>
      
   </ns0:Steps>
</ns0:WorkFlow>

Filter by label (Content by label)
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@1101d
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel = "kb-how-to-article" and type = "page" and space = "FKB"
labelskb-how-to-article

Page Properties
hiddentrue

Related issues