You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, Jenkinsfile is in a scripted format.
Therefore, while more changes are suggested to improve the CI, like #8673, #8674 and #8675 the script will grow a lot.
So, I suggest migrating it to declarative style to have access to Jenkins helpers directly.
Pipeline syntax differences
Declarative pipelines always begin with the word pipeline. Scripted pipelines, on the other hand, always begin with the word node. Declarative pipelines break down stages into individual stages that can contain multiple steps. Scripted pipelines use Groovy code and references to the Jenkins pipeline DSL within the stage elements without the need for steps.
The text was updated successfully, but these errors were encountered:
mikepapadim
changed the title
[CI Problem] Migrating Jenkinsfile from scripted to declartive pipeline style.
[CI] Migrating Jenkinsfile from scripted to declartive pipeline style.
Sep 18, 2021
We tried this out, but not clear if the Jenkinsfile is cleaner/more maintainable in this format, or whether a template is needed. Going to revisit after ci.py is finished.
areusch
added
the
needs-triage
PRs or issues that need to be investigated by maintainers to find the right assignees to address it
label
Oct 19, 2022
Currently,
Jenkinsfile
is in a scripted format.Therefore, while more changes are suggested to improve the CI, like #8673, #8674 and #8675 the script will grow a lot.
So, I suggest migrating it to declarative style to have access to Jenkins helpers directly.
Pipeline syntax differences
Declarative pipelines always begin with the word pipeline. Scripted pipelines, on the other hand, always begin with the word node. Declarative pipelines break down stages into individual stages that can contain multiple steps. Scripted pipelines use Groovy code and references to the Jenkins pipeline DSL within the stage elements without the need for steps.
Declarative style example
Pros:
post
pipeline action to sent status on email, Slack, discord etc.@areusch
cc @Mousius @driazati @gigiblender
The text was updated successfully, but these errors were encountered: