Hello I am trying to run some integration tests with the help of testcontainers and they are running pretty much fine locally, but i need the test to be executed inside Jenkins build, and runing the tests inside Jenkins pipeline is failing with this error:
Caused by: java.lang.IllegalStateException: Could not find a valid Docker environment. Please see logs and check configuration
at com.some.package.SomeTest.<clinit>(SomeTest.groovy:49)
What should I do to be able to resolve this?
Related
I am using cypress version 8.5.0 to create my UI automation scripts. Automation repository is placed in Gitlab. These scripts are triggered through Jenkins pipeline wherein we have created a Jenkinsfile containing docker image
image: cypress/included:8.5.0
and running tests in Linux container. All infra like Jenkins etc. are hosted in cloud. At this moment scripts are successfully running sequentially in Electron using following command in Jenkinsfile
sh 'npx cypress run'
I have two queries -
(a) We wanted to specify folder path for execution and browser as well with following command but it is failing
sh 'npx cypress run --spec "folder path" --browser=chrome'
(b) We wanted to reduce our execution time by parallel execution. cypress dashboard is not an option for us due to budget constraints.
I saw some folks mentioned about sorry-cypress as an alternative and I explored on that. But I am not able to figure out changes required in Jenkinsfile to make this work.
Thanks in advance for sharing your valuable suggestions/work.
I am trying to run a remote command from Jenkins.
I am able to run the command from the agent directly successfully.
But when I am trying the same command from the Jenkins it gives me below error.
I found the same issue here.
I tried all the solution provided there but its still not working.
Any help would be appreciated.
Jenkins is placed on remote machine. When I run tests via Jenkins I get error:
System.IO.DirectoryNotFoundException : Could not find a part of the path
But if I run tests on local machine It works ok.
Do you know why it might happened ?
I am trying to run the docker steps using docker pipeline plugin in Jenkins but facing the following issue:
Cannot run program "nohup" (in directory "/var/lib/jenkins/workspace/pipeline/java"): error=7, Argument list too long
This issue is coming while running:
app = docker.build('java:1.7')
I went through the plugin code and seems to be a shell issue where the argument length exceeds the default limit.
Earlier it was working fine but all of sudden start facing this issue.
I appreciate any kind of help here.
Environment details are as follows:
Jenkins Version: 2.89.2 running on AWS RHEL EC2 instance
Docker pipeline plugin version: 1.14
Thanks,
Sanjiv
I already have all e2e tests written and they run successfully on my local machine and on the Codeship.
I want to move our CI from the codeship to Bitbucket pipelines. So I created my own Docker image with testing environment.
When I run docker conatiner in my local workspace, the tests work fine, but when build runs in bitbucket pipelines all the tests fail by timeout saying that angular can't be found on the page.
Server is definitely up and running in the container ant tests also start, but the problem is with pages opening.
Does anyone has any ideas about it?
If any code is required, I'll post everything that is needed.
So I managed to solve my issue.
Not sure if it can be useful to anyone else, but the problem appeared in my environment setup.
I forgot to add starting of webpack service that should generate some required server files and minified files of the server sources.
So server started successfully, but requesting the routes from the browser failed because it wasn't able to find requested files.