Bug 1972451

Summary: Correctly declare Jenkins URL with trailing slash
Product: OpenShift Developer Tools and Services Reporter: Akram Ben Aissi <abenaiss>
Component: JenkinsAssignee: Akram Ben Aissi <abenaiss>
Status: CLOSED WONTFIX QA Contact: Jitendar Singh <jitsingh>
Severity: low Docs Contact: Rolfe Dlugy-Hegwer <rdlugyhe>
Priority: low    
Version: 4.9CC: adam.kaplan, akram, jdelft, jitsingh
Target Milestone: ---   
Target Release: 4.11   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-20 19:21:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2080204    

Description Akram Ben Aissi 2021-06-15 23:37:39 UTC
Correctly declare Jenkins URL with trailing slash

Comment 3 Jitendar Singh 2021-09-06 08:13:31 UTC
Fix not present

Comment 5 Jitendar Singh 2021-09-23 13:40:37 UTC
@adam I didnt see the fix. Had a discussion with Akram on this.

Comment 10 Jitendar Singh 2022-05-17 09:17:01 UTC
verified
============
tested using brew image: registry-proxy.engineering.redhat.com/rh-osbs/openshift-ose-jenkins@sha256:067a93b1ce8b6fdcbf04cd81dbf0de4fa7740e18c8050abefbc79c7cf5be4830

 jitsingh@jitsingh-mac  ~  docker images
REPOSITORY                                                            TAG       IMAGE ID       CREATED      SIZE
registry-proxy.engineering.redhat.com/rh-osbs/openshift-ose-jenkins   <none>    9879c724eebd   3 days ago   1.22GB
 jitsingh@jitsingh-mac  ~  docker tag 9879c724eebd quay.io/sunnyconcise/openshift-ose-jenkins:v4.11.0
 jitsingh@jitsingh-mac  ~  docker push quay.io/sunnyconcise/openshift-ose-jenkins:v4.11.0
The push refers to repository [quay.io/sunnyconcise/openshift-ose-jenkins]
8d54b9d889cd: Pushed
8969623178a3: Pushed
dc6d58216646: Pushed
0c728cbdd06d: Pushed
773711fd02f0: Pushed
5bf135c4a0de: Pushed
v4.11.0: digest: sha256:067a93b1ce8b6fdcbf04cd81dbf0de4fa7740e18c8050abefbc79c7cf5be4830 size: 1585
 jitsingh@jitsingh-mac  ~  oc get is
NAME               IMAGE REPOSITORY                                                        TAGS     UPDATED
jenkins-jitsingh   image-registry.openshift-image-registry.svc:5000/tst/jenkins-jitsingh   latest
 jitsingh@jitsingh-mac  ~  oc new-project tts
Now using project "tts" on server "https://api.rhoms-4.11-051704.dev.openshiftappsvc.org:6443".

You can add applications to this project with the 'new-app' command. For example, try:

    oc new-app rails-postgresql-example

to build a new example application in Ruby. Or use kubectl to deploy a simple Kubernetes application:

    kubectl create deployment hello-node --image=k8s.gcr.io/e2e-test-images/agnhost:2.33 -- /agnhost serve-hostname

 jitsingh@jitsingh-mac  ~  oc import-image --confirm jenkins-jitsingh --from=quay.io/sunnyconcise/openshift-ose-jenkins:v4.11.0
imagestream.image.openshift.io/jenkins-jitsingh imported

Name:			jenkins-jitsingh
Namespace:		tts
Created:		Less than a second ago
Labels:			<none>
Annotations:		openshift.io/image.dockerRepositoryCheck=2022-05-17T09:09:58Z
Image Repository:	image-registry.openshift-image-registry.svc:5000/tts/jenkins-jitsingh
Image Lookup:		local=false
Unique Images:		1
Tags:			1

latest
  tagged from quay.io/sunnyconcise/openshift-ose-jenkins:v4.11.0

  * quay.io/sunnyconcise/openshift-ose-jenkins@sha256:067a93b1ce8b6fdcbf04cd81dbf0de4fa7740e18c8050abefbc79c7cf5be4830
      Less than a second ago

Image Name:	jenkins-jitsingh:v4.11.0
Docker Image:	quay.io/sunnyconcise/openshift-ose-jenkins@sha256:067a93b1ce8b6fdcbf04cd81dbf0de4fa7740e18c8050abefbc79c7cf5be4830
Name:		sha256:067a93b1ce8b6fdcbf04cd81dbf0de4fa7740e18c8050abefbc79c7cf5be4830
Created:	Less than a second ago
Annotations:	image.openshift.io/dockerLayersOrder=ascending
Image Size:	587MB in 6 layers
Layers:		78.43MB	sha256:f70d60810c69edad990aaf0977a87c6d2bcc9cd52904fa6825f08507a9b6e7bc
		1.795kB	sha256:545277d800059b32cf03377a9301094e9ac8aa4bb42d809766d7355ca9aa8652
		2.739MB	sha256:de516cc59493b713e0b33a4954f7eb500383e59642e2897d02e63992d4576720
		11.43MB	sha256:ff593cb2c84314856da274bfddc37040c775aa226e93830d96e50f58e38a1c27
		49.62MB	sha256:565dccac3d58f892b550ac4e92d3fd6ef7a8328352b8ea43552e8339e6b3b688
		444.8MB	sha256:2f2312f10d24ed66009e14ba687527fd343508c8912cda77bb1d4f3e6c65d29f
Image Created:	3 days ago
Author:		OpenShift Developer Services <openshift-dev-services+jenkins>
Arch:		amd64
Entrypoint:	/usr/bin/go-init -main /usr/libexec/s2i/run
Working Dir:	<none>
User:		1001
Exposes Ports:	50000/tcp, 8080/tcp
Docker Labels:	License=GPLv2+
		architecture=x86_64
		build-date=2022-05-13T12:32:47.343482
		com.redhat.build-host=cpt-1005.osbs.prod.upshift.rdu2.redhat.com
		com.redhat.component=openshift-jenkins-2-container
		com.redhat.license_terms=https://www.redhat.com/agreements
		description=Jenkins is a continuous integration server
		distribution-scope=public
		io.jenkins.version=2.319.3
		io.k8s.description=Jenkins is a continuous integration server
		io.k8s.display-name=Jenkins 2
		io.openshift.build.commit.id=15bee33e62e2efe410674ad93cadd16a3f7c8364
		io.openshift.build.commit.url=https://github.com/openshift/jenkins/commit/15bee33e62e2efe410674ad93cadd16a3f7c8364
		io.openshift.build.source-location=https://github.com/openshift/jenkins
		io.openshift.expose-services=8080:http
		io.openshift.maintainer.component=Jenkins
		io.openshift.maintainer.product=OpenShift Container Platform
		io.openshift.maintainer.subcomponent=oc
		io.openshift.s2i.scripts-url=image:///usr/libexec/s2i
		io.openshift.tags=jenkins,jenkins2,ci
		maintainer=openshift-dev-services+jenkins
		name=openshift/ose-jenkins
		release=1652444939
		summary=Provides the latest release of Red Hat Universal Base Image 8.
		url=https://access.redhat.com/containers/#/registry.access.redhat.com/openshift/ose-jenkins/images/v4.11.0-1652444939
		vcs-ref=c2ad308ccb1ed4c2d2a3e1d02b821505a5e57af1
		vcs-type=git
		vendor=Red Hat, Inc.
		version=v4.11.0
Environment:	JENKINS_VERSION=2
		HOME=/var/lib/jenkins
		JENKINS_HOME=/var/lib/jenkins
		JENKINS_UC=https://updates.jenkins.io
		OPENSHIFT_JENKINS_IMAGE_VERSION=4.11
		LANG=en_US.UTF-8
		LC_ALL=en_US.UTF-8
		INSTALL_JENKINS_VIA_RPMS=true
		__doozer=merge
		BUILD_RELEASE=202205112243.p0.g135b9e8.assembly.stream
		BUILD_VERSION=v4.11.0
		OS_GIT_MAJOR=4
		OS_GIT_MINOR=11
		OS_GIT_PATCH=0
		OS_GIT_TREE_STATE=clean
		OS_GIT_VERSION=4.11.0-202205112243.p0.g135b9e8.assembly.stream-135b9e8
		SOURCE_GIT_TREE_STATE=clean
		OS_GIT_COMMIT=135b9e8
		SOURCE_DATE_EPOCH=1652280431
		SOURCE_GIT_COMMIT=135b9e80a40f43f0d5f9b1342dabdedd0c2f59fb
		SOURCE_GIT_TAG=openshift-clients-4.11.0-202204020828-52-g135b9e80a
		SOURCE_GIT_URL=https://github.com/openshift/oc
		GODEBUG=x509ignoreCN=0,madvdontneed=1
		PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
		container=oci
Volumes:	/var/lib/jenkins


 jitsingh@jitsingh-mac  ~  oc new-app jenkins-ephemeral -p NAMESPACE=$(oc project -q) -p JENKINS_IMAGE_STREAM_TAG=jenkins-jitsingh:latest
--> Deploying template "openshift/jenkins-ephemeral" to project tts

     Jenkins (Ephemeral)
     ---------
     Jenkins service, without persistent storage.

     WARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.

     A Jenkins service has been created in your project.  Log into Jenkins with your OpenShift account.  The tutorial at https://github.com/openshift/origin/blob/master/examples/jenkins/README.md contains more information about using this template.

     * With parameters:
        * Jenkins Service Name=jenkins
        * Jenkins JNLP Service Name=jenkins-jnlp
        * Enable OAuth in Jenkins=true
        * Memory Limit=1Gi
        * Jenkins ImageStream Namespace=tts
        * Disable memory intensive administrative monitors=false
        * Allows control over how the JVM interacts with FIPS on startup.=-Dcom.redhat.fips=false
        * Jenkins ImageStreamTag=jenkins-jitsingh:latest
        * Allows use of Jenkins Update Center repository with invalid SSL certificate=false
        * Image used for the 'jnlp' container of the sample 'java-sidecar' and 'nodejs-sidecar' PodTemplates=image-registry.openshift-image-registry.svc:5000/openshift/jenkins-agent-base:latest
        * Image used for the 'java' container of the sample 'java-builder' PodTemplate=image-registry.openshift-image-registry.svc:5000/openshift/java:latest
        * Image used for the 'nodejs' container of the sample 'nodejs-builder' PodTemplate=image-registry.openshift-image-registry.svc:5000/openshift/nodejs:latest

--> Creating resources ...
    route.route.openshift.io "jenkins" created
    configmap "jenkins-trusted-ca-bundle" created
    deploymentconfig.apps.openshift.io "jenkins" created
    serviceaccount "jenkins" created
    rolebinding.authorization.openshift.io "jenkins_edit" created
    service "jenkins-jnlp" created
    service "jenkins" created
--> Success
    Access your application via route 'jenkins-tts.apps.rhoms-4.11-051704.dev.openshiftappsvc.org'
    Run 'oc status' to view your app.
 jitsingh@jitsingh-mac  ~  oc get pods -w
NAME               READY   STATUS              RESTARTS   AGE
jenkins-1-deploy   1/1     Running             0          5s
jenkins-1-wpdfm    0/1     ContainerCreating   0          2s
jenkins-1-wpdfm    0/1     ContainerCreating   0          3s
jenkins-1-wpdfm    0/1     Running             0          24s
jenkins-1-wpdfm    1/1     Running             0          75s
jenkins-1-deploy   0/1     Completed           0          79s
jenkins-1-deploy   0/1     Completed           0          80s
^C%
 ✘ jitsingh@jitsingh-mac  ~  oc rsh jenkins-1-wpdfm
sh-4.4$ cat var/lib/jenkins/jenkins.model.JenkinsLocationConfiguration.xml
<?xml version='1.1' encoding='UTF-8'?>
<jenkins.model.JenkinsLocationConfiguration>
  <adminAddress>address not configured yet &lt;nobody@nowhere&gt;</adminAddress>
  <jenkinsUrl>https://jenkins-tts.apps.rhoms-4.11-051704.dev.openshiftappsvc.org/</jenkinsUrl>
</jenkins.model.JenkinsLocationConfiguration>

sh-4.4$ exit
exit
 jitsingh@jitsingh-mac  ~  oc get routes
NAME      HOST/PORT                                                    PATH   SERVICES   PORT    TERMINATION     WILDCARD
jenkins   jenkins-tts.apps.rhoms-4.11-051704.dev.openshiftappsvc.org          jenkins    <all>   edge/Redirect   None
 jitsingh@jitsingh-mac  ~ 

Comment 16 Red Hat Bugzilla 2023-09-18 00:27:39 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days