jenkinsci | Unsorted

Telegram-канал jenkinsci - JenkinsCI

1998

repost from /r/jenkinsci using @r_channels

Subscribe to a channel

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

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

Simple Jenkins to K3s Deployment - Best tool?

I have a working Jenkins CI pipeline pushing Docker images to a registry.

Now I need a **separate CD pipeline** to deploy my app onto **K3s**.

* Manifests are in k8s/deployment.yaml and k8s/service.yaml in the same repo.

What is the recommended tool/method to get Jenkins to apply these YAML files to the K3s cluster?

shell steps, Jenkins Kubernetes Plugin, or something else?

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

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

JenkinsCI

Problem with tag ins Build View
https://redd.it/1pcdhns
@jenkinsci

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

JenkinsCI

Jenkins or GitHub Actions?

Hello software engineer here with angular java as a tech stack i learnt GA and felt quietly amused working with it. I heard jenkins is too customizable thna GA and it suits java devs more.

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

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

JenkinsCI

Use a paramater to specify ansible inventory?

I have these two inventories:

inventory/site1/hosts.ini
inventory/site2/hosts.ini

I want to create a parameter that my users specify when they run a pipeline that Jenkins then uses as a variable in the file path to determine which inventory to use.

inventory/{{environment}}/hosts.ini

Is there any way to do that or something similar?

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

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

JenkinsCI

Properly debug scripted pipeline in Organization Folder


Edit: I realized the title don't reflect the exact issue i am having. Sorry for that!

I'm completely new to Jenkins, and i have been build a scripted pipeline using a GitHub Organization Folder in Jenkins.

The job i am building involves using the built-in Docker Pipeline DSL to Build, Test, Package and Push a Python API, in a somewhat complex environment where Jenkins itself is running inside a container and Docker on another (DIND docker + sysbox-runc), both deployed into a Swarm Cluster.

Now, i am facing a lot of errors (my mistakes), since i am still learning.

And since the Pipeline Job is checked out from the SCM, every attempt to fix my mistakes involves pushing a new commit and waiting for Jenkins receiving the Webhook delivery.

Which works... However, you can imagine how tedious and unproductive this approach feels.

Also, if you look at the Organization dashboard on GitHub... It shames me so much...

Jenkins provides a validation tool but it only supports declarative pipeline jobs.

Is there anything i could do to possibly make the writing/editing of Organization Folder Jobs better in terms of productivity and efficiency?

I tried building with pipeline job first and then uploading to remote repository, however, some things like the checkout step environment variables not being set for pipeline jobs make the usage of other steps like "when {}" harder to implement and is making me avoid that approach...



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

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

JenkinsCI

pluguin ECS Fargate

Hello, has anyone used this plugin to administer or create services in Fargate? y si es asi tendrian algun ejemplo?

https://plugins.jenkins.io/amazon-ecs/

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

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

JenkinsCI

@Grab not loading dependencies from cache

Jenkins: 2.440.1
OS: Linux - 3.10.0-1160.36.2.el7.x86_64
Java: 17.0.10 - Eclipse Adoptium (OpenJDK 64-Bit Server VM)

I have developed a shared library that has come to a point where it requires java dependencies not bundled with jenkins.

I have been testing these features on a jenkins docker installation and using an agent configured to launch via SSH.

While on this environment, the \\@Grab annotations that I specify populate the cache under ${JENKINS_HOME}/.groovy/grapes, taking some time to download the dependencies, and uses that cache on subsequent runs; I verified that the cache is used by noticing that the stage that specifies that \\@Grab annotations takes only a couple of seconds to run.

The issue I am facing is that when I move to a Jenkins instance with the setup I referenced above it still fills the cache with the packages but does not use that cache on subsequent runs and still pulls them from an online repository.

I am having this issue with pipelines that run on kubernetes pods defined with the kubernetes plugin.

Version of the Kubernetes plugin in use: 4306.vc91e951ea_eb_d

Can someone help me with this issue?

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

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

JenkinsCI

Why can't jenkins-cli show me only enabled plugins?

This ought to be a no-brainer, but jenkins-cli list-plugins lists out all plugins even the disabled ones, and also without any indication in the output of a plugin's enabled/disabled state (so I could filter with grep). Also conspicuously missing is an uninstall-plugin command.

c'mon Cloudbees, it is 2025, this sort of thing ought to be a no-brainer and would be easy enough I would think to implement.

My use-case: Cloudbees Core/CI shop and I'm trying to get a dump of all enabled plugins across each of the managed Controllers.

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

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

JenkinsCI

Is this possible using Jenkins?

New to Jenkins. So basically my Linux Server has a different directory structure as compared to github. I want to transfer all my github files into linux server and vice versa (for one-time setup of github). Can I do it? Any resources would be helpful

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

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

JenkinsCI

I Don't Understand Environment Variables

ScmGit Checkout step doesn't set environment variables automatically in declarative pipeline, i already learned that, however it says it returns some values to the step so one can set them manually.

I tried the following, and it never works.

What am missing? How can i set these variable to use down the pipeline job?

I need to set these variables so i can reference later in the build step.

[Output of the code snippet](https://preview.redd.it/j3ugpv9iu3uf1.png?width=744&amp;format=png&amp;auto=webp&amp;s=5d45c31bb2c5255904515c9718e72f7b5c60d0e5)

stage('Git Checkout SCM') {
steps {
cleanWs()
script {
def scmVars = checkout scmGit()
def gitUrl = scmVars.GIT_URL
def repoName = gitUrl.tokenize('/')[-1]
if (repoName.endsWith('.git')) {
repoName = repoName.substring(0, repoName.length() - 4)
}
env.GIT_REPO_NAME = repoName
echo "var $repoName"
}
echo "env var ${env.GIT_REPO_NAME}, $env.GIT_REPO_NAME"
// sh "echo env var $GIT_REPO_NAME" // # Runtime Error no such property even though this is valid shell synthax
}
}

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

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

JenkinsCI

Run certain job exclusively on node (ensure no other jobs run)

Hi.
This was harder to Google than I anticipated.
I have a scenario now where I want to run a maintenance/cleanup job on nodes periodically, and I want those jobs to run exclusively on the nodes - i.e. no other job is allowed to run when the maintenance-job runs.

I can't seem to find a way, either natively nor with plugins, to implement this.
My best idea right now is programming into the maintenance-pipeline to call `setTemporarilyOffline(true)` and wait for any ongoing jobs etc to finish before continueing with the maintenance, and finally set it back online.

Am I missing or misunderstanding the options, or this my best bet?

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

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

JenkinsCI

updated old jenkins and now cannot run jdk11 maven jobs

probably n-th topic on that issue: so basically, i have upgraded old (over 1 year) jenkins install to one that needs jdk17 at minimum.

i have already setup node to run agent jar (via ssh) with jdk17, and have a job that runs maven with jdk11 (provided by jenkins in jdk installation settings) and this happens:


( formatted for readability )

[job_name] $ /home/jenkins/tools/hudson.model.JDK/openjdk-11.0/openlogic-openjdk-11.0.22+7-linux-x64/bin/java -Xmx2g
-XX:MaxPermSize=1G
-Dmaven.test.failure.ignore=false
-cp /home/jenkins/maven35-agent.jar:
/home/jenkins/tools/hudson.tasks.Maven_MavenInstallation/maven-3.6.1/boot/plexus-classworlds-2.6.0.jar:
/home/jenkins/tools/hudson.tasks.Maven_MavenInstallation/maven-3.6.1/conf/logging/jenkins.maven3.agent.Maven35Main
/home/jenkins/tools/hudson.tasks.Maven_MavenInstallation/maven-3.6.1
/home/jenkins/remoting.jar
/home/jenkins/maven35-interceptor.jar
/home/jenkins/maven3-interceptor-commons.jar
44447

OpenJDK 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
Exception in thread "main" java.lang.UnsupportedClassVersionError:
hudson/remoting/Launcher has been compiled by a more recent version of the Java Runtime
(class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0


so it would seem that somehow the jenkins remoting,jar (which is jdk11 incompatible) gets invoved in the maven process and breaks everything. How can i work this around, since production is stuck on jdk11 and they aren't going to migrate away anytime soon ?

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

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

JenkinsCI

Jenkins not respecting scm.branches when triggered by git plugin webhook

I'm pretty sure this post asks for the exact opposite of what many issues I've encountered while looking for a solution to my problem were trying to solve, but here goes.

My goal is to have a pipeline perform a given task for any Merge Request on my Gitlab repository that would request it using a Gitlab MR Comment. Said task is to be performed by a given Groovy script (let's call it Parent.groovy) that would checkout the source, load multiple Groovy files in turn (let's call them children) and then run methods defined in those children scripts.

Notably however, the code that runs within this pipeline in order to perform said task must always reflect the state of my repository's main branch in order for its behavior to be the same regardless of which Merge Request requests it and for changes made to scripts to apply immediately to every Merge Request without having to rebase their source branch onto main.

My setup is as follows:

I have a Jenkins pipeline set to listen for Gitlab webhooks using the Build when a change is pushed to Gitlab feature with Comments as its trigger
The pipeline has its Branches to build set to refs/heads/main
The pipeline has its Script Path set to my Parent.groovy file
Other pipeline settings are nothing out of the ordinary:
lightweight checkout
sparse checkout of just the directory containing the children scripts
shallow clone with a depth of 1
When a build starts, a checkout scm is performed then children scripts are loaded

If I were to start the build manually, everything works well: Parent.groovy is loaded by the Jenkins master from the main branch of my repository -as per the Branches to build setting- then said branch is checked out by checkout scm to the appropriate agent and children scripts are loaded. Printing out scm.branches to console indeed displays refs/heads/main.

My issue however comes in the intended use-case of my pipeline being triggered by a Gitlab webhook: If it were to receive a Comment event from a Merge Request that aims to merge, say, a my_source branch into any other branch, then again Parent.groovy is loaded by the Jenkins master from the main branch of my repository but this time checkout scm checks out the contents of my_source rather than main, completely disregarding the contents of the Branches to build setting. Worse even: printing out scm.branches to console still displays refs/heads/main to console and that despite main very much NOT being the branch that's being checked out.

Looking for solutions online has mostly yielded results from people WANTING their lone pipeline to check out source code from the branch that triggered the webhook and having to substitute build parameters and/or environment variables into the Branches to build setting whereas I seem to be encountering the exact opposite issue. All I've found that seemed to match my problem was this issue from 2021 that unfortunately does not yield any solution.

Does this ring a bell to anyone having attempted something similar? If so, what did you have to change in SCM configuration in order to fix things?

https://redd.it/1nwfqfy
@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

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

JenkinsCI

Pass variables from shell script step to Docker build step

We have a freestyle job that basically just builds a docker image and pushes it to the registry.

Now we want to read a file called VERSION from the repo and take the value to the next build step which is running the docker build.

But we cant set an env that carries over the steps. Is there a simple solution to it?

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

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

JenkinsCI

Question regarding shared library docs

The following is an excerpt from the official Jenkins doc:

>Avoid preserving state in global variables

>All global variables defined in a Shared Library should be stateless, i.e. they should act as collections of functions. If your pipeline tried to store some state in global variables, this state would be lost in case of Jenkins controller restart. Use a static class or instantiate a local variable of a class instead.

I'm a bit confused regarding the wording as wouldn't a static class lose state in case of a Jenkins controller restart as well? It seems that the excerpt is implying that this wouldn't happen.

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

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

JenkinsCI

Any Jenkins GUI plugins actually worth using in production?

I’m running Jenkins LTS in a production-ish environment and I’m wondering if there are any GUI-related plugins that are actually worth installing beyond pure cosmetics.

I’m aware of things like Blue Ocean, Simple Theme, Dashboard View, etc., but it’s hard to tell what people really use in 2025 and what’s essentially abandoned or just “looks nice in a demo”.

What I’m looking for:

* plugins that genuinely improve day-to-day usability (pipeline visibility, navigation, dashboards, multi-team views, etc.),
* things you would *actually* keep enabled on a long-lived production master,
* and, just as important, anything GUI-related you’d avoid in prod (stability, performance, maintenance headaches).

If you were setting up a fresh Jenkins for a team today, would you even consider changing GUI / UX?

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

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

JenkinsCI

Distributed Jenkins

Hey, has anyone know of any attempt to try to re-engineer Jenkins to allow for multiple controllers to share the same jobs , agents and build queue?

This way you could bring one of the controllers down, update it to a newer version and bring it back. No downtime.

I know this is not so simple, because the config can get migrated when upgrading to a newer Jenkins version, especially for plugins, so the new and old controller may not be backward compatible.

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

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

JenkinsCI

Why is there a time discrepancy between Jenkins scheduled jobs and manual builds?

Why is there a time discrepancy between Jenkins scheduled jobs and manual builds?

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

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

JenkinsCI

Integrating Device Farm into CICD pipeline.

How are you solving the need of executing test suite on real devices sitting in office when your pipeline is in cloud or in other office's server room?

Has anyone tried integrating private device farm solution like AstroFarm into existing CICD pipeline?

Any experience or any inputs on this one?

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

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

JenkinsCI

jk - GitHub CLI-style interface for Jenkins (built for Claude Code/Codex workflows)

I built `jk` to bring `gh`\-style workflows to Jenkins while using Claude Code and Codex. Instead of clicking through the web UI, you can manage builds from the terminal with structured output that coding agents can consume.

**Why another Jenkins CLI?**

Jenkins has an official CLI (java -jar jenkins-cli.jar) that's great for both developer and admin tasks. I wanted `gh`\-style ergonomics with context management and JSON/YAML output for AI agents - plus it was a fun excuse to write Go.

**Examples:**

# Trigger builds (vs: java -jar jenkins-cli.jar -s URL -auth user:token build job -p PARAM=value)
jk run start api/deploy --param ENV=staging --follow

# Search build history (pipe to Claude/Codex)
jk run search --filter result=FAILURE --since 24h --json

# Download artifacts with glob patterns
jk artifact download api/build 42 -p "**/*.xml" -o ./reports/

**Features:**

* Context-aware auth (manage multiple Jenkins controllers)
* `gh`\-style subcommands vs Java jar invocation
* JSON/YAML output for scripting and AI agents
* Rich filtering (`--filter param.ENV=prod`, `--since 7d`)
* Glob patterns for job discovery

**Installation:**

go install github.com/avivsinai/jenkins-cli/cmd/jk@latest
jk auth login https://jenkins.company.com

**Details:**

* Open source (MIT): [github.com/avivsinai/jenkins-cli](https://github.com/avivsinai/jenkins-cli)
* Built in Go, cross-platform
* Early release - feedback welcome

Built this for my own Claude Code workflow, sharing in case it helps others who prefer terminal over browser.

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

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

JenkinsCI

MacOS Sequoia 15.6.1 Freezes

Hey y’all - I manage a Jenkins controller with several MacOS agents attached. I recently upgraded the agents from Sonoma to Sequoia 15.6.1, and now about 10% of shell commands are freezing pipeline execution… forever. Any shell command, no matter what the content, can cause the pipeline build to stop executing. It just hangs indefinitely. This can only be fixed by terminating the build and restarting the agent.

This occurs across both pipeline and freestyle jobs. Checked a bunch of stuff: running threads, disk usage, etc. - no dice. For extra info, my MacOS agents are running Apple Silicon. Anyone seen anything similar on MacOS 15.6.1? If so, how did you resolve it?

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

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

JenkinsCI

Jenkins Trimming Password After "=" Symbol.

I have a password stored in Jenkins which has an "=" character in the middle.

And when the Jenkins job is running, Jenkins is dropping everything after =.

For Example:

Credentials ID: ame

Username: m11111

Password: 8W/RAbwFZXF+2kot=99

So the "=99" is getting dropped and the build fails.

So I Googled a bit:

I surrounded the code block with the lines:

withCredentials([usernamePassword(credentialsId: 'ame', usernameVariable: 'AME_USERNAME', passwordVariable: 'AME_PASSWORD')]) {

sh 'echo $AME_USERNAME'

sh 'echo $AME_PASSWORD'

.

.

.

}

But it still fails because of the incomplete password.

Any help on this would be much appreciated. Totally lost at this point.

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

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

JenkinsCI

Announcing the new Bitwarden Credentials Provider Plugin for Jenkins

A new plugin is now available for integrating Bitwarden with Jenkins: the Bitwarden Credentials Provider.

This plugin dynamically exposes items from a Bitwarden or self-hosted Vaultwarden vault as native Jenkins credentials (like Username/Password, SSH Keys, and Secret Files) for direct use in your pipelines. It's JCasC-compatible and securely fetches secrets on-demand, never caching them in Jenkins.

Feedback and contributions are welcome.

Github

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

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

JenkinsCI

When I try to search for users or groups no results appear

Jenkins setup:

Jenkins version: 2.504.2
Azure AD Plugin: 618.v424da_973ffe8

Issue:

I’m using Azure AD for authentication in Jenkins. Authentication itself works fine, and the app registration (App ID, Tenant ID, Client Secret) is 100% correct. I’ve tested it in another environment with the exact same credentials and plugin versions.

However, in the “Entra ID Matrix-based security” UI, when I try to search for users or groups (by name or object ID), no results appear.

Key detail:

When I go to “Verify Configuration” and test a user using the “Test user principal name or object id” field, it returns the user successfully.

So, the backend connection to Azure AD and Graph API is clearly working, the issue seems to be only in the Matrix-based security UI.

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

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

JenkinsCI

Proper way to share files from a jenkins container to host without UID mismatch?

I have a jenkins container running inside docker, jenkins checks out source code as UID 1000 ('jenkins') then on the host where I run a windows VM to perform the build they end up owned by 'ubuntu' (UID 1000 on the host).

The vm runs as 'john', and john doesn't have write access to the source code owned by 'ubuntu'.

I've seen various different answers for this, like using bindfs, or using a shared group on the host which contains both 'ubuntu' and 'john' then chmod+chown'ing the files after checkout to be group writable.

What is the proper way to solve this?

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

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

JenkinsCI

Kubernetes Jenkins Root CA replacement

Hey all, I am tasked with setting up a Kubernetes Jenkins environment in a network that is completely isolated from the external internet. I got the controller up and running in Kubernetes using the helm charts here: https://github.com/jenkinsci/helm-charts . I am also using bitbucket as the git repo. I have verified it is set up correctly in Jenkins.

I am running into an issue that when my Jenkins controller try's to connect to the bitbucket instance it is not trusted because it is using self signed root CA certificates from within the network and it cant reach any outside CA's. I have the root CA certificate that would allow for this communication but I haven't figured out how to mount it into the Jenkins container without rebuilding the container. I essentially want to put it into the /etc/ssl/certs folder so that it is trusted by the system.

Everything I try doesn't mount it into that location. I am looking at having to alter the helm chart but I was wondering if anyone has any idea on how I would achieve this before going down that road? I am fairly new to Kubernetes/helm.

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

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

JenkinsCI

How to fix a Jenkins pipeline for a 100+ flavor Flutter app? My build times are over 30 hours.

Hey everyone,

I'm hoping to get some advice and validation on a pipeline strategy for a large white-label Flutter project.



# The Setup



One Flutter codebase.
100+ flavors for unique customer apps (Android & iOS).
A Jenkins pipeline that builds and deploys all of them.



# My Core Problems in Question Form:



1. How do I solve insane build times? Each flavor takes \~20 minutes to build. For 100+ apps, the total pipeline time is completely unmanageable. My current workaround is batching, but that just breaks a long wait into smaller long waits.
2. How do I reduce the massive storage footprint? Each flavor build is generating 1-1.5 GB of artifacts. Is this normal, or is there a way to drastically reduce this?
3. Is my current build logic fundamentally wrong? My Jenkins pipeline creates a clean, isolated workspace for every single flavor and runs `flutter clean` before each build. I thought this was safe, but I suspect it's the source of all my problems.



# The Proposed Solution: Aggressive Caching



After some research, I'm planning to refactor my entire `Jenkinsfile` around a shared caching strategy. Does this sound like the right approach?

Is it best practice to completely remove flutter clean from the build loop and only use it for debugging?
Should I use a single, shared workspace for all my flavor builds on a given build agent (e.g., one workspace on my Windows node for all Android builds)? The goal would be to let Flutter's build cache (`/build`) and Gradle's cache (`/.gradle`) be reused across every single run.
Should I always enable Gradle's build cache (-Dorg.gradle.caching=true) for this kind of project?

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

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