# This is the only build step for updates to the data bag, role and # environment repositories which are triggered by a GitHub callback # to Jenkins on commit # Reset the workspace, we don't want the git checkout of $JOB_NAME cd $WORKSPACE/.. rm -rf workspace mkdir workspace cd workspace # Pull down repo git clone git@github.com:YOUR/chef-repo.git cd repo # Update the $JOB_NAME git submodule update --init $JOB_NAME cd $JOB_NAME git pull -f -u origin master cd .. git commit -m "Updating ${JOB_NAME} to ${GIT_COMMIT}" .gitmodules $JOB_NAME # Push the change git push origin master