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

get_release returns "NA" instead of the current release #236

Open
sampaccoud opened this issue Jan 6, 2022 · 0 comments
Open

get_release returns "NA" instead of the current release #236

sampaccoud opened this issue Jan 6, 2022 · 0 comments
Labels

Comments

@sampaccoud
Copy link
Contributor

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_release function, look for the file at "/app/sandbox/version.json" directory
@sampaccoud sampaccoud added the bug label Jan 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant