refs/for/[brach] 需要经过code review之后才可以提交,而refs/heads/[beanch]不需要code review。
举例
如果需要code review,直接执行push:
git push origin mybrach
就会报错“! [remote rejected] master -> master (prohibited by Gerrit)”必须用以下语句:
git push origin HEAD:resf/for/mybranch
git fetch ssh://wangqingyuan@git.xiaomi.com:29418/miot/aiot/sdk/device_provisioning refs/changes/85/723785/1 && git checkout FETCH_HEAD
pipeline step:包括dir等
https://jenkins.io/doc/pipeline/steps/workflow-basic-steps/
git :
https://jenkins.io/doc/pipeline/steps/git/
Pipeline Steps Reference:
https://jenkins.io/doc/pipeline/steps/
pipeline的environment variables:
https://jenkins.io/doc/book/pipeline/jenkinsfile/#using-environment-variables,在此页面搜索environment variables
问题1:gerrit event的工程下拉列表没有所要的工程
后来手写后,发现有,,
只要有下拉列表,就说明jenkins和gerrit已经连接成功,如果没有想要的工程,可以手写,手写差不多的话,下拉列表会出现此工程
问题2:jenkins在PATH里添加路径
https://stackoverflow.com/questions/43987005/jenkins-does-not-recognize-command-sh
https://www.cnblogs.com/sogeisetsu/p/11407764.html
问题:pipeline如何识别触发时间的类型并分别做出动作?
gerrit的变量: