Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pipeline {
- agent any
- stages {
- stage("create file") {
- steps {
- touch "testfile.log"
- }
- }
- stage("when file last modified after job") {
- when {
- expression {
- findFiles(glob: "testfile.log")?.first()?.lastModified >
- currentBuild.startTimeInMillis
- }
- }
- steps {
- echo "i ran"
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment