Skip to content

Commit 6398dc8

Browse files
authored
Merge pull request #12 from magnetikonline/master
Consistent cron argument lines in help detail and README.md
2 parents 3a50ef5 + 1f788f6 commit 6398dc8

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

README.md

+22-23
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
Parameterized Scheduler
2-
=======================
1+
# Parameterized Scheduler
32

43
[![Jenkins](https://ci.jenkins.io/job/Plugins/job/parameterized-scheduler-plugin/job/master/badge/icon)](https://ci.jenkins.io/job/Plugins/job/parameterized-scheduler-plugin/job/master/)
54
[![Jenkins Plugin](https://img.shields.io/jenkins/plugin/v/parameterized-scheduler.svg)](https://plugins.jenkins.io/parameterized-scheduler)
65
[![GitHub release](https://img.shields.io/github/release/jenkinsci/parameterized-scheduler-plugin.svg?label=changelog)](https://github.com/jenkinsci/parameterized-scheduler-plugin/releases/latest)
76

8-
A Jenkins Plugin to support setting parameters in the build schedule. Using multiple cron lines each ending with a % and some name=value pairs you can schedule your parameterized build to run with different parameters at different times.
7+
A Jenkins Plugin to support setting parameters in the build schedule. Using multiple cron lines each ending with a `%` and some `name=value` pairs you can schedule your parameterized build to run with different parameters at different times.
98

10-
## Installation ##
11-
To install this plugin follow the [Jenkins Plugin installation instructions](https://www.jenkins.io/doc/book/managing/plugins/)
9+
## Installation
1210

13-
## Configuration ##
11+
To install this plugin follow the [Jenkins Plugin installation instructions](https://www.jenkins.io/doc/book/managing/plugins/).
12+
13+
## Configuration
1414

1515
After you save your project with some parameters (yes, save, then go back into the config page) you will see
1616
>Build periodically with parameters
@@ -19,19 +19,19 @@ in the *Build Triggers* section as shown here:
1919

2020
![Parameterized Schedular Config](https://raw.githubusercontent.com/jenkinsci/parameterized-scheduler-plugin/master/site/images/configurationexample.png)
2121

22-
## Configuration Example ##
23-
The cron line before the _%_ symbol is processed the same as the jenkins core _Build periodically Schedule_. Leave a space. Put in a _%_. Then add the name=value pairs you need for your project build parameters.
22+
## Configuration Example
23+
24+
The cron line before the `%` symbol is processed the same as the jenkins core _Build periodically Schedule_. Leave a space. Put in a `%`. Then add the `name=value` pairs you need for your project build parameters.
2425

25-
The idea was born from the need to use a different environment. To use a different TestNG configuration xml. In this example the _env_ parameter will be set to int during the build triggered at 15 after each hour. Then _env_ will be qa when the build runs at half past.
26+
The idea was born from the need to use a different environment. To use a different TestNG configuration xml. In this example the `env` parameter will be set to int during the build triggered at 15 after each hour. Then `env` will be qa when the build runs at half past.
2627

2728
```
28-
#lets run against the integration environment at 15 past the hour
29-
15 * * * * % env=int
30-
#run QA too
31-
30 * * * % env=qa
29+
# lets run against the integration environment at 15 past the hour
30+
15 * * * * %env=int
31+
# run QA too
32+
30 * * * * %%env=qa
3233
```
3334

34-
3535
Yes, of course you can set multiple parameters. Lets say you have three parameters:
3636
- furniture
3737
- color
@@ -40,14 +40,14 @@ Yes, of course you can set multiple parameters. Lets say you have three paramete
4040
Then you might want a schedule like the following:
4141

4242
```
43-
# leave spaces where you want them around the parameters. They'll be trimmed.
44-
# we let the build run with the default name
45-
5 * * * * % furniture=chair;color=black
46-
# now, let's override that default name and use Mr. Rubble.
47-
10 * * * * % furniture=desk; color=yellow; name=barney
43+
# leave spaces where you want them around the parameters. They'll be trimmed.
44+
# we let the build run with the default name
45+
5 * * * * %furniture=chair;color=black
46+
# now, let's override that default name and use Mr. Rubble.
47+
10 * * * * %furniture=desk;color=yellow;name=barney
4848
```
4949

50-
## Declarative Pipeline Configuration Example ##
50+
## Declarative Pipeline Configuration Example
5151

5252
The parameterized cron trigger can be specified using the key `parameterizedSpecification` under the `parameterizedCron` under the [triggers directive](https://jenkins.io/doc/book/pipeline/syntax/#declarative-directives). The built in `cron` trigger is still available and is independent of `parameterizedCron`.
5353

@@ -79,10 +79,9 @@ pipeline {
7979
}
8080
```
8181

82-
Example Output in Jenkins
83-
=========================
84-
![Example Output in Jenkins](https://raw.githubusercontent.com/jenkinsci/parameterized-scheduler-plugin/master/site/images/scheduledBuilds.PNG)
82+
## Example Output in Jenkins
8583

84+
![Example Output in Jenkins](https://raw.githubusercontent.com/jenkinsci/parameterized-scheduler-plugin/master/site/images/scheduledBuilds.PNG)
8685

8786
## Scripted Pipeline Example
8887

src/main/resources/org/jenkinsci/plugins/parameterizedscheduler/ParameterizedTimerTrigger/help-parameterizedSpecification.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
<pre>
2828
# every fifteen minutes (perhaps at :07, :22, :37, :52)
2929
H/15 * * * * %name=value
30+
3031
# every ten minutes in the first half of every hour (three times, perhaps at :04, :14, :24)
31-
H(0-29)/10 * * * * % name=value; othername=othervalue
32+
H(0-29)/10 * * * * %name=value;othername=othervalue
3233
</pre>
3334
</div>

0 commit comments

Comments
 (0)