Description of problem: When use origin-gitserver repo to do build, push some change to origin-gitserver, can't trigger a new build automatically. Version-Release number of selected component (if applicable): openshift v1.0.4-184-gc5f08bc-dirty kubernetes v1.1.0-alpha.0-1155-gb73c53c How reproducible: Always Steps to Reproduce: 1.Login openshift and create a new project 2.Deploy the ruby-hello-world application $oc process -f application-template-stibuild.json | oc create -f - -n dma1 3.Add admin role to default serviceaccount in project $ oc policy add-role-to-user admin system:serviceaccount:dma:default -n dma 4.Configure gitserver without auth, set both "REQUIRE_SERVER_AUTH" and "REQUIRE_GIT_AUTH" to empty. $ cat examples/gitserver/gitserver.yaml ---skip--- - name: REQUIRE_SERVER_AUTH - name: REQUIRE_GIT_AUTH 5.Deploy the private gitserver $ oc create -f gitserver.yaml -n dma1 6.Check the pod ,service, build $ oc get svc -n dma1 $ oc get pod -n dma1 $ oc get build -n dma1 7.Clone the repo from private gitserver and make some change push to gitserver $ git clone http://172.30.10.11:8080/ruby-sample-build.git $ cd ruby-sample-build $ echo "hello" > b.txt $ git add b.txt $ git commit -anmq $ git push 8.Check the build $ oc get build -n dma1 9.Change the buildConfig uri to "http://gitserver.dma1.svc.cluster.local:8080/ruby-sample-build.git" or "http://172.30.10.11:8080/ruby-sample-build.git" [fedora@ip-10-154-3-36 ruby-sample-build]$ oc get buildConfig -n dma1 NAME TYPE SOURCE ruby-sample-build Source http://gitserver.dma1.svc.cluster.local:8080/ruby-sample-build.git [fedora@ip-10-154-3-36 ruby-sample-build]$ oc get buildConfig -n dma1 NAME TYPE SOURCE ruby-sample-build Source http://172.30.10.11:8080/ruby-sample-build.git 10.repeat step7 to trigger a new build Actual results: 8.No new build generate. 10.No new build generate. Expected results: 8.Should trigger a new build 10.Should trigger a new build Additional info: 1.gitserver log [fedora@ip-10-154-3-36 gitserver]$ oc logs gitserver-1-c587u -n dma1 2015/08/12 07:56:51 Linking build configs in namespace(s) [dma1] to the gitserver 2015/08/12 07:56:52 Linked ruby-sample-build for repo https://github.com/openshift/ruby-hello-world.git as http://gitserver.dma1.svc.cluster.local:8080/ruby-sample-build.git 2015/08/12 07:56:52 Cloning https://github.com/openshift/ruby-hello-world.git into /var/lib/git/ruby-sample-build.git 2015/08/12 07:56:52 Serving /var/lib/git on :8080
We need to set a default hook in the image or template definition so that something runs.
Builds should now be triggered. Please see documentation at https://github.com/openshift/origin/tree/master/examples/gitserver
Verified this bug with openshift/origin-gitserver (d4413378d01d). Could trigger new build after push code to gitserver. remote: --> Creating resources with label app=ruby-hello-world ... remote: imagestream "ruby-22-centos7" created remote: imagestream "ruby-hello-world" created remote: buildconfig "ruby-hello-world" created remote: deploymentconfig "ruby-hello-world" created remote: service "ruby-hello-world" created remote: --> Success remote: Build scheduled, use 'oc logs -f bc/ruby-hello-world' to track its progress. remote: Run 'oc status' to view your app. To http://git-xiuwang.0428-og3.qe.rhcloud.com/ruby-hello-world.git * [new branch] master -> master [xiuj@dhcp-128-25 ruby-hello-world]$ oc get pods NAME READY STATUS RESTARTS AGE git-1-trrhu 1/1 Running 0 8m ruby-hello-world-1-build 1/1 Running 0 1m