Skip to content

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

@sampaccoud

Description

@sampaccoud

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions