Files
query-orchestration/bitbucket-pipelines.yml
T
Michael McGuinness 7ce7c9df4d Merged in feature/ecr (pull request #161)
Feature/ecr

* nosave

* repo

* awscli

* unzip

* ignore

* moreram

* 14k

* ref

* deployment

* 12k

* uselocal

* go

* dockercomd

* reorder

* iamgename

* installs

* tart

* cli

* clideps

* y

* dockerce

* nodock

* multi

* rmecr

* dev
2025-06-03 13:52:10 +00:00

97 lines
2.8 KiB
YAML

---
image: ubuntu:latest
definitions:
caches:
devbox: ~/.cache/devbox
apt-lists: /var/lib/apt/lists
apt-cache: /var/cache/apt/archives
services:
docker:
memory: 12000
steps:
- step: &fullsuite
name: Fullsuite
size: 16x
services:
- docker
caches:
- devbox
- apt-lists
- apt-cache
script:
- export DOCKER_BUILDKIT=0
- export DOCKER_HOST=tcp://localhost:2375
- export TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE=tcp://localhost:2375
- export TESTCONTAINERS_RYUK_DISABLED=true
- rm /etc/apt/apt.conf.d/docker-clean || true
- apt-get update
- apt-get install -y curl git
- curl -fsSL https://get.jetify.com/devbox | bash -s -- -f
- export PATH="/root/.local/bin:$PATH"
- touch .env
- devbox install
- devbox run -- AWS_PROFILE="" task fullsuite
- step: &fullsuite-and-publish
name: Fullsuite and Publish
size: 16x
oidc: true
deployment: dev
services:
- docker
caches:
- devbox
- apt-lists
- apt-cache
script:
- export DOCKER_BUILDKIT=0
- export DOCKER_HOST=tcp://localhost:2375
- export TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE=tcp://localhost:2375
- export TESTCONTAINERS_RYUK_DISABLED=true
- export AWS_DEFAULT_REGION=${AWS_DEFAULT_REGION:-us-east-1}
- export IMAGE_TAG=$ECR_REGISTRY/doczy/query-orchestration:$BITBUCKET_COMMIT
- export AWS_WEB_IDENTITY_TOKEN_FILE=$(pwd)/web-identity-token
- echo $BITBUCKET_STEP_OIDC_TOKEN > $(pwd)/web-identity-token
- rm /etc/apt/apt.conf.d/docker-clean || true
- apt-get update
- apt-get install -y curl git unzip
- mkdir -p out
- cd out
- curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
- unzip awscliv2.zip
- ./aws/install
- curl -fsSL https://get.jetify.com/devbox | bash -s -- -f
- export PATH="/root/.local/bin:$PATH"
- cd ..
- aws sts get-caller-identity --query "Arn" --output text
- |
aws ecr get-login-password --region $AWS_DEFAULT_REGION | \
docker login --username AWS --password-stdin $ECR_REGISTRY
- touch .env
- devbox install
- devbox run -- AWS_PROFILE="" task fullsuite
- docker tag queryorchestration:latest $IMAGE_TAG
- docker push $IMAGE_TAG
after-script:
- docker stop registry || true
pipelines:
branches:
main:
- step: *fullsuite-and-publish
pull-requests:
"**":
- step: *fullsuite