Skip to content

Instantly share code, notes, and snippets.

@jblac jblac/Jenkinsfile Secret
Created Mar 30, 2017

Embed
What would you like to do?
stage('Manual Tests') {
def userInput = input(
id: 'userInput', message: 'What env to test in?', parameters: [
[
$class: 'ChoiceParameterDefinition',
description: 'This will reset the DB to match Prod',
name: 'environment',
choices: "qa\nstaging\nvms\nskip\n"
]
])
node {
wrap([$class: 'AnsiColorBuildWrapper', 'colorMapName': 'XTerm']) {
timestamps {
try {
switch (userInput) {
default:
error("Invalid environment choice");
break;
case ['qa', 'staging', 'vms']:
echo "Deploying into ${userInput}"
break;
case 'skip':
echo 'Skipping manual tests'
break
}
} catch (error) {
throw error
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.