Added some scripts

This commit is contained in:
Guillem Hernández Sola
2017-04-04 09:58:42 +02:00
parent 8f2d4e6205
commit 25ada802f4
4 changed files with 54 additions and 51 deletions

View File

@@ -1,5 +1,5 @@
pipeline {
agent none
agent any
parameters {
booleanParam(defaultValue: true, description: '', name: 'flag')
// TODO: Be prepared to change this to "stringParam" once we're on a new enough core.
@@ -8,7 +8,7 @@ pipeline {
triggers {
cron('@daily')
}
properties {
options {
buildDiscarder(logRotator(numToKeepStr:'1'))
disableConcurrentBuilds()
}
@@ -20,5 +20,3 @@ pipeline {
}
}
}

View File

@@ -0,0 +1,51 @@
pipeline {
agent any
tools {
maven "maven_jenkins"
jdk "java_jenkins"
}
environment {
saucelabsCredentialId = '8b819d9d-0298-4f8f-9430-6d44e87ac7b5'
}
stages {
stage('Checkout') {
steps {
git url: 'git@github.com:Gromenaware/corball-test-automation-demo.git'
}
}
stage('Test') {
steps {
sh 'mvn -Dtest=WebDriverTest -Dbrowser=$BROWSER -Dhub=http://selgp:8b819d9d-0298-4f8f-9430-6d44e87ac7b5@ondemand.saucelabs.com:80/wd/hub test'
}
}
}
post {
success {
emailext (
subject: "SUCCESSFUL: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'",
body: """SUCCESSFUL: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]': Check console output at ${env.BUILD_URL}""",
to: 'guillem@gromenaware.com'
)
}
failure {
emailext (
subject: "FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'",
body: """FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]': Check console output at ${env.BUILD_URL}""",
to: 'guillem@gromenaware.com'
)
}
always {
step([$class: 'XUnitBuilder',
thresholds: [
[$class: 'SkippedThreshold', failureThreshold: '0'],
// Allow for a significant number of failures
// Keeping this threshold so that overwhelming failures are guaranteed
// to still fail the build
[$class: 'FailedThreshold', failureThreshold: '10']],
tools: [[$class: 'JUnitType', pattern: 'target/surefire-reports/junitreports/**']]])
saucePublisher()
}
}
}

View File

@@ -1,23 +0,0 @@
pipeline {
agent any
stages {
stage("One") {
steps {
echo "Hello"
}
}
stage("Two") {
when {
echo "Should I run?"
return true
}
steps {
script {
echo "World"
echo "Heal it"
}
}
}
}
}

View File

@@ -1,23 +0,0 @@
pipeline {
agent any
stages {
stage("One") {
steps {
echo "Hello"
}
}
stage("Two") {
when {
echo "Should I run?"
return true
}
steps {
script {
echo "World"
echo "Heal it"
}
}
}
}
}