steps:
  - name: maven:3.8.6-openjdk-18
    id: deploy_services
    env:
      - 'TAGGING_DISPATCHER_IMAGE=${_TAGGING_DISPATCHER_IMAGE}'
      - 'TAGGER_IMAGE=${_TAGGER_IMAGE}'
      - 'INSPECTION_DISPATCHER_IMAGE=${_INSPECTION_DISPATCHER_IMAGE}'
      - 'INSPECTOR_IMAGE=${_INSPECTOR_IMAGE}'
    script:

      set -e
      
      echo "TAGGING_DISPATCHER_IMAGE = ${TAGGING_DISPATCHER_IMAGE}"
      echo "TAGGER_IMAGE = ${TAGGER_IMAGE}"
      echo "INSPECTION_DISPATCHER_IMAGE = ${INSPECTION_DISPATCHER_IMAGE}"
      echo "INSPECTOR_IMAGE = ${INSPECTOR_IMAGE}"

      mvn install
    
      mvn compile jib:build -f=dispatcher-tagging-app/pom.xml -Dimage="${TAGGING_DISPATCHER_IMAGE}"

      mvn compile jib:build -f=tagger-app/pom.xml -Dimage="${TAGGER_IMAGE}"
    
      mvn compile jib:build -f=dispatcher-inspection-app/pom.xml -Dimage="${INSPECTION_DISPATCHER_IMAGE}"

      mvn compile jib:build -f=inspector-app/pom.xml -Dimage="${INSPECTOR_IMAGE}"



