Skip to content

Commit

Permalink
Merge pull request #366 from Agoric/rs-passing-a-custom-image-for-agd
Browse files Browse the repository at this point in the history
ci: image parameterization via env variables
  • Loading branch information
rabi-siddique authored Sep 16, 2024
2 parents 4de72f7 + 2984151 commit 429eeae
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/liquidation-reconstitution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ on:
required: false
default: latest
type: string
a3p_image_tag:
description: 'Docker image tag for the a3p chain to use in testing'
docker_image:
description: 'Docker image for the a3p chain to use in testing'
required: false
type: string
pull_request:
Expand Down Expand Up @@ -76,6 +76,6 @@ jobs:
bidder_mnemonic: ${{ inputs.bidder_mnemonic }}
bidder_address: ${{ inputs.bidder_address }}
base_image: ${{ inputs.base_image || 'latest' }}
a3p_image_tag: ${{ inputs.a3p_image_tag || 'latest' }}
docker_image: ${{ inputs.docker_image || 'ghcr.io/agoric/agoric-3-proposals:latest' }}

secrets: inherit
6 changes: 3 additions & 3 deletions .github/workflows/liquidation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ on:
required: false
default: latest
type: string
a3p_image_tag:
description: 'Docker image tag for the a3p chain to use in testing'
docker_image:
description: 'Docker image for the a3p chain to use in testing'
required: false
type: string
pull_request:
Expand Down Expand Up @@ -76,6 +76,6 @@ jobs:
bidder_mnemonic: ${{ inputs.bidder_mnemonic }}
bidder_address: ${{ inputs.bidder_address }}
base_image: ${{ inputs.base_image || 'latest' }}
a3p_image_tag: ${{ inputs.a3p_image_tag || 'latest' }}
docker_image: ${{ inputs.docker_image || 'ghcr.io/agoric/agoric-3-proposals:latest' }}

secrets: inherit
15 changes: 12 additions & 3 deletions .github/workflows/reusable-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ on:
required: false
default: latest
type: string
a3p_image_tag:
description: 'Docker image tag for the a3p chain to use in testing'
docker_image:
description: 'Docker image for the a3p chain to use in testing'
required: false
type: string

Expand All @@ -59,14 +59,23 @@ jobs:
project_id: 'simulationlab'
workload_identity_provider: 'projects/60745596728/locations/global/workloadIdentityPools/github/providers/dapp-inter'

- name: Docker Image Used For E2E Testing
run: |
if [ -z "${{ inputs.docker_image }}" ]; then
echo "Error: Docker image not provided."
exit 1
else
echo "Docker Image: ${{ inputs.docker_image }}"
fi
- name: Run e2e tests
run: ${{ inputs.docker_compose_command }}
env:
# conditionals based on github event
SYNPRESS_PROFILE: ${{ inputs.AGORIC_NET == 'local' && 'synpress' || 'daily-tests' }}
CYPRESS_AGORIC_NET: ${{ inputs.AGORIC_NET }}
# for docker-compose.yml
A3P_IMAGE_TAG: ${{ inputs.a3p_image_tag }}
DOCKER_IMAGE: ${{ inputs.docker_image }}
COMPOSE_DOCKER_CLI_BUILD: 1
DOCKER_BUILDKIT: 1
DOCKER_DEFAULT_PLATFORM: linux/amd64
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/vaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ on:
description: 'The mnemonic phrase for the account to use in testing'
required: false
type: string
a3p_image_tag:
description: 'Docker image tag for the a3p chain to use in testing'
docker_image:
description: 'Docker image for the a3p chain to use in testing'
required: false
type: string

Expand All @@ -57,6 +57,6 @@ jobs:
|| 'local'
}}
mnemonic_phrase: ${{ inputs.phrase }}
a3p_image_tag: ${{ inputs.a3p_image_tag || 'latest' }}
docker_image: ${{ inputs.docker_image || 'ghcr.io/agoric/agoric-3-proposals:latest' }}

secrets: inherit
2 changes: 1 addition & 1 deletion test/e2e/docker-compose-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ services:
profiles:
- synpress
container_name: agoric_chain
image: ghcr.io/agoric/agoric-3-proposals:${A3P_IMAGE_TAG}
image: ${DOCKER_IMAGE}
logging:
driver: none
platform: linux/amd64
Expand Down

0 comments on commit 429eeae

Please sign in to comment.