deploy.sh 342 B

123456789
  1. date=`date +%Y%m%d_%H%M%S`
  2. cd /home/jenkins/workspace/diagnosis
  3. docker build -t feick/diagnosis:$date .
  4. echo "backend current tag is $date"
  5. sed -i "s/\${date}/$(echo $date)/g" deployment.yaml
  6. kubectl apply -f deployment.yaml
  7. #sed -i "s/\${date}/$(echo $date)/g" deployment-prod.yaml
  8. #kubectl apply -f deployment-prod.yaml
  9. echo "build finish."