Questions tagged [jenkins-pipeline]
Questions about the Jenkins “Pipeline” plugin suite (formerly “Workflow”). Not about pipelines in Jenkins in general (e.g. using downstream jobs).
12,684
questions
0
votes
0
answers
12
views
Jenkins Configuration for maven-gpg-plugin
I'm new to Jenkins, and I'm trying to create my first pipeline:
pipeline {
agent any
tools {
maven "MAVEN_HOME"
}
stages {
stage('Checkout') {
...
0
votes
0
answers
16
views
Jenkins giving error "WorkflowScript: 3: Invalid agent type "docker" specified. Must be one of [any, label, none] @ line 3, column 9" [duplicate]
I started to integrate Jenkins with Docker but getting the below error while running a pipeline job.
Error message:
WorkflowScript: 3: Invalid agent type "docker" specified. Must be one of [...
0
votes
0
answers
10
views
Jenkins-GitLab Integration: How to Clone Source Branch of Merge Request in Jenkins?"
I've successfully set up a Jenkins-GitLab webhook connection to trigger Jenkins builds when a Merge Request (MR) is created in the GitLab repository, specifically when the MR status is marked as 'open'...
-1
votes
0
answers
27
views
Jenkins Batch Script: why I get "echo command not activated" in my pipeline script? [duplicate]
I have a simple code from my pipeline but when I run it, I get 'echo command not activated'
I tried this:
pipeline {
agent any
stages {
stage('Batch Script') {
steps {
...
1
vote
0
answers
32
views
How to access network drive for dropping a file during automation run using Jenkins
Not able to access network drive location using csharp code while running script through Jenkins
Tried with
File.Copy("sourcepathloc", "destpathloc")
It's working while running ...
-1
votes
0
answers
15
views
after jenkins building, return sh: next: not found error
When i finished my next.js project building jenkins, every step container was green(successful).
But In my ubuntu, when i did docker ps -a, my build contianer's status was Exited(127).
So i did docker ...
0
votes
0
answers
17
views
trigger multiple builds at once which are all in a folder
Folder had individual pipelines , which are parameterized builds , most of them had similar parameters
need to trigger all the builds at once
couldn't able to use free style pipeline
so wrote ...
0
votes
1
answer
20
views
Jenkins get Build Log without the Color Encoding
I want to send the build log as an attachment post build but its not readable since alot of the text is encoded in base64 related: How to decrypt Jenkins 8mha values
Since this jenkins instance is ...
0
votes
0
answers
26
views
When Jenkins Job is terminated/aborted, Google chrome and Chrome driver is not closing and due to this workspace is also not deleted
Using Jenkins 2.289.1 and the Source code is in Azure Dev ops GIT repo. Jenkins Jobs are created and Running fine when script pass or fail with some issues.
But when these Jobs are terminated/Aborted ...
0
votes
0
answers
15
views
Agent does not seem to have access to workspace in Jenkinsfile
When running on an agent instead of the default Jenkins controller, I'm unable to read and write to files in env.WORKSPACE, but I can read and write to files specified to the UNC path on the server ...
0
votes
0
answers
19
views
Is it possible to debug DynamicData attributes? (MSTest testing)
A bunch of data-driven MS Tests that have been working fine for many months get their parameters using the DynamicData attributes:
[DynamicData(nameof(XRepository.XRepositoryData), typeof(...
0
votes
0
answers
14
views
I'm not able to connect the Automation framework to the dockerise application in CI CD pipeline
Actually I am creating a CI CD pipeline by using docker, jenkins, and automation framework.
First, I have dockerise the application by using docker compose.yml file in that there are two services ...
0
votes
0
answers
22
views
How to run a command that performs an S3 upload AFTER ALL feature files/steps are executed?
I am currently executing some basic performance tests using the following:
js with Webdriverio for web elements identification/asserts
Cucumber for creating steps and execution of feature files/tests
...
0
votes
2
answers
36
views
Can Jenkinsfile Stages be refactored for reuse/DRY
My jenkinsfile contains stages like these:
stages {
stage('init'){
steps {
sh 'do-init'
}
}
stage('region1') {
stages {
stage('build') {
steps{
script {
...
0
votes
0
answers
16
views
Order for pick list in Jenkins pipeline
I have a quaestion. In configuration of Jenkins I have
When I switch places, for example I set "SERVICES" in the first position and "G" in the second position and save this ...
0
votes
0
answers
28
views
Gitlab pipeline status emails
I enabled pipeline status emails in a self-hosted GitLab in order to get informed about failures, success and fixes from a Jenkins pipeline.
I'm using the GitLab plugin in Jenkins and all the pipeline ...
0
votes
0
answers
31
views
How to solve docker-compose: Permission denied inside Jenkins's container
I'm very new to Jenkins. I'm try to execute docker-compose via Jenkins inside the Docker container. But what I got from the Jenkins Console Output is
docker-compose: Permission denied
Below is my ...
0
votes
1
answer
34
views
How can I set environmnet variables for different values of a matrix axis in a declarative Jenkinsfile
I want to deploy a build to a increasing number of destination. My idea is to use matrix to define that destinations. But I can't find a way to set some variables depending on the axis value.
pipeline ...
0
votes
0
answers
8
views
java.nio.charset.UnmappableCharacterException:
when i tried to execute jenkins build, error occurs - java.nio.charset.UnmappableCharacterException.Please confirm what changes need to be done to avoid this issue. My script is powershell
##The below ...
-1
votes
0
answers
18
views
Parameters missing when pipeline is restarted from stage
I have a freestyle jobDSL as my seed job to generate pipelines. Now, I face the pipeline parameters not being set after restarting from a stage...
This is what is happening, while there should have ...
0
votes
0
answers
14
views
How to update the release specific dependency automatically in Jenkins with Maven as Build Tools
We have a maven project producing the jar as artifact(Let Say Module-1).
We are maintaining multiple branch for this project.
This jar is used inside the mulitple other maven project as dependency ...
0
votes
1
answer
38
views
Jenkins declarative pipelines: how to always check out latest commit from github, do not schedule a new job if already scheduled?
We have some Jenkins jobs which check out multiple github repos before builds; a single build can take an hour or more. We want to schedule new builds if something changes, but currently Jenkins is ...
0
votes
1
answer
34
views
Jenkins Kubernetes container $WORKSPACE environement variable not consistent
I'm using a declarative pipeline with a Kubernetes setup with two Containers per agent pod.
One of them is the basic Jenkins agent, the other is a Python container on which I want to execute my test ...
0
votes
1
answer
36
views
Jenkins -AAPT2 - Daemon startup failed
I'm currently working on automating the APK build process, setting up a Jenkins pipeline for the project. My Jenkins is on a Docker container that has npm, Ionic, OpenJDK, Android SDK, and Gradle ...
-1
votes
0
answers
17
views
I'm trying to run a groovy script to create a jenkins pipeline, but I end up getting the error below
jenkinsfile
I'm trying to install docker on the jenkins-server. I'm stuck on what to do next. Can anyone help me out? I don't know how to pass the password that's it's asking for and where to add it ...
0
votes
0
answers
14
views
Grovvy script filename
How do I get the name of the current Groovy script filename? It's a Jenkins scripted pipeline.
Tried, but didn't work:
this.class.getName()
this.class.name
getClass().protectionDomain.codeSource....
0
votes
0
answers
20
views
Is there a Jenkins readFile plural equivalent? Like readFiles?
I am trying to utilize jenkins to read files into the output for multiple boxes. With the tools that I have used I am now successfully writing the input for the readFile into several files. I would ...
0
votes
0
answers
30
views
How to inform Jenkins pipeline to use credentials from pipeline defintion?
I have an issue with git command from Jenkins pipeline. Sometime users use git fetch or git push without withCredentials.
For historical reasons, an option was set on the Jenkins nodes:
git config --...
-2
votes
0
answers
39
views
Jenkins deploy via msdeploy and pipeline script
There was a need to auto-deploy the web service using Jenkins, iis, msdeploy.
can you please provide a script for the deployment step to transfer the webservice publishing files that were created by ...
1
vote
1
answer
49
views
Jenkins pipeline read parameters with spaces in script block
I am trying to read Jenkins parameters with spaces in script block, running to bad substitution error. Can you please help?
These two parameters are from the Embedded HTML.
Premium Account Type is ...
0
votes
0
answers
56
views
How to call getVersionFileName() from AWSCodeDeployPublisher plugin in Jenkins?
I'm running AWS CodeDeploy on Jenkins Pipeline using AWSCodeDeployPublisher plugin.
This is a snippet which works just fine.
stage('CodeDeploy') {
step([
$class: 'AWSCodeDeployPublisher',
...
0
votes
1
answer
38
views
how to install Jenkins pipeline plugin with jenkins-plugin-cli?
I tried to install Jenkins pipeline plugin in container.
I added "pipeline" to the Docker file but during build I got
Unable to resolve plugin URL https://updates.jenkins.io/latest/pipeline....
0
votes
0
answers
17
views
Unable to do operation on running pipeline's log
Running sonar scan to scan the build. Scanning working fine but want to check Sonar way profile got used to scan the project, if not then pass the pipeline with warning message.
I thought to get the ...
0
votes
0
answers
17
views
How to count number of functions in particular stage and pass that count to manager.removeBadge(count) in jenkins pipeline
i am a beginner and while exploring came across manager.addshortText and remove.Badge() and I want to know how we can count functions / manager.shortText in particular stage in pipeline. So that when ...
0
votes
1
answer
72
views
How to pass build parameters to shared library, and set env variables there
I have a declarative pipeline, that is making use of shared library to zip the checked-out repo, and set some environment variable like env.VERSION. The pipeline uses build-parameters to run.
I am ...
0
votes
1
answer
44
views
Does using the load step to load a pipeline block still count as a declarative pipeline?
I have two Jenkins jobs that use two Jenkinsfiles that are "almost" exactly the same, so I wanted to abstract the Jenkinsfile into a common one.
// commonPipeline.groovy
def buildImage(...
0
votes
0
answers
10
views
can we use visual icon like arrow mark in Jenkins stages?
when moving from one stage to another , instead of asking yes or no or password to proceed to next stage in Jenkins. can we have visual icon like arrow mark ?
so that after clicking in the arrow mark ,...
0
votes
0
answers
38
views
How can you run parallel jobs on a scripted Jenkins pipeline?
I've got a parent pipeline that triggers another one. I'm using build job: here. When the pipeline runs, the pipeline triggers the the child job but the child jobs run 1 by 1, waiting for each one to ...
0
votes
0
answers
23
views
To Finish the launch created in the report portal from the Jenkins pipeline (Post build action)
I have used the curl command to finish the launch with the launch id from the report portal and tried executing in bash. To use this in jenkins pipeline.
It returns :
% Total % Received % Xferd ...
0
votes
0
answers
31
views
How to access credentials in jenkins pipelineJob?
How do I access the credentials from a secret file in the dsl file? I have credentials binding and job dsl plugins installed.
I have
pipelineJob(...) {
}
0
votes
1
answer
29
views
Unable to login Jenkins AWS Instance
I am new to a specific Jenkins project. And in order to work on jenkins pipeline i need to login that instance. Now the previous devops guy had setup a system (he has left the organisation) where I ...
0
votes
1
answer
54
views
How to select jenkinsfile depending on branch name
I have a single large code base which is using for build and deployment apps for different countries.
Each country has its own unique building/deployment pipeline.
That's why I would like to specify ...
0
votes
2
answers
66
views
In a Jenkins Shared Library, how can I get the branch of the library that was checked out from within the library code?
In my Jenkins environment, I have a shared library. One of the things that the shared library does is pull down a Docker image from Amazon ECR using a tag. I would like to be able to use the branch of ...
0
votes
0
answers
32
views
Empty body when sending success email with Jenkins
I have this fragment in my Jenkinsfile
post {
success {
mail to: '[email protected]',
subject: "The email subject",
body: "Something very interesting",
charset: ...
0
votes
0
answers
55
views
Jenkins pipeline cannot scp into remote server
I've got
Hostkey verification failed
when running Jenkins declarative pipeline and using ssh agent (see logs below):
Started by user xxxx
[Pipeline] Start of Pipeline
[Pipeline] node
Running on ...
0
votes
0
answers
32
views
Jenkins pipeline unable to find Java when same script used with another project is working fine
I am getting following error
[INFO] Changes detected - recompiling the module! :dependency
[INFO] Compiling 7 source files with javac [debug target 1.8] to target/classes
[INFO] -----------------------...
0
votes
1
answer
23
views
There is one application running on java 1.8 (only), which version of Jenkins can be used to run scripts from pipeline?
I need to run selenium scripts developed bsed on java 1.8, using Jenkins pipeline. Which jenkins version can be used to build pipeline so that automation scripts developed on java 1.8 can run?
tried ...
0
votes
1
answer
61
views
Run Sonarqube stage with jdk 11 docker image
I am currently building a project that uses JDK 8. However, during the execution of the SonarQube stage, I encountered an issue related to logs indicating that one of the plugins installed in my ...
-1
votes
0
answers
32
views
Modifying multiple Jenkins files with context-aware changes
I need to modify tens of Jenkins files altering similar lines in each file. But context should be taken into account. The goal is to migrate from old function calls format to new ones and add ...
-1
votes
0
answers
17
views
Displaying only errors and warnings in Jenkins blueocean step log
In my current log, all entries are visible which creates a long list where I'm able to see only the top entries. Therefore, I want to limit this log to show only the warnings and errors. What's the ...