pygeoapi icon indicating copy to clipboard operation
pygeoapi copied to clipboard

GitHub Workflow for Docker build/push enhancements

Open justb4 opened this issue 2 years ago • 4 comments

Is your feature request related to a problem? Please describe. This concerns the GH Workflow containers.yml. Via #989 and PR #997 the Docker Build/Push is working but there are some 'dangling issues', at least two:

  • the Unit Tests running using the Docker Image are commented out (also concerns/revives old/closed issues #148 and #848)
  • looks like the Image is built twice (?), it is already a very heavy/long build

Describe the solution you'd like

  • run the Unit Tests in Docker like docker run --entrypoint "/entrypoint.sh" --rm geopython/pygeoapi:tag test
  • If outcome of the tests is negative: Fail the Workflow, do not publish the Image (now it will chug along)
  • See if Docker Image can be built only once (if really built twice)

Describe alternatives you've considered SOme projects see to use a GH Workflow Cron to test/analyze code Docker Images, but that would defeat Images already rolled out...

Additional context N.A.

justb4 avatar Sep 29 '22 11:09 justb4

containers.yml won't run until the build stage (main.yml) is complete and the testing therefore passed (https://github.com/geopython/pygeoapi/blob/master/.github/workflows/containers.yml#L11)

So we could potentially remove the testing of the built containers although I can understand why might want to include as a double check...

KoalaGeo avatar Sep 29 '22 14:09 KoalaGeo

Yes, please also use the tests within the Container. The execution/version context is usually different from other execution contexts like local venvs and even the GH Workflow, this based on e.g. Ubuntu versions, non-pinned PyPi packages etc. Even timezones may matter. Plus the context within the container is more complete, e.g. it has GDAL, while this is not (yet) in the Build workflow (commented out). Though we should have reproducible builds, in practice this is very hard.

justb4 avatar Sep 29 '22 16:09 justb4

Is similar to #344 and now worked on in #1105 so I propose to close here as duplicate.

justb4 avatar Jan 18 '23 21:01 justb4

As per RFC4, this Issue has been inactive for 90 days. In order to manage maintenance burden, it will be automatically closed in 7 days.

github-actions[bot] avatar Mar 10 '24 21:03 github-actions[bot]

As per RFC4, this Issue has been closed due to there being no activity for more than 90 days.

github-actions[bot] avatar Mar 31 '24 03:03 github-actions[bot]