Skip to content

Commit

Permalink
BASE_IMAGE_TAG must always be supplied to dagger-pipeline.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeitsperre committed Aug 15, 2023
1 parent 09774b9 commit 929530b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/dagger-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ on:
BASE_IMAGE_TAG:
description: 'Image tag to use for the Docker image'
required: true
default: 'latest'
PAVICS_HOST:
description: 'Pavics URL to test against'
required: true
Expand All @@ -21,6 +20,8 @@ on:
required: true
default: 'https://github.com/Ouranosinc/PAVICS-e2e-workflow-tests/raw/master/notebooks/output-sanitize.cfg'

env:
BASE_IMAGE_TAG: 230601

jobs:
lint:
Expand Down Expand Up @@ -58,6 +59,10 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Set Environment Variables
if: ${{ github.event_name != 'workflow_dispatch' }}
run: |
echo "BASE_IMAGE_TAG=${{ env.BASE_IMAGE_TAG }}" >> $GITHUB_ENV
- name: Set Environment Variables (Workflow Dispatch)
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
echo "BASE_IMAGE_TAG=${{ github.event.inputs.image_tag }}" >> $GITHUB_ENV
Expand Down
5 changes: 4 additions & 1 deletion ci/dagger-pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
)


BASE_IMAGE_TAG = os.getenv("BASE_IMAGE_TAG", "latest")
BASE_IMAGE_TAG = os.getenv("BASE_IMAGE_TAG")
PAVICS_HOST = os.getenv("PAVICS_HOST", "https://pavics.ouranos.ca")
SANITIZE_FILE_URL = os.getenv(
"SANITIZE_FILE_URL",
Expand All @@ -30,6 +30,9 @@ async def main():
log_output=sys.stderr, workdir=Path(__file__).parent.parent.as_posix()
)
) as client:
if not BASE_IMAGE_TAG:
raise ValueError("BASE_IMAGE_TAG environment variable is not set.")

sources = await (
# pull container
client.container().from_(f"pavics/workflow-tests:{BASE_IMAGE_TAG}")
Expand Down

0 comments on commit 929530b

Please sign in to comment.