An open API service indexing awesome lists of open source software.

https://github.com/zaporylie/jenkins-yaml

.jenkins.yml script runner
https://github.com/zaporylie/jenkins-yaml

Last synced: 10 months ago
JSON representation

.jenkins.yml script runner

Awesome Lists containing this project

README

          

# jenkins-yaml
.jenkins.yml script runner

## How to:
- Add .jenkins.yml to your repo
- Run `jenkins-yaml.runner` in your jenkins build

## .jenkins.yml

Syntax for .jenkins.yml is similar to .travis.yml, just simplified.

```yaml
job1:
- ls -la
- touch test
- chmod +x test
- ./test

job2:
- rm *

job3:
- curl -I http://www.google.com
```

## How to add it to Jenkins?

- Create freestyle Jenkins Job
- Add "Execute shell" in "Build" section
- Add single command - `jenkins-yaml.runner ` - where is has to match one of the parent keys in .jenkins.yml (i.e. `job2` from example above)

## Parameters

`jenkins-yaml.runner [--errors] [--missing-section] [--missing-file] `

- Use `--errors` if you don't want to break excution on first error
- Use `--missing-section` if script should return exit code > 0 for missing section in .jenkins.yml file
- Use `--missing-file` if script should return exit code > 0 for missing .jenkins.yml file