Skip to content

Commit 02018d2

Browse files
authored
Merge pull request #43 from yogeek/patch-1
Fix declarative pipeline example in README
2 parents 3c44335 + 3581099 commit 02018d2

1 file changed

Lines changed: 7 additions & 10 deletions

File tree

README.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,21 +60,18 @@ pipeline {
6060
string(name: 'GREETING', defaultValue: 'Hello', description: 'How shall we greet?')
6161
}
6262
triggers {
63-
cron('* * * * *')
64-
parameterizedCron {
65-
parameterizedSpecification('''
66-
# leave spaces where you want them around the parameters. They'll be trimmed.
67-
# we let the build run with the default name
68-
*/2 * * * * %GREETING=Hola;PLANET=Pluto
69-
*/3 * * * * %PLANET=Mars
63+
parameterizedCron('''
64+
# leave spaces where you want them around the parameters. They'll be trimmed.
65+
# we let the build run with the default name
66+
*/2 * * * * %GREETING=Hola;PLANET=Pluto
67+
*/3 * * * * %PLANET=Mars
7068
''')
71-
}
7269
}
7370
stages {
7471
stage('Example') {
7572
steps {
76-
echo "${GREETING} ${PLANET}"
77-
script { currentBuild.description = "${GREETING} ${PLANET}" }
73+
echo "${params.GREETING} ${params.PLANET}"
74+
script { currentBuild.description = "${params.GREETING} ${params.PLANET}" }
7875
}
7976
}
8077
}

0 commit comments

Comments
 (0)