All Projects → sheehan → Job Dsl Gradle Example

sheehan / Job Dsl Gradle Example

Licence: apache-2.0
An example Job DSL project that uses Gradle for building and testing.

Programming Languages

groovy
2714 projects

Labels

Projects that are alternatives of or similar to Job Dsl Gradle Example

Performance Testing Framework
Framework allows to perform load testing with Apache Jmeter, view application/server metrics in real-time with Grafana, analyze errors cause with detailed traces for failed requests, compare different test runs in scripted dashboard and perform frontend performance testing with sitespeed.io+webpagetest
Stars: ✭ 275 (-31.93%)
Mutual labels:  jenkins
Jenkins
Jenkins automation server
Stars: ✭ 18,225 (+4411.14%)
Mutual labels:  jenkins
Luaunit
LuaUnit is a popular unit-testing framework for Lua, with an interface typical of xUnit libraries (Python unittest, Junit, NUnit, ...). It supports several output formats (Text, TAP, JUnit, ...) to be used directly or work with Continuous Integration platforms (Jenkins, Maven, ...).
Stars: ✭ 362 (-10.4%)
Mutual labels:  jenkins
Node Jenkins
Jenkins client
Stars: ✭ 293 (-27.48%)
Mutual labels:  jenkins
Docker Android
Android in docker solution with noVNC supported and video recording
Stars: ✭ 4,042 (+900.5%)
Mutual labels:  jenkins
Docker Inbound Agent
Docker image for a Jenkins agent which can connect to Jenkins using TCP or Websocket protocols
Stars: ✭ 342 (-15.35%)
Mutual labels:  jenkins
Jenkins Course
This is the repository with all the resources for the Jenkins training on Udemy
Stars: ✭ 269 (-33.42%)
Mutual labels:  jenkins
Danger Js
⚠️ Stop saying "you forgot to …" in code review
Stars: ✭ 4,076 (+908.91%)
Mutual labels:  jenkins
Azure Devops Utils
Azure DevOps Utilities
Stars: ✭ 314 (-22.28%)
Mutual labels:  jenkins
Threatmapper
Identify vulnerabilities in running containers, images, hosts and repositories
Stars: ✭ 361 (-10.64%)
Mutual labels:  jenkins
Helm Charts
A curated set of Helm charts brought to you by codecentric
Stars: ✭ 295 (-26.98%)
Mutual labels:  jenkins
Ccmenu
CCMenu is a Mac application to monitor continuous integration servers.
Stars: ✭ 306 (-24.26%)
Mutual labels:  jenkins
Devops Guide
DevOps Guide - Development to Production all configurations with basic notes to debug efficiently.
Stars: ✭ 4,119 (+919.55%)
Mutual labels:  jenkins
Nvwa Io
Nvwa-io is a open source DevOps CI/CD auto-build and auto-deploy system(女娲 - 开源 DevOps CI/CD 自动构建和自动部署系统). http://nvwa-io.com
Stars: ✭ 283 (-29.95%)
Mutual labels:  jenkins
Apollo
Apollo - The logz.io continuous deployment solution over kubernetes
Stars: ✭ 367 (-9.16%)
Mutual labels:  jenkins
Dingtalk Plugin
Dingtalk for jenkins
Stars: ✭ 272 (-32.67%)
Mutual labels:  jenkins
Node Build Monitor
A Build Monitor written in Node.js, which supports several build services and can be easily extended.
Stars: ✭ 336 (-16.83%)
Mutual labels:  jenkins
Jx
Jenkins X provides automated CI+CD for Kubernetes with Preview Environments on Pull Requests using Cloud Native pipelines from Tekton
Stars: ✭ 4,041 (+900.25%)
Mutual labels:  jenkins
Pipeline Aws Plugin
Jenkins Pipeline Step Plugin for AWS
Stars: ✭ 389 (-3.71%)
Mutual labels:  jenkins
Jenkins Backup Script
archive jenkins setting and plugins
Stars: ✭ 358 (-11.39%)
Mutual labels:  jenkins

Jenkins Job DSL Gradle Example

An example Job DSL project that uses Gradle for building and testing. Check out this presentation for a walkthrough of this example (starts around 14:00).

File structure

.
├── src
│   ├── jobs                # DSL script files
│   ├── main
│   │   ├── groovy          # support classes
│   │   └── resources
│   │       └── idea.gdsl   # IDE support for IDEA
│   ├── scripts             # scripts to use with "readFileFromWorkspace"
│   └── test
│       └── groovy          # specs
└── build.gradle            # build file

Script Examples

  • Example 1 - shows basic folder/job creation
  • Example 2 - shows how to create a set of jobs for each github branch, each in its own folder
  • Example 3 - shows how to use the configure block
  • Example 4 - shows a way to reuse job definitions for jobs that differ only with a few properties
  • Example 5 - shows how to pull out common components into static methods
  • Example 6 - shows how to include script resources from the workspace
  • Example 7 - shows how to create jobs using builders
  • Example 8 - shows how to use DSL extensions provided by other plugins

Testing

./gradlew test runs the specs.

JobScriptsSpec will loop through all DSL files and make sure they don't throw any exceptions when processed. All XML output files are written to build/debug-xml. This can be useful if you want to inspect the generated XML before check-in. Plugins providing auto-generated DSL must be added to the build dependencies.

If you prefer to stub the auto-generated DSL, you can use JobScriptsSpecAlternative, though you may miss some syntax errors.

Seed Job

You can create the example seed job via the Rest API Runner (see below) using the pattern jobs/seed.groovy.

Or manually create a job with the same structure:

  • Invoke Gradle script
    • Use Gradle Wrapper: true
    • Tasks: clean test
  • Process Job DSLs
    • DSL Scripts: src/jobs/**/*Jobs.groovy
    • Additional classpath: src/main/groovy
  • Publish JUnit test result report
    • Test report XMLs: build/test-results/**/*.xml

Note that starting with Job DSL 1.60 the "Additional classpath" setting is not available when Job DSL script security is enabled.

Other Resources

Gradle Plugins

Plugins that automatically apply the functionality laid out in this example repo.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].