apiVersion: batch/v1
kind: Job
metadata:
  name: extract-wildcards-BBS_PROJECT_CODE
  labels:
    app: extract-wildcards-BBS_PROJECT_CODE
spec:
  ttlSecondsAfterFinished: 100
  template:
    metadata:
      labels:
        app: extract-wildcards-BBS_PROJECT_CODE
    spec:
      volumes:
      - name: data-volume
        hostPath: 
          path: /mnt/volume_lon1_01
          type: Directory
      containers:
      - name: extract-wildcards-BBS_PROJECT_CODE
        image: python:3.8-slim
        volumeMounts:
        - name: data-volume
          mountPath: /optdata
        command: 
        - /bin/sh
        - -c
        - |
          echo Extract Wildcard Domains v1
          echo Code: BBS_PROJECT_CODE
          echo Id: BBS_PROJECT_ID
          echo List: BBS_PROJECT_LIST
          cd /optdata/BBS
          mkdir -p output/project-data/BBS_PROJECT_CODE/scope/generated/
          cat output/project-data/BBS_PROJECT_CODE/scope-given/scope.in.txt | grep "*." > output/project-data/BBS_PROJECT_CODE/scope/generated/inscope.wildcard-domains.txt
          
                    
          echo all done
      restartPolicy: Never

