Jenkins pipelines sharing something common without Sharing Libraries feature
Say I got two different jenkin files in the same project doing different things. These two jenkins files share something in common (like a stage). I hope to extract this stage into a groovy file and make the two jenkins files somehow include/import the groovy file. Is it possible to do this WITHOUT the Shared Libraries feature?
Jenkins: the env vars MAVEN_OPTS and MAVEN_ARGS are ignored by Maven
On Jenkins, Maven ignores the environment variables MAVEN_OPTS and MAVEN_ARGS that I set in the same pipeline. Here the code I use:
Trigger jenkins when changes are pushed to a specific folder
I have two different services in the same Github repositories and each one of these services has his own Jenkinsfile
In the same Jenkinsfile stage, Why groovy script cannot access the file created in sh step?
Jenkinsfile:
pipeline {
agent any
stages {
stage(‘Sec’) {
steps {
sh ”’#!/bin/bash
set -e
echo ${BUILD_NUMBER} > test_sec_fail.txt
cat test_sec_fail.txt
”’
script {
def fileExists = sh(script: ‘test -e test_sec_fail.txt && echo “true” || echo “false”‘, returnStdout: true).trim()
println “${fileExists}”
def file = new File(“test_sec_fail.txt”)
println(file.exists())
println(file.canRead())
}
}
}
}
}
How can I. pass in the variable values to an application.yml file with my Jenkins job?
I would like to supply the values for the variables in a checked out application.yml file in my Jenkins job.
Jenkins parallel stage not able to resolve variable
Im trying to add a parallel stage, to a angular build commands.
Trying to change “Build apps” stage, but ${configuration_template}
doesnt get set with the value. However it works without the parallel stage.
Jenkins read the content of a file to a variable
i am adding a parameter to jenkins parameter type stashed file. When i do a cat that works fine but if i want to save the file contents to a variable it fails
Store python return value in Jenkins file
I have a Jenkins pipeline, one of its steps is to execute a python script(this python script simply returns a “hello world” string) and I want to store its returned value, not printed value in a variable, my pipeline stage looks like this:
Jenkins finish pipeline as pending
I’m using Jenkins for builds and wanted to know if this scenario was possible. We have an external system that sends us a webhook request when a job completes (success or failure). I want a pipeline in Jenkins to run, start the request and then finish but not show status as “SUCCESS”. I want it to still be pending. Is this possible? When the webhook request comes in, I would like that to dictate on the PR in GitHub how the pipeline did. Is this possible in Jenkins? I’m seeing currentBuild.currentResult
but that doesn’t have a PENDING status. Is this not possible?
Can I execute the Jenkins IT test case in cucumber , along with SONAR and Fortify Scan in parallel
Actually, I want to reduce the time of my Jenkins pipeline, so I want to execute some of the step in parallel, I am not sure if such thing exists or not also what could be the disadvantage of doing things in parallel on Jenkins server. I want to execute IT test written in cucumber, sonar, fortify scan in parallel after the build of tomee based microservice is completed.
Tech stack
Maven
Docker
Tomee