Skip to content

Commit

Permalink
revert temporary dockerfile changes for testing release
Browse files Browse the repository at this point in the history
  • Loading branch information
gsnider2195 committed Sep 29, 2023
1 parent dfb40e8 commit 23ddc4d
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions development/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,27 +55,24 @@ COPY . /source
# Get container's installed Nautobot version as a forced constraint
# NAUTOBOT_VER may be a branch name and not a published release therefor we need to get the installed version
# so pip can use it to recognize local constraints.
# RUN pip show nautobot | grep "^Version: " | sed -e 's/Version: /nautobot==/' > constraints.txt
RUN pip show nautobot | grep "^Version: " | sed -e 's/Version: /nautobot==/' > constraints.txt

# Use Poetry to grab dev dependencies from the lock file
# Can be improved in Poetry 1.2 which allows `poetry install --only dev`
#
# We can't use the entire freeze as it takes forever to resolve with rigidly fixed non-direct dependencies,
# especially those that are only direct to Nautobot but the container included versions slightly mismatch
# RUN poetry export -f requirements.txt --without-hashes --output poetry_freeze_base.txt
# RUN poetry export -f requirements.txt --with dev --without-hashes --output poetry_freeze_all.txt
# RUN sort poetry_freeze_base.txt poetry_freeze_all.txt | uniq -u > poetry_freeze_dev.txt
RUN poetry export -f requirements.txt --without-hashes --output poetry_freeze_base.txt
RUN poetry export -f requirements.txt --with dev --without-hashes --output poetry_freeze_all.txt
RUN sort poetry_freeze_base.txt poetry_freeze_all.txt | uniq -u > poetry_freeze_dev.txt

# Install all local project as editable, constrained on Nautobot version, to get any additional
# direct dependencies of the app
# RUN pip install -c constraints.txt -e .
RUN pip install -c constraints.txt -e .

# Install any dev dependencies frozen from Poetry
# Can be improved in Poetry 1.2 which allows `poetry install --only dev`
# RUN pip install -c constraints.txt -r poetry_freeze_dev.txt

# This needs to be reverted once we release
RUN poetry install
RUN pip install -c constraints.txt -r poetry_freeze_dev.txt

COPY development/nautobot_config.py ${NAUTOBOT_ROOT}/nautobot_config.py
# !!! USE CAUTION WHEN MODIFYING LINES ABOVE
Expand Down

0 comments on commit 23ddc4d

Please sign in to comment.