-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
Bug Report
Expected behavior/code
The get_release function should return the current release in a Docker image built by the CI.
Actual Behavior
The get_release function returns "NA" instead of the actual release number.
Steps to Reproduce
$ docker run -it --rm -e DJANGO_AWS_ACCESS_KEY_ID=dummy -e DJANGO_AWS_SECRET_ACCESS_KEY=dummy -e DJANGO_SECRET_KEY=dummy fundocker/ashley:1.1.1 python manage.py shell
>>> from settings import get_release, BASE_DIR
>>> get_release()
'NA'
>>> BASE_DIR
'/app'Environment
- Ashley version: 1.1.1
- Platform: Docker
Possible Solution
The method returns "NA" because the file is not found in /app/version.json.
Indeed, it was copied to /app/sandbox/version.json when building the image: https://github.com/openfun/ashley/blob/master/.circleci/config.yml#L13.
I see 2 possible solutions:
- remove the "sandbox" directory and copy the app code to
/app - in the
get_releasefunction, look for the file at "/app/sandbox/version.json" directory
Reactions are currently unavailable