Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: image parameterization via env variables #366

Merged
merged 2 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading