CI/CD Pipelines
Azure Pipelines: Deploy and Test
Run your test suite against the deployed environment to validate changes.
trigger:
- main
pr:
- main
pool:
vmImage: ubuntu-latest
steps:
- task: NodeTool@0
inputs:
versionSpec: "20.x"
displayName: "Install Node.js"
- script: npm install
displayName: "Install dependencies"
- script: |
set -o pipefail
npx zuplo deploy --api-key $(ZUPLO_API_KEY) 2>&1 | tee ./DEPLOYMENT_STDOUT
displayName: "Deploy to Zuplo"
- script: |
DEPLOYMENT_URL=$(grep -oP 'Deployed to \K(https://[^ ]+)' ./DEPLOYMENT_STDOUT)
npx zuplo test --endpoint "$DEPLOYMENT_URL"
displayName: "Run tests"
This pipeline:
- Deploys to Zuplo and captures the output
- Extracts the deployment URL from the output
- Runs tests against the deployed environment
Next Steps
Last modified on