Fix validate job when run against autorelease
[releng/builder.git] / jjb / autorelease / autorelease-macros.yaml
index 4447d6f50b17789a5c50cee7ef4e4996f4b1f132..ab4b30d6e22ab3ce0ff859df5b80b83a64ed7421 100644 (file)
           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
 
+          # 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
     builders: