Skip to content

Commit

Permalink
Fix buildspec script
Browse files Browse the repository at this point in the history
Install postgresql
  • Loading branch information
hellais committed Mar 12, 2024
1 parent 0f4e737 commit 9134e0f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ooniapi/services/oonirun/buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,30 @@ env:
variables:
OONI_CODE_PATH: ooniapi/services/oonirun
DOCKERHUB_SECRET_ID: oonidevops/dockerhub/access_token
LANG: "en_US.UTF-8"
LANGUAGE: "en_US.UTF-8"
LC_CTYPE: "en_US.UTF-8"

phases:
install:
runtime-versions:
python: 3.11
commands:
- pip install hatch
- echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list
- wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
- apt-get update
- apt install -y postgresql-16

pre_build:
run-as: codebuild-user
commands:
- aws --version
- echo "Logging in to ECR"
- aws secretsmanager get-secret-value --secret-id $DOCKERHUB_SECRET_ID --query SecretString --output text | docker login --username ooni --password-stdin

build:
run-as: codebuild-user
commands:
- cd $OONI_CODE_PATH
- export GIT_FULL_SHA=${CODEBUILD_RESOLVED_SOURCE_VERSION}
Expand Down

0 comments on commit 9134e0f

Please sign in to comment.