Benbhoy1888 / SET08103

Coursework
Apache License 2.0
0 stars 0 forks source link

[BUG] Docker cp not working - requires FIX #41

Closed Andy-Dickinson closed 1 year ago

Andy-Dickinson commented 1 year ago

Describe the bug Docker copy doesn't currently work, potentially due to file structure change, reports are now stored in a report directory, and within that, each type of report is stored in its category directory (e.g. country reports path is ./reports/country_reports

To Reproduce Steps to reproduce the behaviour:

  1. Delete target directory
  2. Delete app image
  3. Delete reports directory (if exists)
  4. Build project
  5. Package with maven (skipping tests)
  6. Run Docker Compose
  7. Note no reports are generated
  8. Run App locally
  9. Note reports ARE generated

Expected behavior Reports directory should be created with generated reports when run through docker compose. I.e. the generated reports should be copied from the docker container into branch directory as it is when the app is run locally.

Andy-Dickinson commented 1 year ago

Going to start looking into this FYI

Andy-Dickinson commented 1 year ago

Tried for ages to fix this, but cannot understand why its not working.

docker cp softwareem-group-project-app-1:/tmp/reports/. ./reports The above line works fine locally (my local project is named softwareem-group-project) if running that command from a terminal window after the app container has been run.

However when changing setup for GitHub and using: docker cp set08103_app_1:/tmp/reports/. ./reports The workflow passes (so the path exists ok), but no reports directory is created (or copied out of the container)

See my past commits to see the other commands I have tried, but I feel like I have tried every combination of commands possible.

Requires further investigation as to why this is not working

Andy-Dickinson commented 1 year ago

We were missing the Deploy block:

Thats it sorted now and merged back into develop.

Note reports will only be copied from docker container when pushed to release branch. When this happens the reports will be output to the 'reports' branch.