jenkinsci | Unsorted

Telegram-канал jenkinsci - JenkinsCI

1919

repost from /r/jenkinsci using @r_channels

Subscribe to a channel

JenkinsCI

GenericTrigger for Bitbucket tag pushes requires manual "Build Now" before first webhook trigger works — any way around this?

Hey all,

I'm using the **Generic Webhook Trigger plugin** in a **scripted pipeline** to trigger a CI job when a tag is pushed to Bitbucket.

My `pipelineTriggers` is defined inside `properties()` in the Jenkinsfile like this:

properties([
pipelineTriggers([
[$class: 'GenericTrigger',
genericVariables: [
[key: 'ref_type', value: '$.push.changes[0].new.type'],
[key: 'tag_name', value: '$.push.changes[0].new.name'],
],
token: 'my-token',
regexpFilterExpression: '^tag$',
regexpFilterText: '$ref_type'
]
])
])


The problem is that the trigger only gets **registered after the first manual build**. So for any new pipeline job, I have to:

1. Create the job
2. Click **Build Now** once
3. Only then do tag push webhooks actually trigger the pipeline

Is there any way to have the trigger registered **without** that first manual run? I know I can configure it in the job UI instead of the Jenkinsfile, but I'd prefer to keep it version controlled.

Using Jenkins 2.x, Bitbucket Cloud, Generic Webhook Trigger plugin.

https://redd.it/1rpz56t
@jenkinsci

Читать полностью…

JenkinsCI

Production-ready Jenkins cluster architecture for AWS (open source)

Hello everyone, I’m sharing an open source project that provides a production-oriented Jenkins cluster architecture designed for deployment on AWS.

The repository offers a structured, reproducible setup for running Jenkins in a distributed and scalable way, including a controller and multiple agent nodes. It is intended as a practical reference implementation for teams that want a reliable clustered CI/CD environment without designing the architecture from scratch.

The goal is to make it easier to deploy, understand, and adapt a Jenkins cluster for real-world workloads in AWS.

Repository:

https://github.com/pancudaniel7/jenkins-distributed-architecture

Feedback, suggestions, and contributions are welcome. If you find the project useful, I would appreciate a star!

https://redd.it/1rhtge6
@jenkinsci

Читать полностью…

JenkinsCI

why is jenkins so tricky with environment variables and scope?

I've been doing Jenkinsfiles for almost two years now and it's always a problem. It's often just easier to create text files and use them to pass variables through the different stages. It's even trickier than the different variable substitution rules of sh with single quotes and sh with triple quotes, which is equally fraught with error.

I mean for instance, is this Gemini response to an issue I was having actually correct? I mean, if so, then FFS..

You are absolutely right to ask—if it was initialized to '' in the environment block and supposedly updated via readFile, why would it suddenly be ? null

The issue stems from a quirk in Jenkins Declarative Pipelines regarding how the env object is handled.

When you define a variable in the environment { ... } directive, Jenkins sets it up for the pipeline. However, when you later update it inside a script { ... } block using env.HUB_TYPE = ..., Jenkins handles this as a runtime override. Due to how Jenkins serializes pipeline state between steps (especially before dropping into a sh block), those overridden env properties can sometimes fail to serialize correctly or get "lost" during Groovy string interpolation, evaluating to on the Jenkins master node right before it passes the script to the agent. null

To completely bypass Jenkins' Groovy interpolation quirks, the safest and most robust practice is to let the shell (Bash) handle the variable instead of Groovy. Since HUB_TYPE is pushed to the shell environment, we can just read it directly in Bash and lower-case it using standard shell commands.

https://redd.it/1rg177k
@jenkinsci

Читать полностью…

JenkinsCI

Pay-per-use Sensor Data Exchange between IoT Devices by Blockchain and Smart Contract
https://youtu.be/FXU23QXdu8A?si=O7j8J_Cwe3Ycqn3L

https://redd.it/1qma1nd
@jenkinsci

Читать полностью…

JenkinsCI

Agents on spot instances

I got a requirement to use spot for simple pipeline that takes about 10 minutes.

i use ec2 fleet plugin, with termination idle time above 20 minutes.

i get interrupted every 2-3 builds.

i changed my instance types to:

\- c6a.4xlarge

\- c7i.4xlarge

\- c6a.2xlarge

\- c6i.2xlarge

\- c7i.2xlarge

Im here to get an advise one this topic, is this an anti pattern to rely on spot instance for my main pipeline that is triggered on every push to develop branch by developers?

my region is us-east-1

https://redd.it/1qkxnn1
@jenkinsci

Читать полностью…

JenkinsCI

RISC-V Kubernetes cluster with Jenkins on 3x StarFive VisionFive 2 (Lite)
https://youtube.com/watch?v=641TnJyHt4g&si=AqXuJ3-A5M7PkQjS

https://redd.it/1qj4wna
@jenkinsci

Читать полностью…

JenkinsCI

Any plugins to sync a Job config with an SCM?

I'm looking for a way to be able to store our job configs within Git and have Jenkins sync the job with that.
Are there any plugin out there that do this? I've not been able to find any.
(Also am I just overcomplicating it for the sake of it at this point?)

https://redd.it/1qbn5so
@jenkinsci

Читать полностью…

JenkinsCI

What is on your Jenkins wish list?

Love it or hate it Jenkins is here, previlent and gets the job done for a large portion of the industry.

The majority opinion is that jenkins feels outdated. Although the jenkins maintainers are doing a great job updating the user experience to feel more modern, what is on your wishlist to have jenkins compete with other newer CI-CD systems?

For me personally I would love:

\- Jenkins picks up a repository of pipelines and automatically loads them in. Instead of having to rely on creating a jobdsl script to bootstrap your pipelines.

\- Jenkins branch builds can trigger on a vareity of change types easily. Github and Gitlab allow you to create stuff like "on_pr to this pattern in my code base"

\- Jenkins parameters can be picked up automatically from pipeline source and not require an initial build to "populate" them

\- Errors in `script{}` blocks are easy to track down. A stack trace currently does not easily point out the line where the error happened in your pipeline definition

\- More built in functionality. Obviously a tall order, but if jenkins could come built-in with more core functionality then users might be able to avoid plugin-update-hell. Some plugins that should come built in that I can think of: configuration-as-code, jobdsl, <secret provider type plugins>, prometheus, docker, kubernetes, rebuild.

\- And most unlikey. I don't have many problems with using groovy (except the handling of maps is the worst [:\]), but Its clear that yaml is winning in the CI space. Im so used to Jenkins where yaml pipelines feel unatural compared to groovy, but users who aren't used to groovy as preferring yaml pipelines.

What is on your wish list?

https://redd.it/1ppwweo
@jenkinsci

Читать полностью…

JenkinsCI

Would a native iOS app for Jenkins builds be useful?

Thinking about building a minimal iOS app to check Jenkins builds, view logs, and maybe restart jobs.
Mostly for quick checks during on-call or when you’re away from a laptop. Not trying to replicate the full UI: just the 20% of actions that matter on mobile.

Would this be useful to you? Or do most people just manage Jenkins from their laptop and leave it at that?

https://redd.it/1pre5gs
@jenkinsci

Читать полностью…

JenkinsCI

Installing Jenkins on Ubuntu 24.04 LTS (Updated for Noble Numbat)

Appreciate your claps and comments on the Medium article.
m.salah.azim/how-to-install-jenkins-on-ubuntu-24-04-5c33253984c5" rel="nofollow">https://medium.com/@m.salah.azim/how-to-install-jenkins-on-ubuntu-24-04-5c33253984c5


With Ubuntu 24.04 being the current LTS, I noticed some people hitting small snags with older installation tutorials (specifically around Java dependencies and repo setups).
​I’ve put together a fresh, step-by-step guide specifically for Ubuntu 24.04. It covers:
​Setting up the correct Java environment (OpenJDK 17/21).
​Proper repository configuration.
​Adjusting firewall settings (UFW).
​Initial setup wizard and best practices.
​Hopefully, this helps anyone currently migrating their build servers to the latest Ubuntu LTS!
​Link:
m.salah.azim/how-to-install-jenkins-on-ubuntu-24-04-5c33253984c5" rel="nofollow">https://medium.com/@m.salah.azim/how-to-install-jenkins-on-ubuntu-24-04-5c33253984c5


​Is anyone here running Jenkins on 24.04 in production yet, or are most of you still on 22.04?

https://redd.it/1q3406b
@jenkinsci

Читать полностью…

JenkinsCI

New to jenkins

I am new to jenkins . I don't know what are the day to day task in jenkins . If an yy one know explain me . So that I get some real time knowledge

https://redd.it/1pw3awy
@jenkinsci

Читать полностью…

JenkinsCI

Getting the following error

https://redd.it/1q07qtw
@jenkinsci

Читать полностью…

JenkinsCI

Upgrading Jenkins to the latest version had many pitfalls, but all were addressed.

1. 安装最新版本的Jenkins。
2. 安装插件。
3. 复制工作。
4. 复制视图结构。
5. 配置全局参数,比如MSBuild、SSH推送和GitLab账户。

https://redd.it/1q05wlo
@jenkinsci

Читать полностью…

JenkinsCI

New to jenkins

I am new to jenkins . I don't know what are the day to day task in jenkins . If an yy one know explain me . So that I get some real time knowledge

https://redd.it/1pw3awy
@jenkinsci

Читать полностью…

JenkinsCI

How to measure per-build CPU/memory/I/O usage for Jenkins jobs running on shared EC2 agents?

Hi all,

We’re trying to capture resource usage per individual Jenkins build (CPU%, memory, disk I/O) for jobs that run on AWS EC2 instances as Jenkins agents.

We can already collect instance-level metrics (CloudWatch / node metrics), but the problem is that a single EC2 agent can run multiple builds (either concurrently on different executors or sequentially), so instance-wide metrics don’t tell us which build consumed what.

Constraints / context:

Agents are EC2 VMs (Linux; happy to specify if it matters)
Multiple Jenkins jobs/builds can run on the same agent
We prefer a solution that doesn’t require modifying each Jenkinsfile/job steps (we have many existing jobs)
We’re looking for per-build metrics like:
avg/max CPU%
peak/avg RSS (memory)
disk read/write throughput / ops
ideally exported somewhere (Prometheus/CloudWatch/Influx/etc.) or attached to the build

Questions:

1. Is there any existing Jenkins plugin or standard approach that can provide per-build resource usage on shared agents?
2. If not, what approaches have people used successfully? (e.g., process-tree tracking per executor, cgroups, running one build per node, custom agent-side monitoring + build start/stop hooks)
3. Any recommended tools for attributing CPU/mem/I/O to a build’s process tree reliably?

Appreciate any pointers, war stories, or “don’t do this, do that instead” advice.

https://redd.it/1pqfapk
@jenkinsci

Читать полностью…

JenkinsCI

Jenkins analytics app

I made a saas service that allows you to analyze your builds, test results, and have triage workflows. You can tag 🏷️ builds and test failures with jira tickets and improve the efficiency around triage.

You can collect data from multiple Jenkins servers. It also sends rich slack messages and emails. It also has AI integration to ask questions of your ci data

I am looking for some beta testers who would like to take it for a spin and give me some feedback. It is a really useful app and want to get your opinion.

You just need to install our plugin that ingests data and sends it to our backend where it is stored in a dedicated postgres db per customer

The docs and website should be up in a few days and I will have a discord channel

Teaser Video

https://redd.it/1rjez23
@jenkinsci

Читать полностью…

JenkinsCI

Anyone running Jenkins pipelines to Xelon cloud VMs or clusters?

Has anyone here wired Jenkins directly to Xelon for deployments (VMs or Kubernetes clusters)?
Right now I’m using basic shell steps and their CLI from the pipeline, but I’m not sure if there’s a cleaner pattern I’m missing.
If you’ve got a simple Jenkinsfile snippet or rough approach that worked well with Xelon, would be great to hear how you structured it.

https://redd.it/1re9l0u
@jenkinsci

Читать полностью…

JenkinsCI

How do you enforce consistency in large Jenkins Scripted Pipelines?

One thing that has consistently bothered me about Jenkins Scripted Pipelines:

There are simply too many ways to implement the same logic.

Retry handling, conditional execution, failure processing — everything can be written in wildly different styles depending on the person.

Over time I kept running into issues like:

- The same retry logic implemented differently across pipelines
- Failure handling scattered across try/catch blocks
- Branch conditions expressed inconsistently
- Pipelines diverging in structure and readability
- Code reviews turning into style debates instead of behavior reviews

Jenkinsfiles allow a lot of flexibility, but that flexibility makes it hard to maintain structural consistency across teams.

At some point, this becomes a scaling problem.

To address this, I experimented with introducing a thin abstraction layer via a shared library.

The goal was not to hide Jenkins, but to standardize cross-cutting concerns like:

- retry semantics
- conditional execution
- failure handling
- stage structure

Instead of letting each stage reinvent those patterns.

For example:

With abstraction

Stage('deploy', [when: BranchPatternPolicy('main')]) {
sh 'make deploy'
}


Typical raw scripted pipeline

stage('deploy') {
if (env.BRANCH_NAME == 'main') {
try {
sh 'make deploy'
} catch (e) {
currentBuild.description = ...
throw e
}
} else {
catchError(...) { ... }
}
}


This approach made stage behavior more predictable and reduced stylistic variance between pipelines.

I packaged this idea into a small shared library:

https://github.com/lyh4215/jent

I’m interested in how others approach this problem.

Have you run into structural inconsistency issues in Scripted Pipelines?

If so, how did you solve them — strict conventions, Declarative only, shared libraries, or something else?

https://redd.it/1r5u18j
@jenkinsci

Читать полностью…

JenkinsCI

Jenkins for open source

Hi everyone,
I’m a student developer trying to get started with contributing to Jenkins core / plugins. I’ve been exploring issues, reading through PRs, and trying to understand the overall workflow, but I’d really appreciate some guidance from experienced contributors.
Specifically, I’d love advice on:
How you usually pick beginner-friendly issues
Common mistakes new contributors make (and how to avoid them)
How to best understand Jenkins core vs plugin architecture
tips for setting up the local dev environment smoothly

https://redd.it/1qlpj2l
@jenkinsci

Читать полностью…

JenkinsCI

Where can i find reliable sources about the Jenkins structure and functionalities?

Hey i am currently working on my Diploma Thesis which contains a part where i have to describe Jenkins but i am not able to find any good and reliable sources. I looked on the official website but there is only a description for certain terms and not the whole structure. Also i found this article by geeksforgeeks but this isn't a valid source.
Can somebody please help me?

https://redd.it/1qhbhes
@jenkinsci

Читать полностью…

JenkinsCI

Pipeline with vercel commands

Hi guys, I'm here today because I have a problem, a really BIG problem. I have been using Jenkins for years but today I'm trying to build a TurboRepo with 4 apps and deploy it to vercel. I made a multi-branch pipeline, with a docker agent with pnpm and vercel installed. when the pipeline run "vercel build ...", the project is configured to run a command defined in the package.json and then this appens

+ vercel build --cwd apps/app1 --token
Vercel CLI 50.1.3
WARN! Build not running on Vercel. System environment variables will not be available.
Detected pnpm-lock.yaml version 6 generated by pnpm@8.x
Running "install" command: pnpm first-install...
Error: spawn sh ENOENT

https://redd.it/1qbvfks
@jenkinsci

Читать полностью…

JenkinsCI

Is there a way to send the Jenkins console build log to an MS Teams channel?

Hi, I have a use case where I need to send the Jenkins build log to a teams chat channel. Is there any plugin or another way to achieve this task.

Thanks

https://redd.it/1qantu4
@jenkinsci

Читать полностью…

JenkinsCI

How to measure per-build CPU/memory/I/O usage for Jenkins jobs running on shared EC2 agents?

Hi all,

We’re trying to capture resource usage per individual Jenkins build (CPU%, memory, disk I/O) for jobs that run on AWS EC2 instances as Jenkins agents.

We can already collect instance-level metrics (CloudWatch / node metrics), but the problem is that a single EC2 agent can run multiple builds (either concurrently on different executors or sequentially), so instance-wide metrics don’t tell us which build consumed what.

Constraints / context:

Agents are EC2 VMs (Linux; happy to specify if it matters)
Multiple Jenkins jobs/builds can run on the same agent
We prefer a solution that doesn’t require modifying each Jenkinsfile/job steps (we have many existing jobs)
We’re looking for per-build metrics like:
avg/max CPU%
peak/avg RSS (memory)
disk read/write throughput / ops
ideally exported somewhere (Prometheus/CloudWatch/Influx/etc.) or attached to the build

Questions:

1. Is there any existing Jenkins plugin or standard approach that can provide per-build resource usage on shared agents?
2. If not, what approaches have people used successfully? (e.g., process-tree tracking per executor, cgroups, running one build per node, custom agent-side monitoring + build start/stop hooks)
3. Any recommended tools for attributing CPU/mem/I/O to a build’s process tree reliably?

Appreciate any pointers, war stories, or “don’t do this, do that instead” advice.

https://redd.it/1pqfapk
@jenkinsci

Читать полностью…

JenkinsCI

Did we get jenkins report daily Job Name : backend-daily-ci Build Number : #159 Status : SUCCESS Duration : 2 min 45 sec Branch : main Commit Author : Priya Sharma Commit Hash : 1d92abf Tests: - Total Tests: 142 - Passed : 140 - Failed : 2 - Skipped :



https://redd.it/1pw3g1e
@jenkinsci

Читать полностью…

JenkinsCI

What are most common issues faced in jenkins ..

Hey. I want to know that what are the issues. You faced in jenkins most in your daily task . how do to you resolve it. Recommend me a short way to it.

https://redd.it/1q325od
@jenkinsci

Читать полностью…

JenkinsCI

Upgrading Jenkins to the latest version had many pitfalls, but all were addressed.

1. 安装最新版本的Jenkins。
2. 安装插件。
3. 复制工作。
4. 复制视图结构。
5. 配置全局参数,比如MSBuild、SSH推送和GitLab账户。

https://redd.it/1q05wlo
@jenkinsci

Читать полностью…

JenkinsCI

Getting the following error

https://redd.it/1q07qtw
@jenkinsci

Читать полностью…

JenkinsCI

Did we get jenkins report daily Job Name : backend-daily-ci Build Number : #159 Status : SUCCESS Duration : 2 min 45 sec Branch : main Commit Author : Priya Sharma Commit Hash : 1d92abf Tests: - Total Tests: 142 - Passed : 140 - Failed : 2 - Skipped :



https://redd.it/1pw3g1e
@jenkinsci

Читать полностью…

JenkinsCI

Would a native iOS app for Jenkins builds be useful?

Thinking about building a minimal iOS app to check Jenkins builds, view logs, and maybe restart jobs.
Mostly for quick checks during on-call or when you’re away from a laptop. Not trying to replicate the full UI: just the 20% of actions that matter on mobile.

Would this be useful to you? Or do most people just manage Jenkins from their laptop and leave it at that?

https://redd.it/1pre5gs
@jenkinsci

Читать полностью…

JenkinsCI

jk: Jenkins CLI designed for automation (and AI agents) - would appreciate feedback

I built a CLI for Jenkins called jk. The goal was to make Jenkins scriptable in a way that works well with automation and AI coding agents and similar to GH (actions).



Main features:
\- Structured --json/--yaml output with versioned schemas

\- --with-meta flag that returns available filters, operators, and inferred parameters (useful for agents to self-discover capabilities)

\- jk help --json exposes the full command tree programmatically

\- Exit codes mapped to build results (SUCCESS=0, UNSTABLE=10, FAILURE=11)

\- GitHub CLI-style UX (contexts, --follow for logs, etc.)



Some things you can do:

jk search --folder platform --job-glob "*deploy*" --since 24h --json

jk run params team/api/deploy --source auto --json

jk log team/api/deploy 128 --follow



MIT licensed: https://github.com/avivsinai/jenkins-cli

I don't post much but would genuinely appreciate feedback from people who use Jenkins daily (with Claude Code/Codex etc.)

https://redd.it/1ppw2i0
@jenkinsci

Читать полностью…
Subscribe to a channel