Skip to content

Commit

Permalink
Use docker pull/push command directly instead of addnab/docker-run-ac…
Browse files Browse the repository at this point in the history
…tion@v3
  • Loading branch information
cYKatherine committed Dec 14, 2023
1 parent 682bb5d commit d09490b
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 23 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/shared-run-e2e-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ on:
required: false
type: string
default: 'PUBLIC'
uid2_e2e_phone_support:
description: 'Environment variable to run the E2E test'
required: false
type: string
default: 'true'

env:
REGISTRY: ghcr.io
Expand Down
78 changes: 55 additions & 23 deletions actions/run_e2e_tests/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,27 +36,59 @@ inputs:
runs:
using: "composite"
steps:
- name: Run E2E tests
uses: addnab/docker-run-action@v3
with:
image: ghcr.io/iabtechlab/uid2-e2e:${{ inputs.e2e_image_version }}
options: --network e2e_default
# - name: Run E2E tests
# uses: addnab/docker-run-action@v3
# with:
# image: ghcr.io/iabtechlab/uid2-e2e:${{ inputs.e2e_image_version }}
# options: --network e2e_default
# run: |
# export UID2_E2E_ENV="github-test-pipeline"
# export UID2_E2E_SITE_ID="999"
# export UID2_E2E_API_KEY="UID2-C-L-999-fCXrMM.fsR3mDqAXELtWWMS+xG1s7RdgRTMqdOH2qaAo="
# export UID2_E2E_API_SECRET="DzBzbjTJcYL0swDtFs2krRNu+g1Eokm2tBU4dEuD0Wk="
# export UID2_E2E_API_KEY_OLD="UID2-C-L-1000-qxpBsF.ibeCDBpD2bq4Zm7inDacGioUk1aaLeNJrabow="
# export UID2_E2E_API_SECRET_OLD="VT7+t0G/RVueMuVZAL56I2c3JJFSYQfhbu8yo0V/Tds="
# export UID2_E2E_IDENTITY_SCOPE=${{ inputs.uid2_e2e_identity_scope }}
# export UID2_E2E_PHONE_SUPPORT=${{ inputs.uid2_e2e_phone_support }}
# export UID2_E2E_PIPELINE_OPERATOR_TYPE=${{ inputs.uid2_e2e_pipeline_operator_type }}
# export UID2_E2E_PIPELINE_OPERATOR_URL=${{ inputs.uid2_e2e_pipeline_operator_url }}
# export UID2_E2E_PIPELINE_OPERATOR_CLOUD_PROVIDER=${{ inputs.uid2_e2e_pipeline_operator_cloud_provider }}
# if [ "$UID2_E2E_PIPELINE_OPERATOR_TYPE" != "PUBLIC" ] && [ "$UID2_E2E_PIPELINE_OPERATOR_TYPE" != "PRIVATE" ] ; then
# echo "ERROR: Incorrect operator type: $UID2_E2E_PIPELINE_OPERATOR_TYPE"
# elif [ "$UID2_E2E_PIPELINE_OPERATOR_TYPE" = "PUBLIC" ] ; then
# mvn test -Dtest="E2EPublicOperatorTestSuite"
# else
# mvn test -Dtest="E2EPrivateOperatorTestSuite"
# fi
- name: Run E2E tests
shell: bash
# env:
# UID2_E2E_ENV: github-test-pipeline
# UID2_E2E_API_KEY: UID2-C-L-999-fCXrMM.fsR3mDqAXELtWWMS+xG1s7RdgRTMqdOH2qaAo=
# UID2_E2E_API_KEY_OLD: UID2-C-L-1000-qxpBsF.ibeCDBpD2bq4Zm7inDacGioUk1aaLeNJrabow=
# UID2_E2E_API_SECRET: DzBzbjTJcYL0swDtFs2krRNu+g1Eokm2tBU4dEuD0Wk=
# UID2_E2E_API_SECRET_OLD: VT7+t0G/RVueMuVZAL56I2c3JJFSYQfhbu8yo0V/Tds=
# UID2_E2E_IDENTITY_SCOPE: ${{ inputs.uid2_e2e_identity_scope }}
# UID2_E2E_PHONE_SUPPORT: ${{ inputs.uid2_e2e_phone_support }}
# UID2_E2E_PIPELINE_OPERATOR_CLOUD_PROVIDER: ${{ inputs.uid2_e2e_operator_cloud_provider }}
# UID2_E2E_PIPELINE_OPERATOR_TYPE: '${{ inputs.uid2_e2e_operator_type }}'
# UID2_E2E_PIPELINE_OPERATOR_URL: ${{ inputs.uid2_e2e_operator_url }}
# UID2_E2E_SITE_ID: 999 \
run: |
export UID2_E2E_ENV="github-test-pipeline"
export UID2_E2E_SITE_ID="999"
export UID2_E2E_API_KEY="UID2-C-L-999-fCXrMM.fsR3mDqAXELtWWMS+xG1s7RdgRTMqdOH2qaAo="
export UID2_E2E_API_SECRET="DzBzbjTJcYL0swDtFs2krRNu+g1Eokm2tBU4dEuD0Wk="
export UID2_E2E_API_KEY_OLD="UID2-C-L-1000-qxpBsF.ibeCDBpD2bq4Zm7inDacGioUk1aaLeNJrabow="
export UID2_E2E_API_SECRET_OLD="VT7+t0G/RVueMuVZAL56I2c3JJFSYQfhbu8yo0V/Tds="
export UID2_E2E_IDENTITY_SCOPE=${{ inputs.uid2_e2e_identity_scope }}
export UID2_E2E_PHONE_SUPPORT=${{ inputs.uid2_e2e_phone_support }}
export UID2_E2E_PIPELINE_OPERATOR_TYPE=${{ inputs.uid2_e2e_pipeline_operator_type }}
export UID2_E2E_PIPELINE_OPERATOR_URL=${{ inputs.uid2_e2e_pipeline_operator_url }}
export UID2_E2E_PIPELINE_OPERATOR_CLOUD_PROVIDER=${{ inputs.uid2_e2e_pipeline_operator_cloud_provider }}
if [ "$UID2_E2E_PIPELINE_OPERATOR_TYPE" != "PUBLIC" ] && [ "$UID2_E2E_PIPELINE_OPERATOR_TYPE" != "PRIVATE" ] ; then
echo "ERROR: Incorrect operator type: $UID2_E2E_PIPELINE_OPERATOR_TYPE"
elif [ "$UID2_E2E_PIPELINE_OPERATOR_TYPE" = "PUBLIC" ] ; then
mvn test -Dtest="E2EPublicOperatorTestSuite"
else
mvn test -Dtest="E2EPrivateOperatorTestSuite"
fi
docker pull ghcr.io/iabtechlab/uid2-e2e:${{ inputs.e2e_image_version }}
docker images
echo $UID2_E2E_PIPELINE_OPERATOR_TYPE
docker run \
--env UID2_E2E_ENV='github-test-pipeline' \
--env UID2_E2E_API_KEY='UID2-C-L-999-fCXrMM.fsR3mDqAXELtWWMS+xG1s7RdgRTMqdOH2qaAo=' \
--env UID2_E2E_API_KEY_OLD='UID2-C-L-1000-qxpBsF.ibeCDBpD2bq4Zm7inDacGioUk1aaLeNJrabow=' \
--env UID2_E2E_API_SECRET='DzBzbjTJcYL0swDtFs2krRNu+g1Eokm2tBU4dEuD0Wk=' \
--env UID2_E2E_API_SECRET_OLD='VT7+t0G/RVueMuVZAL56I2c3JJFSYQfhbu8yo0V/Tds=' \
--env UID2_E2E_IDENTITY_SCOPE='${{ inputs.uid2_e2e_identity_scope }}' \
--env UID2_E2E_PHONE_SUPPORT='${{ inputs.uid2_e2e_phone_support }}' \
--env UID2_E2E_PIPELINE_OPERATOR_CLOUD_PROVIDER='${{ inputs.uid2_e2e_operator_cloud_provider }}' \
--env UID2_E2E_PIPELINE_OPERATOR_TYPE='${{ inputs.uid2_e2e_pipeline_operator_type }}' \
--env UID2_E2E_PIPELINE_OPERATOR_URL='${{ inputs.uid2_e2e_operator_url }}' \
--env UID2_E2E_SITE_ID='999' \
--network e2e_default \
ghcr.io/iabtechlab/uid2-e2e:${{ inputs.e2e_image_version }}

0 comments on commit d09490b

Please sign in to comment.