#!/bin/bash message=$1 echo "message: "$message cd /pipeline/output/ python /pipeline/app/run.py $message exit_code=$? echo "=====pipeline.log====" > /work/custom-out.txt cat /pipeline/output/pipeline.log >> /work/custom-out.txt echo "======module.log======" >> /work/custom-out.txt cat /pipeline/output/module.log|tail -n 100 >> /work/custom-out.txt timefile=/pipeline/output/timestamp.txt if test -f "$timefile"; then echo "$timefile exist" mv /pipeline/output/timestamp.txt /work/timestamps.txt fi rm -rf /pipeline/input/* /pipeline/output/* echo finish photmix. exit $exit_code