Skip to content

Commit

Permalink
List chrome/driver files without failing build
Browse files Browse the repository at this point in the history
  • Loading branch information
seanf authored and definite committed Mar 27, 2017
1 parent 55e1cbe commit c318b42
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions Jenkinsfile
@@ -1,27 +1,28 @@
#!/usr/bin/env groovy

// these wrappers don't seem to be built in yet
void ansicolor(Closure<Void> wrapped) {
void ansicolor(Closure wrapped) {
wrap([$class: 'AnsiColorBuildWrapper', 'colorMapName': 'XTerm', 'defaultFg': 1, 'defaultBg': 2]) {
wrapped.call()
}
}
void xvfb(Closure<Void> wrapped) {
void xvfb(Closure wrapped) {
wrap([$class: 'Xvfb']) {
wrapped.call()
}
}

void withPorts(Closure<Void> wrapped) {
void withPorts(Closure wrapped) {
def ports = sh(script: 'etc/scripts/allocate-jboss-ports', returnStdout: true)
withEnv(ports.trim().readLines()) {
wrapped.call()
}
}

void printNode() {
void printNodeInfo() {
sh "env"
sh "which chromedriver"
sh returnStatus: true, script: 'which chromedriver google-chrome'
sh returnStatus: true, script: 'ls -l /opt/chromedriver /opt/google/chrome/google-chrome'
println "running on node ${env.NODE_NAME}"
}

Expand Down Expand Up @@ -55,7 +56,7 @@ timestamps {
node {
ansicolor {
stage('Checkout') {
printNode()
printNodeInfo()
notifyStarted()
// Checkout code from repository
// Based on https://issues.jenkins-ci.org/browse/JENKINS-33022?focusedCommentId=248530&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-248530
Expand All @@ -78,7 +79,7 @@ timestamps {
}

stage('Install build tools') {
printNode()
printNodeInfo()
// TODO yum install the following
// Xvfb libaio xorg-x11-server-Xvfb wget unzip git-core
// https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
Expand All @@ -99,7 +100,7 @@ timestamps {


stage('Build') {
printNode()
printNodeInfo()
sh """./mvnw clean package \
--batch-mode \
--settings .travis-settings.xml \
Expand Down Expand Up @@ -139,7 +140,7 @@ timestamps {
node {
ansicolor {
unstash 'workspace'
printNode()
printNodeInfo()
integrationTests('wildfly8')
}
}
Expand All @@ -148,7 +149,7 @@ timestamps {
node {
ansicolor {
unstash 'workspace'
printNode()
printNodeInfo()
integrationTests('jbosseap6')
}
}
Expand Down

0 comments on commit c318b42

Please sign in to comment.