Daniel Medina
Daniel Medina

Reputation: 947

Jenkins powershell plugin don't work in declarative pipeline

I'm trying to run a powershell script in a declarative pipeline job, but it don't work. It seems to work, but don't do nothing.

This is a part of my pipeline

pipeline{
    agent{
        label 'windows'
    }
    stages {
        .
        .
        .
        stage("Preparing"){
            steps{
                powershell "./scripts/SetVersion.ps1 $version"
            }
        }
        .
        .
        .
    }
}

This is the output in pipeline log

Running PowerShell script

But nothing happens and the pipeline go to the next step. And for sure my script was not run. The same instruction runs very well in scriptable pipeline

I tried basic commands like "ps" and it worked well.

Am I doing something wrong? Or is this plugin buggy?

Some additional information

Jenkins version: 2.107.2

Powershell plugin version: 1.3

Upvotes: 0

Views: 612

Answers (1)

Daniel Medina
Daniel Medina

Reputation: 947

False alarm. It was just another job breaking my scripts. Everything is ok now.

Upvotes: 1

Related Questions