How to Write a Pipeline Script in Jenkins

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

Timecodes ⏱:

00:00 Introduction
00:19 Overview
01:48 Starting point
02:05 Create a Scripted Syntax Pipeline
04:33 Create a Declarative Syntax Pipeline
05:40 Conclusion

#jenkins #jenkinspipeline #jenkinstutorial

Information referenced in this video:

Jenkins LTS 2.277.2

Pipeline

Getting Started With Shared Libraries in Jenkins

CloudBees on Twitter:

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

Thanks, Darin! I really appreciate the "Best practices" part, especially the sound advise to write more complicated logic on a language that can be tested and call from the command line.

juanpabloamorochod.
Автор

Your Jenkins tutorials are helping me a lot, thank you

Sla-ogii
Автор

🎯 Key Takeaways for quick navigation:

00:41 💻 *Jenkins offers two pipeline syntaxes: declarative and scripted, with declarative providing a better approach for constructing most pipelines since its release in February 2017.*
01:20 🛠️ *Jenkins Pipeline, unlike other job types, allows job definition storage in an SCM, enhancing job management as code.*
03:54 🏗️ *Creating a scripted pipeline involves specifying a "node" block and defining stages, showcasing a simpler 'hello world' example within Jenkins.*
05:15 📄 *Declarative pipelines, although longer in script length, produce the same output as scripted ones, focusing on readability and ease of use.*
06:10 🚦 *Recommended workflow: Begin with declarative syntax; if limitations arise, consider integrating shared libraries before resorting to scripted syntax, known for its complexity.*
07:19 ⚠️ *Jenkins scripted and declarative syntaxes are intended solely for CI purposes. For integrating with other systems, use a real programming language and execute it from Jenkins via command line calls.*

Made with HARPA AI

daniloramirez
Автор

Yet again, a great video. It would good if you can show us the steps reference documentation page and go through the syntax and start using it in a step especially a plugin would be ideal. We are having difficulty in understanding the Jenkins plugin reference on web. How to use it in real time

master
Автор

Could you do a video demonstrating declarative pipeline development, in vscode? Linting tools, extensions, validating, etc… all from my vscode session.

Also, validating my declarative pipeline against my Jenkins instance running on HTTPS with SSO provided by ADFS/Okta

nobelsamuelworku
Автор

In Devops world which is Best
Scripted or declarative pipeline syntax

akkyintish
Автор

How do you manage release pipeline in Jenkins?

master
Автор

Dear Darin,

I have a question.

Does the name for each stage of the pipeline must be hard-coded?

Can I do something like this?

stage('Print Env ' + varNum) {
echo "$varNum"
}


where varNum can be 1, 2 or 3?

Thanks

xiyuewang
Автор

I don't see "scripted pipeline in the try sample drop down box at all.

rickdee
Автор

how to upload a file to sharepoint from jenkins pipeline ?

Aria
Автор

Dont see too much difference between scripted and declarative...

funffunfacts