Bitbucket Pipelines
Scottsdale Hub uses manual-only Bitbucket pipelines for application deployment.
Deployment Boundary
- Pipelines deploy application images and trigger ECS service rollouts.
- CDK infrastructure changes are deployed separately.
Do not use app pipeline runs as a substitute for infrastructure deployment.
Manual Pipeline Entries
Run one of these pipeline names manually:
deploy-devdeploy-stagingdeploy-production
Deployment Flow
- Build app image from repository root Dockerfile.
- Push a shared image to ECR used by API, Horizon, Scheduler, and Ops.
- Force ECS deployment for target stage services.
For dev and staging, infrastructure may start services at desired count 0; deploy scripts bootstrap counts before force-deploy.
Self-Hosted Runner Model
Pipeline steps target labels:
self.hostedlinux.shellscottsdale.runner
Runner host profile:
- EC2 host in private networking
- Access through AWS Systems Manager Session Manager
- Uses instance profile for AWS API access
Runner bootstrap installs Docker, AWS CLI, jq, curl, unzip, Java Corretto, git, and SSM dependencies.
Stage to Cluster Mapping
Default mapping when CLUSTER_NAME is not set:
dev->hubdev-clusterstaging->hubstg-clusterproduction->hubprod-cluster
Required and Optional Variables
Runner AWS authentication uses EC2 role, so no static AWS keys are required.
Common optional overrides:
AWS_REGIONAWS_ACCOUNT_IDECR_APP_REPOCLUSTER_NAMESTACK_PREFIXAPI_SERVICE_NAMEHORIZON_SERVICE_NAMESCHEDULER_SERVICE_NAMEOPS_SERVICE_NAME
Runner IAM Permissions
Minimum required capabilities include:
- ECR image push permissions
- ECS list/describe/update service permissions
- CloudFormation exports read
- STS caller identity
Troubleshooting Highlights
203/EXEC service errors usually indicate invalid ExecStart paths in runner systemd configuration. Reconcile absolute paths with actual start.sh location and restart service.
No public IP runner access is expected. Use SSM session start:
aws ssm start-session --target <instance-id> --region us-west-2