I have this JenkinsFile
pipeline {
agent {
node {
label 'SERVER'
}
}
stages {
stage('Notificando Inicio do Job') {
steps {
bitbucketStatusNotify buildState: 'INPROGRESS'
}
}
stage('Restore') {
steps {
powershell(script: 'dotnet restore', returnStatus: false)
}
}
stage('Build') {
steps {
powershell(script: 'dotnet build ./path', returnStatus: false)
}
}
stage('Test') {
steps {
powershell(script: 'dotnet test ./path', returnStatus: false)
}
}
}
post{
always{
echo "Finalizando Build..."
}
success{
bitbucketStatusNotify buildState: 'SUCCESS'
}
failure{
bitbucketStatusNotify buildState: 'FAILED'
}
}
}
My desire is notify Bitbucket with build status.
This Jenkinsfile works perfectly ok when I run from an Multi-Branch pipeline, but, when I use it with a simple pipeline, it does not work.
Then, I go to the jenkins logs, and the only this related is... But, from plugin doc, these parameters are not mandatory.
My oauth client is correctly configured on bitbucket.
And on my jenkins, I have the credentials ok;
What I'm doing wrong? How can I make it happen?