Git – Diff file between last and last commit

This line checks the change of the "configmap.yml" file between the last and the last but one commit, if there was a change in it, then the configmap update in Kubernetes is performed.

if git diff HEAD^ HEAD .jenkins/configmap.yml | grep -q configmap; then ${KUBECTL} apply -f .jenkins/configmap.yml; fi
0 0 vote
Article Rating

Tagged: Tags

Подписаться
Уведомление о
guest
0 Comments
Inline Feedbacks
View all comments