Hi,
I am using staging view plugin to see how much it takes to run my stages. But when I trigger a downstream build and the downstream build waits in the queue, my upstream build cannot find out that downstream build is in queue and counts the time as if it is building. What I wanna do is to capture stage view instance via groovy script in declarative jenkinsfile and change its state to stop it counting the time until downstream build starts to run. I tried to get plugin instance with the jenkinsfile below but it returns null. I don’t know what I am asking is feasible think to do. Any commands would be appriciated.
Thanks
import com.cloudbees.workflow.ui.view.*;
def plugin = Jenkins.get().getPlugins(WorkflowStageViewAction);
println plugin.getDisplayName();
pipeline {
agent any
options {
skipDefaultCheckout()
}
parameters {
choice(name: 'ENVIRONMENT', choices: ['dev', 'prod'], description: 'Select environment.')
string(name: 'BRANCH', defaultValue: 'master', description: 'Write name of the branch.')
}
stages {
stage('example'){
steps{
sh "echo example"
}
}
}
}