Added some scripts
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent none
|
agent any
|
||||||
parameters {
|
parameters {
|
||||||
booleanParam(defaultValue: true, description: '', name: 'flag')
|
booleanParam(defaultValue: true, description: '', name: 'flag')
|
||||||
// TODO: Be prepared to change this to "stringParam" once we're on a new enough core.
|
// TODO: Be prepared to change this to "stringParam" once we're on a new enough core.
|
||||||
@@ -8,7 +8,7 @@ pipeline {
|
|||||||
triggers {
|
triggers {
|
||||||
cron('@daily')
|
cron('@daily')
|
||||||
}
|
}
|
||||||
properties {
|
options {
|
||||||
buildDiscarder(logRotator(numToKeepStr:'1'))
|
buildDiscarder(logRotator(numToKeepStr:'1'))
|
||||||
disableConcurrentBuilds()
|
disableConcurrentBuilds()
|
||||||
}
|
}
|
||||||
@@ -20,5 +20,3 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
51
06-Saucelabs-Example.groovy
Normal file
51
06-Saucelabs-Example.groovy
Normal 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()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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"
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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"
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user