uniquejava / blog

My notes regarding the vibrating frontend :boom and the plain old java :rofl.
Creative Commons Zero v1.0 Universal
11 stars 5 forks source link

Pipeline(CI/CD) #299

Open uniquejava opened 4 years ago

uniquejava commented 4 years ago

commit message 以 deploy:dev 时触发build。

#!/bin/bash
# set -x

pwd
ls -lh
msg=$(git log -1 --pretty=%B)
echo "$msg"

if [[ ! "$msg" =~ ^deploy:dev.* ]];then
  echo "do nothing"
  exit 1
fi

参考: How can I trigger Jenkins to build project by special string in comment of git commit?