Skip to content

Commit

Permalink
Add publicoperator to docker-compose file
Browse files Browse the repository at this point in the history
  • Loading branch information
cYKatherine committed Dec 11, 2023
1 parent 88393ff commit 2752d56
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ on:
- Minor
- Patch
- Snapshot
operator_image_hash:
description: 'The hash of GCP enclave image(start with sha256:)'
operator_image_version:
description: 'The version of UID2 operator image'
type: string
required: true
default: 'latest'
core_image_version:
description: 'The version of UID2 core image'
type: string
Expand Down Expand Up @@ -82,5 +82,6 @@ jobs:
OPTOUT_ROOT: '../'
CORE_VERSION: ${{ inputs.core_image_version }}
OPTOUT_VERSION: ${{ inputs.optout_image_version }}
OPERATOR_VERSION: ${{ inputs.operator_image_version }}
run: |
cd ./e2e && bash ./docker-build-public.sh
6 changes: 6 additions & 0 deletions e2e/docker-build-public.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,15 @@ if [ -z "$OPTOUT_VERSION" ]; then
exit 1
fi

if [ -z "$OPERATOR_VERSION" ]; then
echo "OPERATOR_VERSION can not be empty"
exit 1
fi

# replace placeholders
sed -i.bak "s#<CORE_VERSION>#$CORE_VERSION#g" $COMPOSE_FILE
sed -i.bak "s#<OPTOUT_VERSION>#$OPTOUT_VERSION#g" $COMPOSE_FILE
sed -i.bak "s#<OPERATOR_VERSION>#$OPERATOR_VERSION#g" $COMPOSE_FILE

cat $CORE_CONFIG_FILE
cat $OPTOUT_CONFIG_FILE
Expand Down
16 changes: 16 additions & 0 deletions e2e/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,19 @@ services:
interval: 5s
timeout: 5s
retries: 10

publicoperator:
container_name: public_operator
image: ghcr.io/iabtechlab/uid2-optout:<OPERATOR_VERSION>
ports:
- "127.0.0.1:8080:8080"
- "127.0.0.1:9080:9080"
- "127.0.0.1:5080:5005"
volumes:
- ../conf/local-e2e-docker-public-config.json:/app/conf/local-config.json
depends_on:
core:
condition: service_healthy
healthcheck:
test: [ "CMD", "wget", "--spider", "http://localhost:8080/ops/healthcheck" ]
interval: 5s

0 comments on commit 2752d56

Please sign in to comment.