The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

JSON::ReadPath - In Jenkins grep payload json data and assign to an environment variable.

USAGE

Let's say Bitbucket pushed a payload '{"commits":{ "branch": "FooBar" }}'

And we want to grab the branch name from the payload.

 BRANCH=$(read_json.pl --env payload --path commits.branch)