deploy.sh 349 B

123456789
  1. date=`date +%Y%m%d_%H%M%S`
  2. cd /home/jenkins/workspace/frontend
  3. docker build -t feick/diagnosis-frontend:$date .
  4. echo "frontend 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."