I am trying to implement regression testing using Cypress in my pipeline in one of my pipeline steps. Below screenshot is the pipeline failure where I am just simply verifying cypress
In my local, it is working fine. Seems like this issue is really related to Bitbucket pipeline itself
My docker-compose.yml is as simple as below
How can I bypass the error on the first screenshot? I want to keep using docker-compose.yml to keep for identical purposes with my local environment
Could you perhaps share the content of your bitbucket-pipelines.yml file so I can try to reproduce this and understand what is happening?
Please make sure to sanitize sensitive / private data in the file (if any) before sharing. I just want to see the commands running during the build, pipelines config options, etc.
Kind regards,
Theodora
Hello Theodora,
Below is my bitbucket-pipelines.yml
image: atlassian/default-image:4
options:
docker: true
definitions:
steps:
- step: &NotifyStart
name: Notify that the pipeline has started
image: curlimages/curl
script:
- curl --header "Content-Type:application/json; charset=utf-8" --header "Authorization:Bearer $BOT_TOKEN" --request POST --data '{"channel":"'$CHANNEL_ID'","text":"Attention<!channel> \n:timer_clock:'$BITBUCKET_REPO_SLUG' '$BITBUCKET_BRANCH' branch has *started the build* at '$BITBUCKET_GIT_HTTP_ORIGIN'/pipelines/results/'$BITBUCKET_BUILD_NUMBER'"}' https://slack.com/api/chat.postMessage
- step: &RegressionTesting
name: Automating testing for both backend and frontend
services:
- docker
caches:
- docker
- pip
script:
- export DOCKER_BUILDKIT=0
- apt-get update && apt-get install -y git git-core
- ./starter.sh
- docker-compose exec backend coverage run --source='.' manage.py test > backend_feature_tests.txt || true
- docker-compose exec backend coverage report > backend_feature_coverage.txt
- cat backend_feature_tests.txt
- cat backend_feature_coverage.txt
- docker ps -a
- docker-compose exec cypress cypress verify
- docker-compose exec cypress cypress run --headless || true
pipelines:
branches:
'{master}':
- step:
<<: *NotifyStart
- step:
<<: *RegressionTesting
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dean Christian,
Thank you for the info.
I tried to reproduce with a step as similar as possible to your &RegressionTesting step but I haven't been able to so far. However, I am missing some information that may be key to reproducing this.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.