CI/CD Pipelines
Bitbucket Pipelines: Deploy and Test
Run your test suite against the deployed environment to validate changes.
image: node:20
pipelines:
default:
- step:
name: Deploy to Zuplo
script:
- npm install
- npx zuplo deploy --api-key "$ZUPLO_API_KEY" 2>&1 | tee
./DEPLOYMENT_STDOUT
- echo "DEPLOYMENT_URL=$(grep -oP 'Deployed to \K(https://[^ ]+)'
./DEPLOYMENT_STDOUT)" >> deployment.env
artifacts:
- deployment.env
- step:
name: Run Tests
script:
- source deployment.env
- npm install
- npx zuplo test --endpoint "$DEPLOYMENT_URL"
This pipeline:
- Deploys to Zuplo and captures the output
- Extracts the deployment URL and saves it as an artifact
- Runs tests against the deployed environment
Next Steps
Last modified on