Skip to content

Switch Jenkins image tracking to registry tag due to Samples Operator… … deprecation #1151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ravanelli
Copy link
Member

Added jenkins-stg-agent-base.yaml to work around limitations in the Staging environment. Also updated documentation to note the unreliability of the Staging registry and instructed users to use their own agent image.

@ravanelli ravanelli changed the title manifest: add jenkins-stg-agent-base.yaml due to staging limitations Switch Jenkins image tracking to registry tag due to Samples Operator… … deprecation May 16, 2025
@ravanelli ravanelli force-pushed the pr/fix_stg branch 2 times, most recently from 2ea2426 to 6af98f5 Compare May 16, 2025 21:31
Copy link
Member

@dustymabe dustymabe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haven't fully looked through everything yet, but wanted to put a few comments out there for discussion

Comment on lines 91 to 100
spec:
lookupPolicy:
# this allows e.g. the pipeline to directly reference the imagestream
local: true
tags:
- name: latest
from:
kind: DockerImage
name: ${JENKINS_AGENT_PULL_SPEC}
forcePull: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, this is defining the latest tag but in the jenkins-with-cert flow, the build there also outputs to latest. Let's change it to be e.g. upstream.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To differ the with-cert flow I decided to add upstream for both images, in this way we keep it the same.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The more I think about this the more I think it would actually simplify if we just used the same exact workflow in the case where we need the cert AND the case where we don't. We wouldn't need to play musical chairs with tags and things could be a lot more straightforward.

Maybe in the case where we don't need the cert we just create an empty secret? We'd need to figure out some way to either add in a dummy cert that doesn't do any harm when we run update-ca-trust OR we figure out how to just create an empty secret and somehow in the container build we detect that and do nothing.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course, if you are tired of working on this (I know I would be) we can leave it the way it is (and I'll do a further review), but man, upstream sure is a weird tag to use here. The problem is the musical chairs makes it hard to choose tag names that are meaningful.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honestly I added a dummy secret to run the tests, and it worked, I think update-ca-trust only cares about the file and not the content. As long we can live with a dummy secret, I think that's ok. Let's define what we want first, so I can change it after

ravanelli added 2 commits May 20, 2025 15:59
… deprecation

Starting with OpenShift 4.13, the Cluster Samples Operator has been
downsized and no longer provides updates for non-S2I images like
Jenkins. The `latest` tracked tag was pointing to an image that hadn't been
updated in over two years. This commit updates the image reference to
follow the specific registry tag directly
(registry.redhat.io/ocp-tools-4/jenkins-rhel9:v4.17.0), ensuring we get
the latest maintained version going forward.

To archive this we need to create our own ImageStreams for both the
Jenkins base image and the Jenkins agent image, replacing the deprecated
Samples Operator content.

Signed-off-by: Renata Ravanelli <rravanel@redhat.com>
 - Update documentation to reflect changes
 - Add note about how to work with the Fedora
Staging pipecfg.

Signed-off-by: Renata Ravanelli <rravanel@redhat.com>
@@ -255,12 +255,8 @@ parameters:
- description: The OpenShift Namespace where the Jenkins ImageStream resides.
displayName: Jenkins ImageStream Namespace
name: NAMESPACE
value: openshift
value: fedora-coreos-pipeline
# DELTA: add separate agent namespace parameter
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete

Suggested change
# DELTA: add separate agent namespace parameter

Comment on lines 255 to +258
- description: The OpenShift Namespace where the Jenkins ImageStream resides.
displayName: Jenkins ImageStream Namespace
name: NAMESPACE
value: openshift
value: fedora-coreos-pipeline
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not needed anymore since we'll be operating in our own namespace?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which means we can also delete namespace: ${NAMESPACE} above in this file.

Comment on lines +22 to +24
kind: ImageStream
metadata:
name: jenkins
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now we have two imagestreams named jenkins. The other one is on line 50 of jenkins-s2i.yaml. I think one of them has to go.

Comment on lines 91 to 100
spec:
lookupPolicy:
# this allows e.g. the pipeline to directly reference the imagestream
local: true
tags:
- name: latest
from:
kind: DockerImage
name: ${JENKINS_AGENT_PULL_SPEC}
forcePull: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The more I think about this the more I think it would actually simplify if we just used the same exact workflow in the case where we need the cert AND the case where we don't. We wouldn't need to play musical chairs with tags and things could be a lot more straightforward.

Maybe in the case where we don't need the cert we just create an empty secret? We'd need to figure out some way to either add in a dummy cert that doesn't do any harm when we run update-ca-trust OR we figure out how to just create an empty secret and somehow in the container build we detect that and do nothing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants