How to Run the Curl Command in a Jenkins Pipeline

preview_player
Показать описание
Need help with your Jenkins questions?

Timecodes ⏱:

00:00 Introduction
00:09 Overview
00:25 Starting point
00:49 Create job to verify curl installation
01:32 Update job to make a HTTP request
02:27 Update job to pass headers and a body
04:17 Why use curl in a Jenkinsfile instead of using a plugin?

#jenkinstutorial #jenkinspipeline #curl

Information referenced in this video:

Jenkins LTS 2.289.1

CloudBees on Twitter:

Darin on Twitter:
Рекомендации по теме
Комментарии
Автор

It does not work with the latest Jenkins that uses "jenkins/inbound-agent" Docker image - curl is not installed there anymore.

IvanLagunov
Автор

i am storing the request body in groovy variable like String jsonReq = writeJSON returnText: true, json: dashMap (just i converted groovy map to json string and stored it in jsonReq) now i need to pass this variable in curl post request . How to pass this variable for -d

karthikmanoharan
Автор

But now Pipeline need curl cmd available on node, if we use plugin it will work without curl. Also escaping will be taken care by plugin, so plugin is easiest and consistent way to make http calls right?

josephchackoc
Автор

I want to create a jenkins job that links with my GitHub maven project. And I also want to run a curl command in this job. How can I do that?

HenryLeu
Автор

nise vide, but question is why we write curl in pipeline block. Can we write it in shell command block

romanroman
Автор

sir how to configure declarative pipeline in jenkins for burp suite to scan a url
please make a video on this

sameermatkar
Автор

maybe someone can help. How to post via curl files from git repository to REST?

romanroman