question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Committime exporter won't capture metrics from JenkinsPipeline strategy Builds

See original GitHub issue

In the following method, it is assumed that a JenkinsPipeline Build will generate another Build to fetch metrics from. Currently we only use Builds with the JenkinsPipeline strategy, therefore we don’t get any metrics captured even when the Build has the correct associated metadata.

https://github.com/konveyor/pelorus/blob/49bf2d58cb22749e35d7088d64f7d510d4e67811/exporters/committime/collector_base.py#L192-L214

If we leave line 198 as follows, committime exporter starts to fetch metrics. lambda b: b.spec.strategy.type in ["Source", "Binary", "Docker", "JenkinsPipeline"],

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
weshayutincommented, Oct 10, 2022

@xacobecm the image will eventually be pulled in by OpenShift when the app is deployed, once the app associated with the image is deployed the annotations and labels will be read into pelorus if I understand things correctly [1]. Once the app is deployed if you can find the app’s image w/ oc get images this should work. @mpryc can check my math here 😃

[1] https://tomd.xyz/openshift-nexus-docker-registry/

0reactions
KevinMGrangercommented, Nov 28, 2022

@xacobecm we have a PR you can try (#729) to see if that helps.

To try it, use a s2i configuration for your committime deployment:

exporters:
  instances:
  - exporter_type: committime
    # other fields
    source_url: https://github.com/konveyor/pelorus.git
    source_ref: refs/pull/729/head

However, we must note: JenkinsPipeline builds have been deprecated since OpenShift 4.3, and our current policy is to only support the latest OpenShift version (4.11) and the version before (4.10). We want to encourage you to move towards a more general approach, using the image workflow.

You can annotate the image.openshift.io/v1/Image, or label the OCI image itself, e.g. the --label= flag for podman build. You can see more information about how to label / annotate things properly in our docs.

I know that the images live in an outside repository, but the Image resource should be present wherever the container using that image runs.

Please let us know if the PR works for you, and if you have any more questions about the image-based workflow!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Metrics - Jenkins Plugins
The metric is lazily created after the JVM starts up when the first build starts on that node. jenkins.node.offline.value (gauge). The number of ......
Read more >
Capture time taken by each pipeline stage in jenkins
seems to be the most elegant at first, but there is a problem with nested stages and branches. The duration of nested nodes...
Read more >
Learn how to monitor your Jenkins and the CI/CD Pipeline in 4 ...
Step 1: Collect Metrics with Telegraf​​ In the “Collect” stage, we need to collect metrics from Jenkins in a Prometheus format as follows:...
Read more >
opentelemetry-plugin/build-logs.md at master - GitHub
Jenkins pipeline build logs can be sent through OpenTelemetry Protocol in order to ... the traces of the pipeline builds and the health...
Read more >
Tutorial: Jenkins Pipeline file with Apache Groovy - Eficode
This Groovy tutorial for Jenkins will show you how to use Apache Groovy script to build a Jenkins pipeline. Groovy is suitable for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found