pipelineTest/PipelineTestJenkins

39 lines
1.1 KiB
Plaintext

import hudson.plugins.accurev.*
def build_ok = true
pipeline {
agent any
parameters {
string(name: 'PERSON', defaultValue: 'Mr Jenkins', description: 'Who should I say hello to?')
text(name: 'BIOGRAPHY', defaultValue: '', description: 'Enter some information about the person')
booleanParam(name: 'api-test-1', defaultValue: true, description: 'API Test 1')
booleanParam(name: 'api-test-2', defaultValue: true, description: 'API Test 2')
choice(name: 'CHOICE', choices: ['One', 'Two', 'Three'], description: 'Pick something')
password(name: 'PASSWORD', defaultValue: 'SECRET', description: 'Enter a password')
}
stages {
stage('api-test-1') {
when {
expression { return ${params.apitest1} }
}
steps {
echo "Teste 1"
}
}
stage('info') {
steps {
echo "api-test-1: ${params.api-test-1}"
echo "api-test-2: ${params.api-test-2}"
}
}
}
}