Skip to content

Commit

Permalink
Merge pull request #97 from philippart-s/add-scripted-pipeline-example
Browse files Browse the repository at this point in the history
feat: Add scripted pipeline example
  • Loading branch information
garethjevans authored Aug 23, 2021
2 parents 1746d34 + e64d8fa commit 6a8c451
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,21 @@ pipeline {
}
}
```
### In a scripted Pipeline

```groovy
def NEXT_VERSION
node {
stage('Get next version ...') {
NEXT_VERSION=nextVersion()
echo "Next version : $NEXT_VERSION"
}
stage ('Release') {
sh "mvn release:prepare -DreleaseVersion=$NEXT_VERSION"
sh 'mvn release:perform'
}
}
```

## Using Optional Parameters

Expand Down

0 comments on commit 6a8c451

Please sign in to comment.