<div dir="ltr"><div><div>Sorry for the delayed reply. well this reference is present on the zuul git repository side. <br><br></div>when running publish-doc job. zuul is not fetching all the references from the zuul git repository present on CI vm into the workspace/examp_publish-doc on the Jenkins-slave vm.<br><br></div>used gerrit-git-prep.sh and example-publis-doc.yaml <br><br>#!/bin/bash -e<br><br>GERRIT_SITE=$1<br>GIT_ORIGIN=$2<br><br>if [ -z "$GERRIT_SITE" ]; then<br> echo "The gerrit site name (eg '<a href="https://review.openstack.org" target="_blank">https://review.openstack.org</a>') must be the first argument."<br> exit 1<br>fi<br><br>if [ -z "$ZUUL_URL" ]; then<br> echo "The ZUUL_URL must be provided."<br> exit 1<br>fi<br><br>if [ -z "$ZUUL_REF" ]; then<br> if [ -n "$BRANCH" ]; then<br> echo "No ZUUL_REF so using requested branch $BRANCH from origin."<br> ZUUL_REF=$BRANCH<br> # use the origin since zuul mergers have outdated branches<br> ZUUL_URL=$GIT_ORIGIN<br> else<br> echo "Provide either ZUUL_REF or BRANCH in the calling enviromnent."<br> exit 1<br> fi<br>fi<br><br>if [ ! -z "$ZUUL_CHANGE" ]; then<br> echo "Triggered by: $GERRIT_SITE/$ZUUL_CHANGE"<br>fi<br><br>set -x<br>if [[ ! -e .git ]]; then<br> ls -a<br> rm -fr .[^.]* *<br> if [ -d /opt/git/$ZUUL_PROJECT/.git ]; then<br> git clone file:///opt/git/$ZUUL_PROJECT .<br> else<br> git clone $GIT_ORIGIN/$ZUUL_PROJECT .<br> fi<br>fi<br>git remote set-url origin $GIT_ORIGIN/$ZUUL_PROJECT<br><br># attempt to work around bugs 925790 and 1229352<br>if ! git remote update; then<br> echo "The remote update failed, so garbage collecting before trying again."<br> git gc<br> git remote update<br>fi<br><br>git reset --hard<br>if ! git clean -x -f -d -q ; then<br> sleep 1<br> git clean -x -f -d -q<br>fi<br><br>if echo "$ZUUL_REF" | grep -q ^refs/tags/; then<br> git fetch --tags $ZUUL_URL/$ZUUL_PROJECT<br> git checkout $ZUUL_REF<br> git reset --hard $ZUUL_REF<br>elif [ -z "$ZUUL_NEWREV" ]; then<br> git fetch $ZUUL_URL/$ZUUL_PROJECT $ZUUL_REF<br> git checkout FETCH_HEAD<br> git reset --hard FETCH_HEAD<br>else<br> git checkout $ZUUL_NEWREV<br> git reset --hard $ZUUL_NEWREV<br>fi<br><br>if ! git clean -x -f -d -q ; then<br> sleep 1<br> git clean -x -f -d -q<br>fi<br><br>if [ -f .gitmodules ]; then<br> git submodule init<br> git submodule sync<br> git submodule update --init<br>fi<br><div class="gmail_extra">=====<br><br>- job:<br> name: example-publish-doc<br> project-type: freestyle<br> defaults: global<br> description: 'Do not edit this job through the web!'<br> disabled: false<br> display-name: 'example-publish-doc'<br> concurrent: true<br> quiet-period: 5<br> block-downstream: false<br> block-upstream: false<br> retry-count: 3<br> node: slave1<br> logrotate:<br> daysToKeep: 3<br> numToKeep: 20<br> artifactDaysToKeep: -1<br> artifactNumToKeep: -1<br> properties:<br> - inject:<br> keep-build-variables: true<br> keep-system-variables: true<br> builders:<br> - shell: |<br> #!/bin/bash -xe<br> env<br> /home/corvit/slave_scripts/gerrit-git-prep.sh <a href="https://ci.corvit.lab/gerrit" target="_blank">https://ci.corvit.lab/gerrit</a> ci.corvit.lab:/git<br> /home/corvit/slave_scripts/run-doc.sh<br> cd doc; make latexpdf<br> cd ..<br> /usr/bin/ssh ci.corvit.lab 'sudo rm -rf /home/corvit/doc/example /var/www/html/example'<br> /usr/bin/ssh ci.corvit.lab 'mkdir -p /home/corvit/doc/example'<br> /usr/bin/scp -r doc/build ci.corvit.lab:/home/corvit/doc/example<br> /usr/bin/ssh ci.corvit.lab 'mv /home/corvit/doc/example/build/html /home/corvit/doc/example/build/example'<br> /usr/bin/ssh ci.corvit.lab 'mv /home/corvit/doc/example/build/latex /home/corvit/doc/example/build/example/'<br> /usr/bin/ssh ci.corvit.lab 'sudo mv /home/corvit/doc/example/build/example /var/www/html/'<br> /bin/echo 'Documentation at <a href="https://ci.corvit.lab/example/" target="_blank">https://ci.corvit.lab/example/</a>'<br> /bin/echo 'API documentation at <a href="https://ci.corvit.lab/example/apidoc.html" target="_blank">https://ci.corvit.lab/example/apidoc.html</a>'<br> /bin/echo 'PDF documentation at <a href="https://ci.corvit.lab/example/latex/" target="_blank">https://ci.corvit.lab/example/latex/</a>'<br><br><br> <div><div><div dir="ltr">
<div>
<div>
<p>Best Regards,</p>
<p>Fayyaz Ur Rehman,<br><br><br>Corvit Technologies<br>14-D/1, Ghalib Road, Gulberg III, Lahore, Pakistan.<br>UAN: +92-42-111-CORVIT<br>Tel: +92-42-5717271-2(Ext: 129)<br>Cell: <a href="tel:%2B92-321-4184438" value="+923214184438" target="_blank">+92-321-4184438</a><br></p></div></div></div></div></div>
<br><div class="gmail_quote">On Tue, Jul 7, 2015 at 2:03 AM, Jeremy Stanley <span dir="ltr"><<a href="mailto:fungi@yuggoth.org" target="_blank">fungi@yuggoth.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 2015-07-06 10:48:24 +0500 (+0500), Fayyaz rehman wrote:<br>
[...]<br>
> + git checkout 5bc04e0127315bc0107cac27ce00424da965b685<br>
> fatal: reference is not a tree: 5bc04e0127315bc0107cac27ce00424da965b685<br>
> Build step 'Execute shell' marked build as failure<br>
><br>
> If somebody has any idea why i am facing this error. Please eloborate<br>
<br>
That's the error git gives you when you try to checkout a<br>
nonexistent reference. Are you sure that ref is relevant to the<br>
repository in question?<br>
<span><font color="#888888">--<br>
Jeremy Stanley<br>
</font></span></blockquote></div><br></div></div>