-
-
Notifications
You must be signed in to change notification settings - Fork 237
Open
Labels
Description
I have a Jenkinsfile which runs our Appium Smoke tests, for the past few days the jenkins job has been failing with absolutely no clear explaining, it all runs perfectly fine until it enters the Appium container and tries to run it's first sh
command, in which it will hang for about 5 minutes then fail with:
[Pipeline] container
[Pipeline] {
[Pipeline] sh
process apparently never started in /home/jenkins/agent/workspace/android-at-tests@tmp/durable-0f6a0121
(running Jenkins temporarily with -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.LAUNCH_DIAGNOSTICS=true might make the problem clearer)
So I've now just changed the image from image: "appium/appium"
to image: "appium/appium:v1.22.0-p0"
and it's working, which leads me to believe a recent update is causing the hang to occur. Maybe since a big refactor?
Jenkinsfile code to reproduce issue:
pipeline {
agent {
kubernetes {
label 'android-at'
defaultContainer 'jnlp'
yaml '''
apiVersion: v1
kind: Pod
metadata:
labels:
deploy: android-at
spec:
containers:
- name: jnlp
image: jenkins/jnlp-slave
- name: appium
image: appium/appium
volumeMounts:
- mountPath: /root/.android/
name: adb
readOnly: true
- name: at-app
image: xxxxxx
command:
- cat
tty: true
volumes:
- name: adb
secret:
defaultMode: 420
optional: false
secretName: adb
'''
}
}
stages {
stage('Fetch apk') {
steps {
container('at-app') {
sh "curl ${APK_BUILD_OUTPUT_PATH} > app-global-debug.apk" // This all works okay
}
}
}
stage('Run tests') {
environment {
// settings env vars
}
steps {
container('appium') {
// Everything hangs and fails from here
sh "echo 'connecting to $params.DEVICE device...'"
sh "adb connect ${GALAXY_TAB_S8_IP}:5555"
}
}