jenkinsci | Unsorted

Telegram-канал jenkinsci - JenkinsCI

1919

repost from /r/jenkinsci using @r_channels

Subscribe to a channel

JenkinsCI

Unable to update the Jenkins Plugin

Jenkins Version:- 2.462.3
Java version 21

Description of issue:- While upgrading the plugin the it failing

plugin version current: 4.1.0 -> 4.1.4

error logs:

java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 403 Forbidden"
at java.base/sun.net.www.protocol.http.HttpURLConnection.doTunneling0(HttpURLConnection.java:2271)
at java.base/sun.net.www.protocol.http.HttpURLConnection.doTunneling(HttpURLConnection.java:2143)
at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2909)
at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2818)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1929)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1599)
at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:223)
at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1323)
Caused: java.io.IOException: Failed to load https://updates.jenkins.io/download/plugins/atlassian-bitbucket-server-integration/4.1.4/atlassian-bitbucket-server-integration.hpi to /app/jenkins/plugins/atlassian-bitbucket-server-integration.jpi.tmp
at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1334)
Caused: java.io.IOException: Failed to download from https://updates.jenkins.io/download/plugins/atlassian-bitbucket-server-integration/4.1.4/atlassian-bitbucket-server-integration.hpi (redirected to: https://ftp.belnet.be/mirror/jenkins/plugins/atlassian-bitbucket-server-integration/4.1.4/atlassian-bitbucket-server-integration.hpi)
at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1368)
at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1925)
at hudson.model.UpdateCenter$
InstallationJob.run(UpdateCenter.java:2237)
at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1899)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:121)
at java.base/java.lang.Thread.run(Thread.java:1583)

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

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

JenkinsCI

Where does Jenkins build?

This is probably going to end up being a stupid question from a Noob. But here it is. I have python scripts in VS Code that commits & push to Git and GitHub. And I have Jenkins job(manual so far) that executes those scripts in a Linux server. I'm trying to configure Jenkins to start building when there is a new code available. But what I'm wondering is. How does Jenkins know where in the linux server it needs to place those scripts? Both Jenkins and the scripts do run in a same linux server. And I need these scripts to be placed in a specific directory. Unfortunately, I haven't come across a Youtube video that explains this part. Thanks for your help and insights!

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

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

JenkinsCI

Command duplication - Help needed

Hello everyone. I'm working on a Jenkins project that involves ssh-ing into a server and spinning up a container from an image that's been pulled from a local registry. Here's the stage that regulates the container creation process:

stage('Creating QA container...'){
when{
expression { env.BRANCH_NAME != 'master' }
}
steps{
sh """
ssh admin@NODE_IP
sudo docker stop FRONT_${DOCKER_IMAGE}_${env.BRANCH_NAME} || true
sleep 5
sudo docker rm FRONT_${DOCKER_IMAGE}_${env.BRANCH_NAME} || true
sleep 5
sudo docker run -d --name FRONT_${DOCKER_IMAGE}_${env.BRANCH_NAME} -p 7001:4200 ${DOCKER_REGISTRY}/${DOCKER_IMAGE}:qa
"""
}
}



Now, I'm seeing some consistency issues when Jenkins reaches this stage. Sometimes it removes the existing container just fine, but most of the time the pipeline fails right here and displays the following error message:

Error response from daemon: No such container: FRONT_MYPROJECT_BRANCH
Error response from daemon: No such container: FRONT_MYPROJECT_BRANCH
docker: Error response from daemon: Conflict. The container name "/FRONT_MYPROJECT_BRANCH" is already in use by container "CONTAINER_ID". You have to remove (or rename) that container to be able to reuse that name.
See 'docker run --help'.Error response from daemon: No such container: FRONT_MYPROJECT_BRANCH



The first two errors about the container not existing are expected, since I've removed it manually for testing purposes. The third one, however, is particularly confusing since it seems to be executing the run command twice for some reason.


Safe to say, this is the only time a docker run command is found in the entire pipeline, yet it seems to be trying to create a container twice using the same name.


Can anyone provide some guidance as to why this might be happening? I'm fairly confused since it seems to work like a charm about 5% of the time, the other 95% it behaves just as described above, without me changing anything.

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

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

JenkinsCI

Session not created Error

Hello all,

I have automated login through chromedirver, code is absolutely working fine in my local but in jenkins, it is failing and throwing below error.

System.InvalidOperationException : session not created: probably user data directory is already in use, please specify a unique value for --user-data-dir argument, or don't use --user-data-dir (SessionNotCreated)

These are the arguments i added to the options:
var options = new ChromeOptions();

options.AddArgument("--headless=new");

options.AddArgument("--disable-gpu");

options.AddArgument("--window-size=1920,1080");

options.AddArgument("--no-sandbox");

options.AddArgument("--disable-dev-shm-usage");

options.AddArgument("--disable-extensions");

options.AddArgument("--disable-popup-blocking");

options.AddArgument("--disable-infobars");

options.AddArgument("--remote-debugging-port=9222");

Can somebody help me in fixing the issue?



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

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

JenkinsCI

Need help

ailed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project spring-boot-demo: Fatal error compiling: error: invalid target release: 17 -> Help 1
ERROR
ERROR To see the full stack trace of the errors, re-run Maven with the -e switch.
ERROR Re-run Maven using the -X switch to enable full debug logging.
ERROR
ERROR For more information about the errors and possible solutions, please read the following articles:
Can you help me? Please

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

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

JenkinsCI

there are no updates floder in mirrors site, how can I update my instance and plugin

I deploy a jenkins instance in inner network, for last two years , I use a cloud inner mirror to update jenkins.

From 7 days ago , I find that check update will failed because of there is no updates folder in mirror.

use tuna mirror as an example:
https://mirrors.tuna.tsinghua.edu.cn/jenkins/

there was an updates in jenkins/

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

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

JenkinsCI

Upgrading jenkins and plugins

My current jenkins version 2.361.1 is pretty out dated and i need to upgrade it, the issue is that all the plugins that are being offered at the Plugin Manager are for a newer version.

the result is that if i upgrade the jenkins version it fails to load the old plugins and if i upgrade the plugins version it fails to load because they are not compatible with my current version.

what is the best approach here? i have lots of plugins and pipelines on that machine so migrating everything to a new installation is not a good option.
i thought about manually and carefully installing plugins to their latest supported version and then upgrade the jenkins to the latest compatible until i'm reaching the latest, but is there anything that i can try before going through that huge manual process?

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

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

JenkinsCI

How to integrate Jenkins with Github

Hello, I wanted to share this tutorial about how to integrate Jenkins with github, hope you guys find it interesting. https://www.clickittech.com/devops/jenkins-with-github/

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

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

JenkinsCI

Multibranch Jenkins pipeline Integration with GitHub

A multi-branch Jenkins pipeline simplifies build processes for multiple parallel branches from a source code repository, such as git, by automatically detecting and creating jenkins pipelines for each branch. This eliminates the manual creation and configuration of pipelines for each branch, saving time and reducing the potential for errors. More importantly, it also takes care of clean-up tasks, meaning that if we delete a branch, it automatically removes the corresponding Jenkins pipeline associated with that branch.

This article explains how to create a multibranch Jenkins pipeline. You'll learn to configure Git webhooks to trigger the pipeline and build projects written in Go.

https://www.solutiontoolkit.com/2023/05/unlock-the-power-of-multibranch-jenkins-pipeline-integration-with-github/

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

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

JenkinsCI

New to Jenkins contributions

Hi I am newbie for open source contribution, I just want to start with Jenkins , could anyone one guide me with where to start?


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

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

JenkinsCI

Cron job with parameters randomly is triggered with wrong ones

My pipeline most of the time is triggered properly - arround 5:30 3 jobs are triggered with 3 different parameters. But sometimes they are triggered 3 times with 2 different parameters - one is triggered again.

pipeline {
agent {
kubernetes(getAgent('base-python'))
}

options {
buildDiscarder(logRotator(numToKeepStr: '50', artifactNumToKeepStr: '50'))
timeout(time: 45, unit: 'MINUTES')
}

triggers {
// https://www.jenkins.io/doc/book/pipeline/syntax/#cron-syntax
parameterizedCron('''H(30-40) 05 * * * % PROJECT_BRANCH=dev
H(30-40) 05 * * * % PROJECT_BRANCH=test
H(30-40) 05 * * * % PROJECT_BRANCH=prod
''')
}

parameters {
choice(
name: 'PROJECT_BRANCH',
choices: ['dev','test','prod'],
description: ' '
)
}

....

stage('Git checkout'){
steps{
currentBuild.description = "BRANCH = ${params.PROJECT_BRANCH}"
container('python'){
deleteDir()
git(
credentialsId: scm.userRemoteConfigs[0].credentialsId, // use credentials set by DSL job
poll: true,
url: "https://somerepo.git",
branch: params.PROJECT_BRANCH
)
}
}
}
.....

https://preview.redd.it/48zk3c95jfre1.png?width=278&format=png&auto=webp&s=32ef9851af463c9fe40933da54502b1c50b5c5ca

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

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

JenkinsCI

java.nio.channels.ClosedChannelException
at hudson.remoting.Request$1.get(Request.java:337)
at hudson.remoting.Request$1.get(Request.java:250)
at hudson.remoting.FutureAdapter.get(FutureAdapter.java:66)
at hudson.FilePath.copyRecursiveTo(FilePath.java:2837)
Also: hudson.remoting.ProxyException: org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: 9622c477-255e-422c-853b-0b9e287aca2c
Also: hudson.remoting.ProxyException: org.jenkinsci.plugins.workflow.support.steps.AgentOfflineException: Unable to create live FilePath for k8s-agent-testing-73-sq2nd-xcg0f-h6xzh; k8s-agent-testing-73-sq2nd-xcg0f-h6xzh was marked offline: Connection was broken
at PluginClassLoader for workflow-durable-task-step//org.jenkinsci.plugins.workflow.support.steps.ExecutorStepDynamicContext$FilePathTranslator.get(ExecutorStepDynamicContext.java:188)
at PluginClassLoader for workflow-durable-task-step//org.jenkinsci.plugins.workflow.support.steps.ExecutorStepDynamicContext$FilePathTranslator.get(ExecutorStepDynamicContext.java:160)
at PluginClassLoader for workflow-durable-task-step//org.jenkinsci.plugins.workflow.support.steps.ExecutorStepDynamicContext$Translator.get(ExecutorStepDynamicContext.java:153)
at PluginClassLoader for workflow-durable-task-step//org.jenkinsci.plugins.workflow.support.steps.ExecutorStepDynamicContext$FilePathTranslator.get(ExecutorStepDynamicContext.java:170)
at PluginClassLoader for workflow-durable-task-step//org.jenkinsci.plugins.workflow.support.steps.ExecutorStepDynamicContext$FilePathTranslator.get(ExecutorStepDynamicContext.java:160)
at PluginClassLoader for workflow-step-api//org.jenkinsci.plugins.workflow.steps.DynamicContext$Typed.get(DynamicContext.java:95)
at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.ContextVariableSet.get(ContextVariableSet.java:139)
at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsThread.getContextVariable(CpsThread.java:135)
at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsStepContext.doGet(CpsStepContext.java:297)
at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsBodySubContext.doGet(CpsBodySubContext.java:88)
at PluginClassLoader for workflow-support//org.jenkinsci.plugins.workflow.support.DefaultStepContext.get(DefaultStepContext.java:97)
at PluginClassLoader for credentials-binding//org.jenkinsci.plugins.credentialsbinding.impl.BindingStep$Callback.finished(BindingStep.java:247)
at PluginClassLoader for credentials-binding//org.jenkinsci.plugins.credentialsbinding.impl.BindingStep$Execution2$Callback2.finished(BindingStep.java:161)
at PluginClassLoader for workflow-step-api//org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution$TailCall.lambda$onFailure$1(GeneralNonBlockingStepExecution.java:157)
at PluginClassLoader for workflow-step-api//org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution.lambda$run$0(GeneralNonBlockingStepExecution.java:77)
Caused: hudson.remoting.ProxyException: java.io.IOException: Failed to extract /home/jenkins/agent/workspace/k8s-agent-testing/transfer of 1 files
at hudson.FilePath.readFromTar(FilePath.java:3083)
at hudson.FilePath.copyRecursiveTo(FilePath.java:2834)
at jenkins.model.StandardArtifactManager.archive(StandardArtifactManager.java:73)
at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:257)
at PluginClassLoader for workflow-basic-steps//org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:101)
at PluginClassLoader for workflow-basic-steps//org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:71)
at PluginClassLoader for workflow-step-api//org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:49)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at

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

JenkinsCI

Jenkins WebSocket Agent Disconnection Issues on Kubernetes

Hey everyone,

I'm running a Jenkins setup on Kubernetes (GKE) with dynamic agents, and I'm facing an issue where the agents go offline unexpectedly, causing builds to fail. The error message includes:
hudson.remoting.ProxyException: java.nio.channels.ClosedChannelException

and org.jenkinsci.plugins.workflow.support.steps.AgentOfflineException: Unable to create live FilePath

hudson.remoting.ProxyException: java.nio.channels.ClosedChannelException
at jenkins.agents.WebSocketAgents$Session.closed(WebSocketAgents.java:160)
at jenkins.websocket.WebSockets$2.onWebSocketClose(WebSockets.java:105)
at jenkins.websocket.WebSockets$2.onWebSocketError(WebSockets.java:111)
at jenkins.websocket.Jetty12EE9Provider$2.onWebSocketError(Jetty12EE9Provider.java:174)
at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.websocket.common.JettyWebSocketFrameHandler.onError(JettyWebSocketFrameHandler.java:245)
at Jenkins Main ClassLoader//org.eclipse.jetty.websocket.core.WebSocketCoreSession.lambda$closeConnection$2(WebSocketCoreSession.java:260)
at Jenkins Main ClassLoader//org.eclipse.jetty.server.handler.ContextHandler$ScopedContext.run(ContextHandler.java:1513)
at Jenkins Main ClassLoader//org.eclipse.jetty.server.handler.ContextHandler$ScopedContext.run(ContextHandler.java:1500)
at Jenkins Main ClassLoader//org.eclipse.jetty.websocket.core.server.internal.AbstractHandshaker$1.handle(AbstractHandshaker.java:179)
at Jenkins Main ClassLoader//org.eclipse.jetty.websocket.core.WebSocketCoreSession.closeConnection(WebSocketCoreSession.java:260)
at Jenkins Main ClassLoader//org.eclipse.jetty.websocket.core.WebSocketCoreSession.onEof(WebSocketCoreSession.java:230)
at Jenkins Main ClassLoader//org.eclipse.jetty.websocket.core.WebSocketConnection.fillAndParse(WebSocketConnection.java:474)
at Jenkins Main ClassLoader//org.eclipse.jetty.websocket.core.WebSocketConnection.onFillable(WebSocketConnection.java:332)
at Jenkins Main ClassLoader//org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:322)
at Jenkins Main ClassLoader//org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:99)
at Jenkins Main ClassLoader//org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53)
at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:480)
at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:443)
at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:293)
at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.run(AdaptiveExecutionStrategy.java:201)
at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:311)
at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:979)
at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1209)
at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1164)
Caused: hudson.remoting.ProxyException: java.io.IOException: java.nio.channels.ClosedChannelException
at hudson.remoting.FastPipedInputStream.read(FastPipedInputStream.java:175)
at java.base/java.io.BufferedInputStream.fill(Unknown Source)
at java.base/java.io.BufferedInputStream.read1(Unknown Source)
at java.base/java.io.BufferedInputStream.read(Unknown Source)
at java.base/java.util.zip.InflaterInputStream.fill(Unknown Source)
at java.base/java.util.zip.InflaterInputStream.read(Unknown Source)
at java.base/java.util.zip.GZIPInputStream.read(Unknown Source)
at

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

JenkinsCI

trigger on path or file changes

Hi, is there a way to trigger a build, using pollscm and changeset?

I am aware of the when step but then, then job is already triggered.

commithook is not an option, jenkins server sits behind a vpn, is groovy scripting to extend the trigger, an option?

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

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

JenkinsCI

FREE LINUX AND KUBERNETES LEARNING RESOURCES 2025
https://github.com/Pulkit12966/redhat_official_studyguide_RHCSA

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

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

JenkinsCI

multibranch pipeline is not running on label change event

Hello everyone!

I'm currently working on a Jenkins multibranch job connected to a GitHub repository. My pipeline is automatically triggered when a pull request is created or when a new commit is pushed. In my GitHub webhook setup (<jenkins-url>/multibranch-webhook-trigger/token), I've selected the necessary options like label, pull request, and push events.

Everything is working well except for one issue: the pipeline does not get triggered when I change a label on a pull request. The webhook is correctly sending the labeled and unlabeled events to Jenkins, but the pipeline doesn't respond to them.

From what I've observed, Jenkins multibranch pipelines don't handle label changes by default.

Any ideas or solutions for this?
Thanks in advance!

Cheers!

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

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

JenkinsCI

Jenkins Get hangs while running the pipeline o.j.p.w.s.concurrent.Timeout#lambda$ping$0: Running CpsFlowExecution

When i run the pipeline in jenkins all the build get stuck and job is not assigned to any child node and when i check log in jenkins o.j.p.w.s.concurrent.Timeout#lambda$ping$0: Running CpsFlowExecution unresponsive for 38 min

I want the job should be sheduled to all child node and what to understand why there error is comming

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

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

JenkinsCI

Need help

I'm very new to jenkins and I'm trying to setup a basic pipeline. For the pipeline declaration, if I write agent any, I'm able to see a new container being created and job runs successfully. However if I use a specific agent, it created 1 instances of the same but console gives the output "All nodes of label 'docker-agent-alpine' are offline.

For context I've set up jenkins using blueocean on a docker container. To create a cloud node I use alpine/soncat to mediate between between docker host and jenkins container.

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

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

JenkinsCI

Jenkins portable, backup and restore in under 20 minutes? D:

Is real now

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

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

JenkinsCI

Automating Code Changelogs at a Large Bank with LLMs (feat. Jenkins!)
https://www.tensorzero.com/blog/case-study-automating-code-changelogs-at-a-large-bank-with-llms

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

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

JenkinsCI

How to Configure Re-run of seed job in jenkins after jenkins upgrade.

So I I have setup my jenkins on top of k8s cluster using helm charts and custom values.yaml and everything wokrs fine except, when I run helm upgrade to upgrade jenkins configurations and job, everything is updated perfectly fine (but that is in background). To see those hanges in jenkins UI the seed job needs to run again(for now I trigger this job manually after upgrade), How can I automate this, so that upon every successful helm upgrade for jenkins, seed job runs again. This is the seed job config I use in values.yaml -->

seedJobs:
- id: create-folders-views-job
credentialType: basicSSHUserPrivateKey
credentialID: rp-ci
targets: "tools/jenkins-view-generators/*.groovy"
description: "Creates views and folders for the Jenkins jobs"
repositoryBranch: main
repositoryUrl: <git-repo-url>

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

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

JenkinsCI

Jenkins docker agent template from gitlab container registry

Hi, I have created a docker image and published it to my own GitLab container registry It can be pulled like this using credentials:

docker pull `gitlab.det.au:5050/ms/aut`

I have saved these credentials in Jenkins.

I’m trying to set the Docker Agent templates to pull the image from the previous one instead of DockerHub:

In the Docker Image section, I added: gitlab.det.au:5050/ms/aut
and in Registry Authentication I added my credentials.

After executing an Item it shows:

“This agent is offline because Jenkins failed to launch the agent process on it.”

" All nodes of the label ‘[docker-agent-alpine\] are offline".

My Compose file looks like the following:

services:
jenkins-blueocean:
containername: jenkins-blueocean
image: myjenkins-blueocean:2.492.2-1
restart: on-failure
networks:
- jenkins
environment:
DOCKER
HOST: tcp://172.18.0.2:2375
DOCKERCERTPATH: /certs/client
DOCKERTLSVERIFY: 1
ports:
- "8080:8080"
- "50000:50000"
volumes:
- /mnt/jenkinsms/storage/data:/var/jenkinshome
- /mnt/jenkinsms/storage/docker
certs:/certs/client:ro

networks:
jenkins:
external: true



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

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

JenkinsCI

Jenkins and Hashicorp Vault Integration

* I created vault roles: `vault write aws/roles/something1 credential_type=iam_user policy_document=<particular_policy>`
* `vault read aws/creds/something1` Creates a single AWS IAM user
* But when I tried using something like this:

&#8203;

withCredentials([[$class: 'VaultUsernamePasswordCredentialBinding', credentialsId: 'something1', passwordVariable: 'AWS_SECRET_ACCESS_KEY', usernameVariable: 'AWS_ACCESS_KEY_ID']]) {


I noticed it wasn't working, and upon inspection, I saw that it was creating 2 IAM users; hence, the ACCESS\_KEY and SECRET\_KEY didn't match.
Upon test, the vault username and credential section also creates 2 IAM users.





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

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

JenkinsCI

Delay / Consolidate multiple CI pipelines to 1 upon merge to develop

Hey,

So today we have a CI pipeline that upon merge to develop triggers a pipeline that performs a Sanity test.

Let's say that in a span of 10 minutes there were 3 PRs that were merged to the develop branch.

Instead of running each one separately we'd like to somehow consolidate a few builds to one or rather delay builds but that isn't specified in the Bitbucket Pull Requests Builder: https://plugins.jenkins.io/bitbucket-pullrequest-builder/

The plugin isn't maintained anymore and we have no objections replacing it. I couldn't find anything else that fits our use case.

Would love getting some ideas on how to perform this.

TIA!

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

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

JenkinsCI

Create Envs in Freestyle Project?

I have two build steps. A script and a docker build/push step from the plugin.


\---Script:
export VERSION=$(cat VERSION | tr -d '\\n')

\---Docker Plugin:

path/to/registry:${VERSION}-${BUILD_NUMBER}-${GIT_COMMIT}

Why cant it substitute the VERSION? Or in other words how can I just simply set an env to be used in the same freestyle project? I feel sooo stupid rn.

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

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

JenkinsCI

java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Finished: FAILURE


From what I can tell, the WebSocket connection between the Jenkins master and the agent is getting closed, which results in failed artifact transfers and pipeline interruptions. The agent pod (k8s-agent-testing-73-sq2nd-xcg0f-h6xzh) is being marked offline, but it's unclear if it's due to a network issue, resource limits, or something else.


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

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

JenkinsCI

org.apache.tools.tar.TarBuffer.readBlock(TarBuffer.java:253)
at org.apache.tools.tar.TarBuffer.readRecord(TarBuffer.java:220)
at org.apache.tools.tar.TarInputStream.read(TarInputStream.java:613)
at java.base/java.io.FilterInputStream.read(Unknown Source)
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1486)
at org.apache.commons.io.IOUtils.copy(IOUtils.java:1111)
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1459)
at org.apache.commons.io.IOUtils.copy(IOUtils.java:1089)
at hudson.util.IOUtils.copy(IOUtils.java:53)
at hudson.FilePath.readFromTar(FilePath.java:3073)
Also: hudson.remoting.ProxyException: hudson.remoting.RequestAbortedException: java.nio.channels.ClosedChannelException
at hudson.remoting.Request.abort(Request.java:358)
at hudson.remoting.Channel.terminate(Channel.java:1196)
at hudson.remoting.Channel$1.terminate(Channel.java:683)
at hudson.remoting.AbstractByteBufferCommandTransport.terminate(AbstractByteBufferCommandTransport.java:357)
at jenkins.agents.WebSocketAgents$Session.closed(WebSocketAgents.java:161)
at jenkins.websocket.WebSockets$2.onWebSocketClose(WebSockets.java:105)
at jenkins.websocket.WebSockets$2.onWebSocketError(WebSockets.java:111)
at jenkins.websocket.Jetty12EE9Provider$2.onWebSocketError(Jetty12EE9Provider.java:174)
at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.websocket.common.JettyWebSocketFrameHandler.onError(JettyWebSocketFrameHandler.java:245)
at Jenkins Main ClassLoader//org.eclipse.jetty.websocket.core.WebSocketCoreSession.lambda$closeConnection$2(WebSocketCoreSession.java:260)
at Jenkins Main ClassLoader//org.eclipse.jetty.server.handler.ContextHandler$ScopedContext.run(ContextHandler.java:1513)
at Jenkins Main ClassLoader//org.eclipse.jetty.server.handler.ContextHandler$ScopedContext.run(ContextHandler.java:1500)
at Jenkins Main ClassLoader//org.eclipse.jetty.websocket.core.server.internal.AbstractHandshaker$1.handle(AbstractHandshaker.java:179)
at Jenkins Main ClassLoader//org.eclipse.jetty.websocket.core.WebSocketCoreSession.closeConnection(WebSocketCoreSession.java:260)
at Jenkins Main ClassLoader//org.eclipse.jetty.websocket.core.WebSocketCoreSession.onEof(WebSocketCoreSession.java:230)
at Jenkins Main ClassLoader//org.eclipse.jetty.websocket.core.WebSocketConnection.fillAndParse(WebSocketConnection.java:474)
at Jenkins Main ClassLoader//org.eclipse.jetty.websocket.core.WebSocketConnection.onFillable(WebSocketConnection.java:332)
at Jenkins Main ClassLoader//org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:322)
at Jenkins Main ClassLoader//org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:99)
at Jenkins Main ClassLoader//org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53)
at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:480)
at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:443)
at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:293)
at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.run(AdaptiveExecutionStrategy.java:201)
at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:311)
at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:979)
at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1209)
at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1164)
Caused: hudson.remoting.ProxyException: java.util.concurrent.ExecutionException: hudson.remoting.RequestAbortedException:

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

JenkinsCI

Help with multi-branch pipeline understanding

Hello,

I am working on a multi-branch pipeline and am a little confused with how to approach what I want to achieve or if I need to split it into two separate jobs for the time being. Is multi-branch pipeline the right tool for the job?

I would appreciate some guidance.

Workflow:

Work on feature/chore... branch
Commit, push
Open PR, trigger Jenkins pipeline to run if from specific branch prefixes etc.
Merge into Main

Onto release:

Main branch which is always deployable. I want that to be a manually invoked job with parameters so i can suppress things like webhook notifications.
Click Build, select params
do versioning
npm publish etc.


Is this possible in one multi-branch pipeline using one Jenkinsfile? Or how do i approach something like this?

Do i have one multi-branch job and then one pipeline job. One automatic, the next manual? What would be your recommendations? What is possible?

Cheers.

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

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

JenkinsCI

EC2 Fleet with Cached EBS volumes (native disk performance)

EC2 Fleet is an amazing plugin which allows us to use autoscaling groups as Jenkins agents

The moment I switched our devs to these agents though, the first complaint was longer build times due to losing docker build caches (any disk cache for that matter)
NFS did not cut it for our performance constraints and multi-attach EBS is a pain to implement

I basically use vanilla EBS volumes as cache. On startup, the agent queries for any available volumes and mounts them. This had pretty sweet characteristics

* Native disk performance
* Auto updating cache
* Processes on the agent do not need to be aware of any potential concurrent access, they just work as is


I've described the implementation here: [https://narang99.github.io/2025-03-21-jenkins-aws-asg/](https://narang99.github.io/2025-03-21-jenkins-aws-asg/)

Please give it a read, thanks! Would love to hear what you think



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

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

JenkinsCI

Jenkins CI on Kubernetes

I work in startup with lot of things we are managing on our own. Current Jenkins setup we have EC2 machines- Literally created manually with manual configurations. And as a nodes we have another set of Ec2 machines which are also used for some other things. Developers keep logging to that machines.

Has anyone Hosted on Kubernetes , So something like Jenkins Server on Kubernetes, and Nodes of Separate Kubernetes Clusters [Multiple Cluster in Multiple Accounts\].

Why jenkins only ? Lot of pipelines are built by devs so i don't want new tools. Its just hosting part as that is in my control. But there are problems are in scaling , Long Jenkins Queue. Whatever and what not.

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

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