0

How do I use the lockable resources plugin to lock over multiple stages with a declarative pipeline

Currently, in a scripted pipeline, I do this:

    lock("AWS-Tests") {

        stage("Start AWS environment")

        ...

        stage("Do tests")

        ...

        stage("Shutdown AWS")

        ...

    }

As you can see, I am locking a resource over multiple stages, because I am using the AWS-Environment over multiple stages.

Is this still possible with a declarative pipeline? How?

Thanks!

0 comments

Please sign in to leave a comment.