gitlab-ci-chrome-headless
4.6K
This project allows you to work with GitLab CI and use a container that can both git push to an origin and allow you to run a headless chrome.
This is useful when you have another external git repository hosting your codebase of your application and at the same time you are in need of headless browser capabilities for purposes such as Behat testing from that remote server.
Example implementation .gitlab-ci.yml file:
image: novitsh/gitlab-ci-chrome-headless
stages:
- develop
before_script:
- echo "Establishing SSH tunnel in the background."
- ssh -R 9222:localhost:9222 $USER@$REMOTE -fN
deployment to develop:
stage: develop
script:
- echo "Now pushing new code to remote git repository."
- git-push $USER@$REMOTE:$PROJECT.git develop
- ssh $USER@$REMOTE "cd /project/behat && bin/behat --config behat.yml"
Above example code will basically open an SSH tunnel, push the Gitlab repo to a remote server, and then connect to it to run some Behat tests.
Please note that $USER, $REMOTE and $PROJECT are variables you need to set in the
CI/CD environment variables section. So just don't copy paste this example :-)
Content type
Image
Digest
Size
360.7 MB
Last updated
over 8 years ago
docker pull novitsh/gitlab-ci-chrome-headless