jenkinsci | Unsorted

Telegram-канал jenkinsci - JenkinsCI

1919

repost from /r/jenkinsci using @r_channels

Subscribe to a channel

JenkinsCI

Add job name and build number to Jenkins agent provided by Kubernetes plugin

I would like to add the job name and build number as a pod label of the agent pod that is spawned by the kubernetes plugin.

For example, if I have a job called "buildMyApp" and I start build #10 I would like the k8s pod to have a label similar to this

metadata:
labels:
com.jenkins.jobName: "buildMyApp"
com.jenkins.buildNumber: "10"



I am aware this is possible by using inheritFrom in the agent definition and adding the label from pipeline definition, however, this has two issues:

1. It requires editing all jobs, which is unfeasible in my case (we have 20k+ pipelines, some as Jenkinsfiles, some saved directly in Jenkins)
2. It causes the agent pod name to be very long and dependent on job name, while I would like to keep it as its default format (<label>-<randomId>)

Is there another way, possibly at global level, that doesn't have these two drawbacks?

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

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

JenkinsCI

Jenkins Extended Email Notification with OAuth and Outlook

Hi everyone, I am looking for ways to send emails from Jenkins using an Outlook mailbox without Application Passwords since Microsoft will discontinue the support for Basic authentication next year in March.

It has been quite tricky to find any information how to send emails from an Outlook account with OAuth. I am also open to other methods as long as they are secure.

Has anyone been able to set this up (or something similar)?

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

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

JenkinsCI

Can I have two jenkins master ?

I am running jenkins in kubernetes . I have a single master pod with replica 1 and the agents will be created on running pipelines using kubernetes plugin. Is it possible to have two master pods with the same JENKINS_HOME ? I just want to ensure the availibilty for jenkins so even if one master down it the other master should serve.

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

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

JenkinsCI

Need help to automate Jenkins

I’m working on a matrix project in Jenkins and I’d like to automate it using the “Build Periodically” trigger. My matrix project comprises various jobs that I’d like to run nightly builds for. However, not all of them should be executed, which is why I want to create a variable that stores the Build Cause of the project. Then, I can use this variable to conditionally run specific jobs at night.

The issue I’m facing is that when I run the matrix project, the variable for the Build Cause displays “UPSTREAMTRIGGER.” I’m not sure what’s causing this problem.

I’m not sure if this is even possible or if there’s another way to achieve this. Any suggestions or ideas would be greatly appreciated.

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

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

JenkinsCI

Final-year CS student, burnt out from job

I’m a final-year CS student looking for an internship or entry-level DevOps role. Honestly, I’m exhausted from applying on LinkedIn and company sites with no luck. If you know of any openings, please drop a comment and I’ll share my CV. Would really appreciate any help.

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

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

JenkinsCI

[Question] CI/CD Design Book Request

Hello fellow redditors

I’m looking for a solid book (or even an eBook) that goes beyond CI/CD basics and covers design patterns and architecture for real-world setups and could help me face the corporate BS i am facing with the Infra and system teams about environment and security and dev/prod segregation.

Ideally, it should include:

* Production vs development environment design.
* Jenkins agent-controller architecture and best practice.
* Patterns for scaling and securing Jenkins

Examples of integrating Jenkins with Git, Docker, Kubernetes, etc.

I’ve already read Continuous Delivery by Jez Humble, but I’m looking for something more practical, it doesn't matter if it covers Gitlab Runner or Github action, tbh i'm more interested in the architecture and design aspect.


Thank you.

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

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

JenkinsCI

Can you recommend me a book for Jenkins

I'm in the process of learning Jenkins

Can you recommend me a book to learn it

Thank u all

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

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

JenkinsCI

Jenkins Not Printing "sh" Command Output.

I wrote a script in my JenkinsFile to output the setttings.xml that Maven is using. My script looks like:

stage('Build') {

echo 'Starting Maven build...'

configFileProvider([configFile(fileId: 'MAVEN_SETTINGS', variable: 'MAVEN_SETTINGS')]) {

try {

if (isUnix()) {

echo "java -version"
sh '$JAVA_HOME/bin/java -version'
echo "Maven Settings File Used:"
sh "'${mvnHome}/bin/mvn' help:effective-settings" <--- THIS LINE GETTING SKIPPED...
sh "'${mvnHome}/bin/mvn' -e -U -s $MAVEN_SETTINGS clean package -DskipTests=${IGNORE_TESTS}"

} else {

bat(/"${mvnHome}\bin\mvn" -e -U -s $MAVEN_SETTINGS clean package -DskipTests=${IGNORE_TESTS}/)
}

} catch (err) {

echo "Something went wrong while trying to build the project..."
throw err
}
}



But my output just skips the line and proceeds to build the application.

+ /home/build/node/community/tools/hudson.model.JDK/jdk17/jdk-17.0.6/bin/java -version
java version "17.0.6" 2023-01-17 LTS
Java(TM) SE Runtime Environment (build 17.0.6+9-LTS-190)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.6+9-LTS-190, mixed mode, sharing)
[Pipeline] echo
Maven Settings File Used:
[Pipeline] sh
+ /home/build/node/community/tools/hudson.tasks.Maven_MavenInstallation/maven363/bin/mvn help:effective-settings
[INFO] Scanning for projects...
Downloading from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/3.2.5/spring-boot-starter-parent-3.2.5.pom+ /home/build/node/community/tools/hudson.model.JDK/jdk17/jdk-17.0.6/bin/java -version
java version "17.0.6" 2023-01-17 LTS
Java(TM) SE Runtime Environment (build 17.0.6+9-LTS-190)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.6+9-LTS-190, mixed mode, sharing)
[Pipeline] echo
Maven Settings File Used:
[Pipeline] sh
+ /home/build/node/community/tools/hudson.tasks.Maven_MavenInstallation/maven363/bin/mvn help:effective-settings
[INFO] Scanning for projects...
Downloading from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/3.2.5/spring-boot-starter-parent-3.2.5.pom

Can you let me know if my syntax is correct? Thanks.

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

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

JenkinsCI

Learn Jenkins from Scratch – Free Full Course Playlist

Hi everyone,

I recently found a **free Jenkins full course playlist** that really helped me level up. It’s perfect for beginners and intermediate folks who want to get hands-on with:

* Jenkins setup & installation
* Freestyle jobs vs pipeline jobs
* CI/CD with Git & GitHub
* Docker + Jenkins integration
* Real-time DevOps deployment use cases

👉 **Watch the full Jenkins course here**:
[https://youtube.com/playlist?list=PLO9ci1OliMiNorLuMdVfthBO4hII9uTjz&amp;si=s95-fgXU5tTP56Nl](https://youtube.com/playlist?list=PLO9ci1OliMiNorLuMdVfthBO4hII9uTjz&amp;si=s95-fgXU5tTP56Nl)

If you're exploring Jenkins for your job or interviews, I highly recommend it.

Also, if you want to stay connected with more DevOps & Data Engineering content, tools, and job prep updates, you can join our learning channel here:
👉 [Join WhatsApp Channel](https://whatsapp.com/channel/0029Vb8WYwHLtOj3tDIYMq43)

No spam. Just useful content. Hope it helps someone here! 👨‍💻🙌

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

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

JenkinsCI

AWS EC2 plugin: EBS root volume size?

I've set up Jenkins with the AWS EC2 plugin and created a cloud configuration to launch nodes as necessary. However, I'm finding that my builds fail because I'm running out of space on the root volume. I'd like to make the default root EBS volume larger, but I can't find a way to do it at launch, only through userdata, which seems fraught with trouble. Is there an easy way to make cloud-created EC2 nodes have a larger EBS root volume than 8 GB?

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

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

JenkinsCI

Viability of Watch plugin

Can anybody tell me if this idea sounds like it'd work before I spend a bunch of time on it? I want a Watch button on my job pages, just like Jira tasks have. Click it to get email notifications to the email address associated with your account.

I know it's possible for a plugin to add a button to a job page, at least in the list on the lefthand side (along with Status, Parameters, etc.). My main concern is whether it's possible to store the list of subscribers with the job somehow. Is there a way to do that? To store kind of metadata in a job, so its scripts could get the list of subscribers?

If you're wondering why I'd want this, I'm not a fan of the existing options for notifications. They are either too verbose or require too much effort to set up. This isn't for long-standing branches, so I don't want to have to configure emails/messages in the build scripts each time I have a branch I want to watch. And if I send ALL the build messages to teams, that's just way too much, and there's no good way (afaik) to filter them. Could do it with outlook filters, but again, too much hassle having to add/remove filters every time a branch is created/deleted.

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

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

JenkinsCI

How do you guys deploy Jenkins on Azure?

Currently we have Jenkins controller deployed on an Azure VM and using AKS to for dynamic agents deployment. Would like to move the controller to Jenkins configuration as code and Jobs JobDSL to manage all in source control.
Would like to know the best option to deploy this? Put the controller in the pod in the existing AKS could be the simplest solution. Or other Azure container app solutions. Regardless of choice also need some persistent storage for jobs history.

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

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

JenkinsCI

continue
}


Write-Host ("Found " + $files.Count + " DLL file(s) at $Spath. Starting copy...")

foreach ($file in $files) {
Write-Host ("Processing file: " + $file.Name)
Copy-Item -Path $file.FullName -Destination $targetBase -Force
Write-Host ("Copied: " + $file.FullName + " -> " + $flattenedDestination)

}
}

Write-Host "DLLs copied successfully to $targetBase"
"""



} catch (Exception e) {
echo "--------------------------------------------------------"
echo "FAILURE: File copy operation failed."
echo "Error Details: ${e.getMessage()}"
echo "Please check:"
echo "1. Credentials in 'xyz_cred'."
echo "2. Network connectivity to '${sourceBaseUNC}'."
echo "3. The effectiveness of New-PSDrive for your specific network share configuration."
echo "4. Write permissions for the Jenkins agent to '${targetDirectory}'."
echo "5. PowerShell logs in the console output for specific errors."
echo "--------------------------------------------------------"
error "Failed to copy XYZ files."
} finally {
echo "Attempting to remove temporary PSDrive for cleanup..."
powershell "Remove-PSDrive -Name 'XYZNetworkShare' -Force -ErrorAction SilentlyContinue"
echo "Cleanup complete."
}
}
}

The error that I am getting is: **Error Details: No such property: ErrorActionPreference for class: WorkflowScript**

I am unable to understand why is it happening. The credentials are correct as I am able to access the given network path/sourcePath with that. Kindly guide me. Or if this is the wrong approach, lmk the correct approach.



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

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

JenkinsCI

Change the langage

Hi all,

I just installed jenkins on my VM, the linux langage is french

I installed the "local" plugin, and go the general apperance, and selectionnate english -en, but i still have french langage in the menu, it's like 50/50

I would prefer totally english

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

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

JenkinsCI

Weebhook Triggering Twice for Same Pr on simultaneous merges

Hi everyone,

I'm working on a project where I use the Generic Webhook Trigger plugin in Jenkins to receive payloads from Bitbucket whenever a pull request is merged. After receiving the webhook, the pipeline generates a Salesforce package and deploys it to the org.
I'm currently facing an issue where, if I merge two different PRs at the same time, the pipeline is triggered twice for one of the PRs, instead of once per PR. This results in duplicate validations for a single PR and completely skips the other.

Has anyone encountered a similar situation or found a workaround to ensure that each merged PR triggers a single deployment, even when multiple merges happen simultaneously?

Thanks in advance!

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

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

JenkinsCI

Bitbucket webhook & Jenkins & Azure AD SSO (Driving me nuts)

i have jenkins setup with Azure(Entra) AD SSO setup done.

App code is in bitbucket cloud and i have configured webhooks, I'm encountering issue in ttriggering pipeline job remotely since jenkins is not authorizing bitbucket to trigger the job.

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 403 No valid crumb was included in the request</title>
</head>
<body><h2>HTTP ERROR 403 No valid crumb was included in the request</h2>
<table>
<tr><th>URI:</th><td>/job/mainDeploy/buildWithParameters</td></tr>
<tr><th>STATUS:</th><td>403</td></tr>
<tr><th>MESSAGE:</th><td>No valid crumb was included in the request</td></tr>
<tr><th>SERVLET:</th><td>Stapler</td></tr>
</table>
<hr/><a href="https://jetty.org/">Powered by Jetty:
// 12.0.25</a><hr/>
</body>
</html>





Has anyone done similar setup, how did you overcome this issue, please help, appreciate it!



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

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

JenkinsCI

Hi everyone! I've been going through Jenkins for the past couple of months and now when I implemented a project on Jenkins using a forked GitHub Repo, it is showing "Built in Node running out of space". So my Pipeline is not being executed. If you guys have any insights on this issue, please do shar



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

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

JenkinsCI

Basics but yeah need some help

I am trying to automate the clone, build and run of a contianer but its always failing at the build stage, the jenkins works in the pipeline directory but my code is the workspace Django_2 i am getting this error. I think it has do something with the directory i also user dir() but it was of no use

error

https://preview.redd.it/x2q6hd7bnsmf1.png?width=464&amp;format=png&amp;auto=webp&amp;s=37b11220bb6dd986d7c55a615424d8e60466e8eb



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

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

JenkinsCI

Posting to scriptText

I’m trying to create a scheduled job that will post a groovy script to /scriptText and display the results. I added a build step with the url and mode set to POST. Under advanced I have it configured to authenticate with an api key, and my groovy script is in the request body. Finally, I told it to include the response body in the console.

When I run it, I see it authenticate and post to the url. The status code is 200, but the response is blank.

What am I doing wrong?

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

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

JenkinsCI

Update Jenkins & Installing Plugins on UI

Hello everyone,
Based on the official article below, we’ve allowed 20.7.178.24 IP address on port 443 on the firewall. However, I’m having trouble installing plugins and recieving latest Jenkins
updates/upgrades. https://www.jenkins.io/blog/2023/06/22/mirrors-jenkins-new-IP/https://www.jenkins.io/blog/2023/06/22/mirrors-jenkins-new-IP/

https://preview.redd.it/niuahwzevuif1.png?width=1318&amp;format=png&amp;auto=webp&amp;s=52d881393ea5b84b93a5f9596bee9ce16e05ee00

https://preview.redd.it/frebyjvkvuif1.png?width=1369&amp;format=png&amp;auto=webp&amp;s=87830e984f70c82c2e7573d9614f37c30b4a8a22

(https://updates.jenkins.io/update-center.json)

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

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

JenkinsCI

Limit Jenkins Update Mirrors

Is there a way to prevent jenkins from using certain mirrors when updating plugins or jenkins itself?

Background for the question is, that my IT department only allows access to a predefined list of servers and this includes mirror servers for updates.jenkins.ioupdates.jenkins.io.

It happened today, that I had two depended plugins downloaded. One from an allowed mirror and one from a forbidden mirror. This ended in a plugin no longer loading, because it missed its depending plugin.

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

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

JenkinsCI

Would you replace Jenkins with a cheaper drop-in replacement?

Working on a drop-in replacement for Jenkins.

If it was cheaper by at least 50 percent, and remove the stupid toil around managing multiple masters.

You may need some small groovy adjustments, but most jobs would just work out of the box. How likely are you to migrate in that situation(runs on prem and cloud)



View Poll

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

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

JenkinsCI

Help! all windows Agents disconnect suddenly. Trying to diagnose for 5 days

Hi everyone,

I'm running out of ideas:

Our Jenkins instance has a bunch of virtual ubuntu and windows agents.
For about 5 days now only the Windows agents have started disconnecting, all of them, all at once and are unable to reconnect to Jenkins. This is usually followed by a 504 error on the jenkins website, but not immediately. The ubuntu agents are fine.

This usually correlates with this is massive CPU spikes (around 80%).

Only thing that helps is systemtcl restart jenkins.service after which both the agents reconnect and the gui is available again.

I have been looking at logs and stuff for the past 5 days but cannot figure it out. Has anyone experienced something similar.

we are on jenkins 2.426.2 running on ubuntu 20.4 (don't ask...)


Thanks!

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

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

JenkinsCI

Setuping vcan interface without running all my tests as root?

I want to test some canbus features and for that, I need a vcan ingterface mounted.
Creating the vcan require root access and also a docker that has NET_ADMIN capabilities.

In order to mount the interface in my docker container, I do as follow

    stages {
        stage ('Docker') {
            agent {
                dockerfile {
                    args '-e HOME=/tmp -e BUILDCONTEXT=ci --cap-add=NETADMIN -u 0:0'
                    additionalBuildArgs '--target build-tests'
                    reuseNode true
                }
            }
            stages {
                stage('Setup vcan'){
                    steps {
                        sh '''
                        ip link add dev vcan0 type vcan || true
                        ip link set up vcan0
                        '''
                    }
                }
}
}
}

When I do this, my docker container is run as root and my tests runs as root, which I don't like a lot. It leaves files owned by root in the workspace. Also, that is a security vulnerability that I do not like, exposing my agent to a pwn request. I know, the Jenkinsfile must be hidden too)

Is there a better way?

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

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

JenkinsCI

Jenkins in Portainer Can't Access Docker Socket

Hi everyone,

I’m running **Portainer** on an **Ubuntu server**, and inside Portainer I have a **Jenkins container** running. I’ve set up a **multibranch pipeline** to build and push a Docker image of my **Next.js project** to Docker Hub.

I already added the following volume mapping to the Jenkins container:

host path: /var/run/docker.sock
Container path: /var/run/docker.sock

However, when the pipeline runs, I get this error in the Jenkins console output:

docker build -t my-app-image:main .
permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post ...

# What I’ve Tried:

* Ran `usermod -aG docker jenkins` inside the container
* Enabled **Privileged mode** in the **Runtime & Resources** tab in Portainer
* Restarted the container

Still getting the same **"permission denied"** error when trying to use Docker CLI inside the pipeline.

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

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

JenkinsCI

How to avoid privilege escalation when Jenkins multibranch pipelines run as SYSTEM on github PR webhooks?

Hi everyone,

I’m facing a security issue in Jenkins and wondering how others deal with this.

When github triggers a webhook on a PR, the Jenkins job runs as SYSTEM instead of the user who created the PR. This introduces a serious security issue. Looking for ideas or best practices.

I have Jenkins configured with RBAC and multibranch pipelines. When users manually trigger pipelines via the Jenkins UI, the job correctly runs under their identity. However, when a GitHub webhook triggers a PR pipeline build, the job runs under the SYSTEM user by default - unless a user is explicitly associated with the build. This creates a critical security hole: anyone can open a PR containing arbitrary code, and it will run with full SYSTEM privileges.

I tried configuring “Project Default Build Authorization Strategy” using options like “Run as anonymous” or “Run as a specific user”, but they require granting Job/Configure permissions to those users. Without that, even basic steps like checkout SCM fails. But if I grant Job/Configure, they basically have full project access, which defeats the purpose.

The only workaround I can think of is to intercept GitHub webhooks through a custom proxy that maps GitHub usernames to Jenkins users, and then somehow triggers builds using those mapped users — so that even PR pipelines run as the actual GitHub user who opened the PR.

Has anyone dealt with this? Are there plugins or established patterns to safely tie incoming webhook builds to real users?

Thanks in advance.

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

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

JenkinsCI

After 20 years in CI/CD Engineering, I've started documenting my approach to CI/CD pipeline architecture. What do you think?

Hey r/jenkinsci,

I've been building and managing CI/CD pipelines for a long time, and I've seen countless teams struggle with the same architectural issues: a patchwork of CI/CD tools that don't integrate well, inconsistent workflows, and a general lack of a unified strategy that leads to reinventing the wheel.

To bring some order to the chaos, I've started formalizing my own methodology, which I call the "CI/CD Pipeline Architecture Framework." I wanted to share the core concepts here to get your thoughts and feedback.

It's built on two main ideas:

**1. The Golden Path:** This is the non-negotiable, 6-step foundation that every solid pipeline needs. It's the core workflow: `commit → build → test → staging → production → monitoring`

**2. The 7 Pipeline Pillars:** These are the strategic capabilities you can build on top of the Golden Path. They aren't sequential; you implement them based on your team's biggest pain points.

Here are the pillars:

* **Multiple Environments & Promotion:** Beyond just `staging` and `prod`. How do you handle `dev`, `qa`, `uat`?
* **Progressive Delivery Strategies:** Decoupling deployment from release to reduce risk, using techniques like canary releases, blue-green deployments, and feature flags.
* **Metrics & Observability:** The foundation for safe progressive delivery. This pillar moves beyond simple pass/fail to answer critical questions: Are our builds getting slower? How much developer time is wasted on flaky tests vs. real bugs? Can we see the performance impact of a new release by grouping metrics by version?
* **Advanced Testing Strategies:** Going beyond basic unit/integration tests (e.g., contract testing, mutation testing).
* **Pipeline Control & Orchestration:** Giving developers safe, self-service control over their pipelines.
* **Multi-Platform & Multi-Cloud Support:** Building pipelines that aren't locked into a single vendor.
* **Access Control & Security Architecture:** Integrating security into every step of the pipeline (DevSecOps).

I'm particularly interested in which of these pillars you've found most challenging or rewarding to implement. In my experience as a Platform Engineer, getting **Metrics & Observability** right is a total game-changer. It's crucial for having the confidence that changes to the pipeline won't break anything.

What are your experiences? Does this framework resonate with the challenges you face?

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

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

JenkinsCI

Need help/suggestions in rectifying the error

Hi r/jenkinsci fam,

So recently I have got a task to copy the dlls stored at a network path of my org and paste to a destination which is the publish folder of the installer of the software where other dlls get stored after the build is completed. This step needs to be done during the pipeline build process in the build stage. I have written the script, made several modifications but still the script is not working. This snippet is of the jenkins file which I am modifying:

  steps {

powershell 'dotnet build xyz.sln --configuration Release --no-restore;'
powershell 'dotnet publish xyz.sln --configuration Release --no-build;'

echo "========================================================"
echo "STEP 3: Starting copy operation for XYZ files with credentials..."
echo "========================================================"
withCredentials([usernamePassword(credentialsId: 'xyz_cred', usernameVariable: 'XYZ_USER', passwordVariable: 'XYZ_PASS')]) {
script {
def targetDirectory = "bin\\Publish\\XYZ\\Release\\net48\\win-x64\\"
def sourcePath = [
"\\\\abc.net\\shares\\def\\Builds\\ghi\\Current\\26_1\\26,1,0,176\\XYZ\\ImageSoft",
]


echo "Destination Base: '${targetDirectory}' "

powershell "New-Item -ItemType Directory -Force -Path '${targetDirectory}'"
echo "STEP 3.2: Target directory creation command executed."

try {
powershell """
$ErrorActionPreference = 'Stop'

Write-Host "STEP 3.3: Converting password to secure string and creating credential object..."

$password = ConvertTo-SecureString -String "$env:XYZ_PASS" -AsPlainText -Force
$credential = New-Object System.Management.Automation.PSCredential("$env:XYZ_USER", $password)
Write-Host "STEP 3.4: Credential object created."

Write-Host "STEP 3.5: Attempting to establish network session using New-PSDrive for '$sourceBaseUNC'..."
New-PSDrive -Name 'XYZNetworkShare' -PSProvider FileSystem -Root "${sourceBaseUNC}" -Credential `$credential -ErrorAction Stop
Write-Host "STEP 3.6: Network drive 'XYZNetworkShare' successfully created and mapped to ${sourceBaseUNC}."

$targetBase = '$targetDirectory'

foreach ($Spath in $PSScript.SourcePaths) {
Write-Host "Checking path: $Spath"

if (-Not (Test-Path -Path $Spath)) {
throw "Source path not accessible or does not exist: $Spath. New-PSDrive might not have fully established access for file operations."
}
Write-Host "STEP 3.7: Network drive 'XYZNetworkShare' successfully created and mapped ."
Write-Host "STEP 3.8: Getting DLL files "
$files = Get-ChildItem -Path $Spath -Filter "*.dll" -ErrorAction Stop

if ($files.Count -eq 0) {
Write-Host "No DLL files found at $Spath. Skipping copy for this source."

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

JenkinsCI

Snyk Security Plugin - Not seeing report

I'm trying to add Snyk Security to a multibranch job. I've followed steps 1 to 4 on the linked documentation, but I don't see the security report button on the sidebar after I run a build. Help?

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

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

JenkinsCI

Too lazy to open Jenkins on desktop… so I built this Android app 😎

I'm lazy to open my laptop every time a Jenkins build fails or I want to check the status? Same here. So I built a tiny Android app that connects to multiple Jenkins servers, lists jobs/builds, and lets me trigger builds on the go — all from my phone.

It’s super simple but already makes life easier when I’m traveling or away from my desk.

**Features so far:**

* Connect to multiple Jenkins servers
* Browse projects, jobs, and build logs
* Trigger builds right from the app

Still early days, but I’m thinking about adding:

* Notifications for failed builds
* Support for job parameters

Would love to know:

* Would you find this handy?
* What features would make this your go-to Jenkins sidekick?

https://reddit.com/link/1lienl4/video/53p7yy8t1o8f1/player



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

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