0

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.

enter image description here

My oauth client is correctly configured on bitbucket.

enter image description here

And on my jenkins, I have the credentials ok;

enter image description here

What I'm doing wrong? How can I make it happen?

030
  • 10,842
  • 12
  • 78
  • 123
Jedi31
  • 735
  • 1
  • 6
  • 22

0 Answers0