Hi matthew_dews. You could possibly do this with a paramaterized job and Perforce command triggers.
(1) Create a Jenkins job that takes label as a parameter and builds at that label.
(2) Create a post command trigger on 'tag' and 'label' that fires starts the job passing the label as the paramater.
Note: The difficult part of this solution is deciding what paths to build. If your the label contains the exact paths to build you could use that to build up the workspace.
More on Perforce command triggers can be found here:
https://www.perforce.com/manuals/p4sag/Content/P4SAG/scripting.triggers.order.html
And below is a really simple script I have used in the past to fire a Jenkins job:
$ cat /scripts/fire_jenkins_job.py
import jenkins
import sys
url = 'JenkinsServer:8080'
job = 'Freestyle_Paramaterized'
j = jenkins.Jenkins(url)
j.build_job(job, parameters={'LABEL':'label1'})
Hi matthew_dews. You could possibly do this with a paramaterized job and Perforce command triggers.
(1) Create a Jenkins job that takes label as a parameter and builds at that label.
(2) Create a post command trigger on 'tag' and 'label' that fires starts the job passing the label as the paramater.
Note: The difficult part of this solution is deciding what paths to build. If your the label contains the exact paths to build you could use that to build up the workspace.
More on Perforce command triggers can be found here:
https://www.perforce.com/manuals/p4sag/Content/P4SAG/scripting.triggers.order.html
And below is a really simple script I have used in the past to fire a Jenkins job: