-
Notifications
You must be signed in to change notification settings - Fork 6
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
Enable Upstream Testing #185
Open
bryanculver
wants to merge
10
commits into
develop
Choose a base branch
from
bsc-2023-upstream-testing
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,873
−1,657
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
03ea44f
Updates
bryanculver ecb3bf6
Proto update, blocking migration
bryanculver 281fd25
Fix migrations issue with 'branch' column (#187)
PavelSafronov 7a93f8b
Updates to baseline
bryanculver ce27367
Nudge some dependencies around
bryanculver fa29c7d
Move nosec bandit line
bryanculver 980891e
Merge remote-tracking branch 'origin/upgrade-to-nautobot-1.5' into bs…
bryanculver cb65528
Newer Dolt
bryanculver 322cb89
Black and flake8
bryanculver cc6758a
1.5 everywhere
bryanculver File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
name: "Nautobot Upstream Testing" | ||
|
||
on: # yamllint disable-line rule:truthy rule:comments | ||
schedule: | ||
- cron: "0 4 */2 * *" # every other day at midnight | ||
push: # yamllint disable rule:empty-values | ||
# TODO: REMOVE PUSH LINE ABOVE | ||
|
||
jobs: | ||
upstream-test: | ||
uses: "nautobot/nautobot/.github/workflows/plugin_upstream_testing_base.yml@develop" | ||
with: # Below could potentially be collapsed into a single argument if a concrete relationship between both is enforced | ||
invoke_context_name: "NAUTOBOT_VERSION_CONTROL" | ||
plugin_name: "nautobot-dolt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,78 @@ | ||
# ------------------------------------------------------------------------------------- | ||
# Nautobot App Developement Dockerfile Template | ||
# Version: 1.1.0 | ||
# | ||
# Apps that need to add additional steps or packages can do in the section below. | ||
# ------------------------------------------------------------------------------------- | ||
# !!! USE CAUTION WHEN MODIFYING LINES BELOW | ||
|
||
ARG PYTHON_VER | ||
ARG NAUTOBOT_VER | ||
# Accepts a desired Nautobot version as build argument, default to 1.5 | ||
ARG NAUTOBOT_VER="1.5" | ||
|
||
# Accepts a desired Python version as build argument, default to 3.8 | ||
ARG PYTHON_VER="3.8" | ||
|
||
# Retrieve published development image of Nautobot base which should include most CI dependencies | ||
FROM ghcr.io/nautobot/nautobot-dev:${NAUTOBOT_VER}-py${PYTHON_VER} | ||
|
||
WORKDIR /source | ||
# Runtime argument and environment setup | ||
ARG NAUTOBOT_ROOT=/opt/nautobot | ||
|
||
ENV prometheus_multiproc_dir=/prom_cache | ||
ENV NAUTOBOT_ROOT ${NAUTOBOT_ROOT} | ||
|
||
# Install Poetry manually via its installer script; | ||
# We might be using an older version of Nautobot that includes an older version of Poetry | ||
# and CI and local development may have a newer version of Poetry | ||
# Since this is only used for development and we don't ship this container, pinning Poetry back is not expressly necessary | ||
# We also don't need virtual environments in container | ||
RUN curl -sSL https://install.python-poetry.org | python3 - && \ | ||
poetry config virtualenvs.create false | ||
|
||
# !!! USE CAUTION WHEN MODIFYING LINES ABOVE | ||
# ------------------------------------------------------------------------------------- | ||
# App-specifc system build/test dependencies. | ||
# | ||
# Example: LDAP requires `libldap2-dev` to be apt-installed before the Python package. | ||
# ------------------------------------------------------------------------------------- | ||
# --> Start safe to modify section | ||
|
||
RUN pip install --upgrade pip | ||
# Uncomment the lines below if you are apt-installing any package. | ||
# RUN apt-get -y update && apt-get -y install \ | ||
# libldap2-dev \ | ||
# && rm -rf /var/lib/apt/lists/* | ||
|
||
# Copy in only pyproject.toml/poetry.lock to help with caching this layer if no updates to dependencies | ||
COPY poetry.lock pyproject.toml /source/ | ||
# --no-root declares not to install the project package since we're wanting to take advantage of caching dependency installation | ||
# and the project is copied in and installed after this step | ||
RUN poetry install --no-interaction --no-ansi --no-root | ||
# --> Stop safe to modify section | ||
# ------------------------------------------------------------------------------------- | ||
# Install Nautobot App | ||
# ------------------------------------------------------------------------------------- | ||
# !!! USE CAUTION WHEN MODIFYING LINES BELOW | ||
|
||
# Copy in the rest of the source code and install local Nautobot plugin | ||
# Copy in the source code | ||
WORKDIR /source | ||
COPY . /source | ||
RUN poetry install --no-interaction --no-ansi | ||
|
||
COPY development/nautobot_config.py /opt/nautobot/nautobot_config.py | ||
# 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 | ||
|
||
# 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 | ||
|
||
# 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 . | ||
|
||
# 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 | ||
|
||
COPY development/nautobot_config.py ${NAUTOBOT_ROOT}/nautobot_config.py | ||
# !!! USE CAUTION WHEN MODIFYING LINES ABOVE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove before merging.