2
votes

Here is my jenkinsfile:

pipeline {
    agent any
    options {
     skipDefaultCheckout()
    }
    parameters {
        choice(
            name: 'MyParam',
            choices: 'One\nTwo\nThree',
            description: 'slkfjlsdfjlsdjflksdjf')
    }

    stages {
        stage('Checkout') {
            steps {
                echo '========= Checkout stage =========='
                deleteDir()
                checkout scm
            }
        }
        stage('Build') {
            steps {
                echo '========= Build stage =========='
            }
        }
        stage('Deploy') {
            steps {
                echo '========= Deploy stage =========='
            }
        }
    }
}

So I create a new pipeline with it but I don't see a run button: enter image description here

But if I create a regular jenkins job in the old GUI and then view it in blue ocean I DO see the run button: enter image description here

Or maybe Im misunderstanding how pipelines work. When I create a new pipeline from blue ocean it looks like its creating a "multi branch" pipeline. Perhaps this kind of pipeline doesn't have a parameter choice??

1

1 Answers

4
votes

it looks like you clicked on the master branch for that build plan. for me, there is no run button on that screen. but if you click on "Branches" then there is a run button off to right for each branch (and it lets me select parameters as appropriate after i click the "play button" there).

and i don't think this is your issue (since you said there is a run button for other build plans), but for anyone else that comes through here, make sure you're signed in, since your jenkins instance may have anonymous builds disabled.