GitLab
Note: This implementation can be adapted to your needs. We invite you to share any updates with us, either via email or on our forum.
Implementation steps
- Click "CI / CD" in your GitLab repo
- Click Editor
- Paste below code
- Click "Commit changes"
- The job will be triggered automatically!
Sample code
Below is a sample of code generated. Note that most of these settings will vary depending on your particular project settings and selected test to run.
stages:
- test
- package
default:
image: docker:latest
interruptible: true
timeout: 30m
services:
- docker:dind
variables:
DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER: overlay2
BASE: https://ai.boozang.com
TOKEN: my-secret-token
ENV: 4
PROJECT: 5e3f275e64f84941a326d4d8
BRANCH: master
SELF: 0
TEST: m72/t10
WORKERS: 1
worker-setup:
stage: test
artifacts:
untracked: true
script:
- >
for i in $(seq 2 ${WORKERS}); do
nohup docker run --rm --shm-size=1g -v "$(pwd):/var/boozang/" --name bzworker${i} styrman/boozang-playwright "${BASE}/extension?&token=${TOKEN}${PROJECT}&env=${ENV}&key=${i}&self=${SELF}#${PROJECT}/${BRANCH}" > nohup${i}.out
done
master-worker:
stage: test
artifacts:
untracked: true
script:
- docker run --rm --shm-size=1g -v "$(pwd):/var/boozang/" --name bzworker1 styrman/boozang-playwright "${BASE}/extension?token=${TOKEN}${PROJECT}&env=${ENV}&key=1&self=${SELF}#${PROJECT}/${BRANCH}/${TEST}"