pipeline { agent { label "master" } stages { stage("Get source IP address") { steps { script { source = (sh (script: """ip --json address | jq -r '.[] | select(."ifname"=="tapvpn").addr_info[] | select(."family"=="inet").local'""", returnStdout: true)).trim() } } } stage("Rsync Firefox profile") { agent { label "workstation" } steps { sh (script: "rsync -av --exclude=storage rsync://$source/mozilla/firefox/j56dvo43.default-1520714705340 /home/oleg/.mozilla/firefox") } } } post { always { sendNotifications currentBuild.result } } }