groovy

Domain Specific Languages

Language capabilities

The Jenkins Pipeline DSL is used as an example for such a language:

node {
  git 'https://github.com/joe_user/simple-maven-project-with-tests.git'
  def mvnHome = tool 'M3'
  sh "${mvnHome}/bin/mvn -B -Dmaven.test.failure.ignore verify"
  archiveArtifacts artifacts: '**/target/*.jar', fingerprint: true
  junit '**/target/surefire-reports/TEST-*.xml'
 }

The purpose of this DSL is the define and execute Jenkins build jobs (or better pipelines) in a more natural language.

Writing a domain specific language in Groovy benefits by Groovy’s core features like:


This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow