name: "Build Db2"
description: "Builds the Debezium Db2 connector"

inputs:
  path-core:
    description: "Debezium core repository checkout path"
    required: true
  path-db2:
    description: "Debezium Db2 repository checkout path"
    required: true
  shell:
    description: "The shell to use"
    required: false
    default: bash

runs:
  using: "composite"
  steps:
    - name: Build Debezium (Core)
      shell: ${{ inputs.shell }}
      run: >
        ./${{ inputs.path-core }}/mvnw clean install -B -ntp -f ${{ inputs.path-core }}/pom.xml
        -pl debezium-assembly-descriptors,debezium-bom,debezium-core,debezium-embedded,:debezium-ide-configs,:debezium-checkstyle,:debezium-revapi
        -am
        -DskipTests=true
        -DskipITs=true
        -Dcheckstyle.skip=true
        -Dformat.skip=true
        -Drevapi.skip
        -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
        -Dmaven.wagon.http.pool=false
        -Dmaven.wagon.httpconnectionManager.ttlSeconds=120

    - name: Build Db2
      shell: ${{ inputs.shell }}
      run: >
        ./${{ inputs.path-core }}/mvnw clean install -B -ntp -f ${{ inputs.path-db2 }}/pom.xml 
        -Passembly        
        -Dcheckstyle.skip=true
        -Dformat.skip=true
        -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
        -Dmaven.wagon.http.pool=false
        -Dmaven.wagon.httpconnectionManager.ttlSeconds=120
        -Ddebezium.test.records.waittime=5 
        -DfailFlakyTests=false
