jenkins

Jenkins – Create an agent with a python script

Jenkins – Create an agent with a python script Question: as the title suggests, I am willing to automate the creation of a jenkins agent using python! I don’t have any idea about jenkins or what is it even used for, I just got a task to do in my internship and I can’t skip …

Total answers: 1

Jenkins sudo: a terminal is required to read the password

Jenkins sudo: a terminal is required to read the password Question: I have a FastAPI app for which I have configured Jenkins pipeline. When I execute unit tests with the code coverage enabled they are failing with the following error : Started by user gold Obtained Jenkinsfile from git https://github.com/edtshuma/devsecops-labs.git [Pipeline] Start of Pipeline [Pipeline] …

Total answers: 2

Permission denied: calling a shell script from Python in a Jenkins job

Permission denied: calling a shell script from Python in a Jenkins job Question: Trying to provide the minimal amount of information necessary here, so I’ve left a lot out. Lots of similar questions around, but the most common answer (use chmod +x) isn’t working for me. I have a Python script and a shell script …

Total answers: 1

Remove Icons of exe Files automatically using jenkins

Remove Icons of exe Files automatically using jenkins Question: I have to change the icons of exe files for some project related work. i know there is a tool called resource hacker is used to remove icons but i need to automate this process(because more exe files). I have automated this process using python but …

Total answers: 1

how does jenkins recognize paths inside a python script?

how does jenkins recognize paths inside a python script? Question: I have a python script that points to some file names and log files and I have jenkins to run the script, when run locally from my system the code works fine. The way I access my folders in python: folder_artifacts_data = ‘C:/Users/Rhea/OneDrive -Area/Rhea/Metrics_Configuration/Artifacts/’ path_to_log_file …

Total answers: 1

How to deal with "HTTP ERROR 403 No valid crumb was included in the request" Jenkins?

How to deal with "HTTP ERROR 403 No valid crumb was included in the request" Jenkins? Question: I try to abort Jenkins job build using python requests. This is my python code: crumb_value = ( requests.get(f"https://{usr}:{psw}@<jenkins url>/crumbIssuer/api/json", verify=False)).json()["crumb"] jenkins_abort = requests.post(f"https://{usr}:{psw}@<job url>/stop", json={‘Jenkins-Crumb’: crumb_json}, verify=False) So firstly I use Get request to get crumb value …

Total answers: 2

How to read fabric(python) confirmation in jenkins job execution

How to read fabric(python) confirmation in jenkins job execution Question: We have a python deployment script for our application and we use fabric package to ask user for the confirmation to proceed further (if user fixes manually or want to ignore) with any issues during the deployment. question=”Failure encountered during deployment.Would you like to continue?” …

Total answers: 1

Jenkinsfile and Python virtualenv

Jenkinsfile and Python virtualenv Question: I am trying to setup a project that uses the shiny new Jenkins pipelines, more specifically a multibranch project. I have a Jenkinsfile created in a test branch as below: node { stage ‘Preparing VirtualEnv’ if (!fileExists(‘.env’)){ echo ‘Creating virtualenv …’ sh ‘virtualenv –no-site-packages .env’ } sh ‘. .env/bin/activate’ sh …

Total answers: 3

Making a job fail in jenkins

Making a job fail in jenkins Question: This question might sound weird, but how do I make a job fail? I have a python script that compiles few files using scons, and which is running as a jenkins job. The script tests if the compiler can build x64 or x86 binaries, I want the job …

Total answers: 6