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