Code Review
/
releng
/
builder.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fix conditional statement should be ==
[releng/builder.git]
/
jjb
/
autorelease
/
autorelease-macros.yaml
diff --git
a/jjb/autorelease/autorelease-macros.yaml
b/jjb/autorelease/autorelease-macros.yaml
index 00316524b58816eca5a89db3b9e78d39bce1018f..f06583210ac81a1b3232201a49d5effca32f8e6d 100644
(file)
--- a/
jjb/autorelease/autorelease-macros.yaml
+++ b/
jjb/autorelease/autorelease-macros.yaml
@@
-28,10
+28,21
@@
name: autorelease-checkout-gerrit-patch
builders:
- shell: |
name: autorelease-checkout-gerrit-patch
builders:
- shell: |
- cd ${GERRIT_PROJECT}
+ #!/bin/bash
+ set -eu -o pipefail
+
+ # If the project is autorelease then we do not need to cd
+ if [ "$GERRIT_PROJECT" != "releng/autorelease" ]; then
+ cd "$WORKSPACE/$GERRIT_PROJECT"
+ fi
+
echo "Checking out ${GERRIT_PROJECT} patch ${GERRIT_REFSPEC}..."
git fetch origin ${GERRIT_REFSPEC} && git checkout FETCH_HEAD
echo "Checking out ${GERRIT_PROJECT} patch ${GERRIT_REFSPEC}..."
git fetch origin ${GERRIT_REFSPEC} && git checkout FETCH_HEAD
- cd ..
+
+ # If the project is autorelease then we need to init and update submodules
+ if [ "$GERRIT_PROJECT" == "releng/autorelease" ]; then
+ git submodule update --init
+ fi
- builder:
name: autorelease-cfp
- builder:
name: autorelease-cfp