Description of problem: The jenkins sample job logic attempts to retrieve the list of deployments and sort them numerically in order to find the most recent one. It does this sort incorrectly and therefore does not always find the most recent deployment. How reproducible: always Steps to Reproduce: 1. trigger more than 9 deployments at which point deployment-10 will be sorted incorrectly. Actual results: deployment-10 is not treated as the most recent deployment Expected results: deployment-10 is treated as the most recent deployment
fixed here: https://github.com/openshift/jenkins/pull/37 https://github.com/openshift/jenkins/pull/38
Hi Ben, Could you tell me which source repo you are using? When I use https://github.com/mfojtik/jenkins-ci to build jenkins slave image, always failed with below error: # oc get builds NAME TYPE FROM STATUS STARTED DURATION jenkins-master-1 Docker Git Complete 2 hours ago 5m22s ruby-20-rhel7-slave-1 Docker Git Failed About an hour ago 8m45s ruby-20-rhel7-slave-2 Docker Git Failed About an hour ago 1m41s # oc build-logs ruby-20-rhel7-slave-2 I1026 05:27:27.031611 1 source.go:145] Cloning source from https://github.com/mfojtik/jenkins-ci.git Step 0 : FROM registry.access.redhat.com/openshift3/ruby-20-rhel7 ---> 81e8bd4043e7 Step 1 : USER root ---> Using cache ---> ebdc0227ea00 Step 2 : RUN yum install -y --setopt=tsflags=nodocs --enablerepo=centosplus epel-release && rpmkeys --import file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 && yum install -y --setopt=tsflags=nodocs install java-1.8.0-openjdk-headless nss_wrapper && yum clean all && mkdir -p /opt/app-root/jenkins && chown -R 1001:0 /opt/app-root/jenkins && chmod -R g+w /opt/app-root/jenkins ---> Running in 71c8d2dc5627 Loaded plugins: product-id, subscription-manager This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. Error getting repository data for centosplus, repository not found F1026 05:28:49.731248 1 builder.go:55] Build error: The command '/bin/sh -c yum install -y --setopt=tsflags=nodocs --enablerepo=centosplus epel-release && rpmkeys --import file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 && yum install -y --setopt=tsflags=nodocs install java-1.8.0-openjdk-headless nss_wrapper && yum clean all && mkdir -p /opt/app-root/jenkins && chown -R 1001:0 /opt/app-root/jenkins && chmod -R g+w /opt/app-root/jenkins' returned a non-zero code: 1
I'm using the scenario described in the readme here: https://github.com/openshift/origin/tree/master/examples/jenkins note that when you instantiate the jenkins template, you'll need to change the image parameter (https://github.com/openshift/origin/blob/master/examples/jenkins/jenkins-ephemeral-template.json#L138) to use the ci.dev.openshift.redhat.com:5000/openshift/jenkins-1-rhel7 image.
Test with jenkins-1-rhel7(4b63344b31b8). The list of deployments sorts correct in jenkins console-out page when trigger deployment more than 9 times.So could find most recent deployment.
Sorry,Ben. My mistake, seem the list of deployments still sorts by numeric in jenkins console-out page,but the test_rc_id get the most recent deployment. See the console log,http://fpaste.org/284035/59409131/. I will treat that as acceptable.
yes that output looks fine, the order they are shown in the log doesn't matter, as long as the highest value is actually used in the end, per: Scaling up new deployment frontend-14 Thanks for verifying!
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-2027.html