Skip to content

Commit

Permalink
Merge branch 'develop' into oxcert
Browse files Browse the repository at this point in the history
  • Loading branch information
infracaninophile committed Jun 21, 2024
2 parents 5df7c73 + c0b4737 commit 7258e93
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 17 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
VALIDATE_DOCKERFILE: false
VALIDATE_GITLEAKS: false
VALIDATE_JSCPD: false
FILTER_REGEX_EXCLUDE: (.*/)?(LICENSE|configuration/.*)
FILTER_REGEX_EXCLUDE: (.*/)?(LICENSE|configuration/.*|plugins-oxcert.py)
EDITORCONFIG_FILE_NAME: .ecrc
DOCKERFILE_HADOLINT_FILE_NAME: .hadolint.yaml
MARKDOWN_CONFIG_FILE: .markdown-lint.yml
Expand All @@ -54,11 +54,15 @@ jobs:
matrix:
build_cmd:
- ./build-latest.sh
#- PRERELEASE=true ./build-latest.sh
- ./build.sh develop
platform:
- linux/amd64
- linux/arm64

# This workflow runs tests only, and doesn't push to the
# container repository. Since building on arm64 under QEMU
# is impossibly slow, and we don't have a native arm64
# option right now, just run the testing on amd64.
#- linux/arm64
os:
- ubuntu-latest
fail-fast: false
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:
matrix:
build_cmd:
- ./build-latest.sh
#- PRERELEASE=true ./build-latest.sh
- ./build.sh develop
platform:
- linux/amd64,linux/arm64
Expand Down
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG FROM
FROM ${FROM} as builder
FROM ${FROM} AS builder

RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update -qq \
Expand Down Expand Up @@ -47,7 +47,7 @@ RUN \
###

ARG FROM
FROM ${FROM} as main
FROM ${FROM} AS main

RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update -qq \
Expand Down Expand Up @@ -82,7 +82,7 @@ COPY --from=builder /opt/netbox/venv /opt/netbox/venv
ARG NETBOX_PATH
COPY ${NETBOX_PATH} /opt/netbox
# Copy the modified 'requirements*.txt' files, to have the files actually used during installation
COPY --from=builder /requirements.txt /requirements-container.txt /opt/netbox/
COPY --from=builder /requirements.txt /requirements-container.txt /requirements-plugins.txt /opt/netbox/

COPY docker/configuration.docker.py /opt/netbox/netbox/netbox/configuration.py
COPY docker/ldap_config.docker.py /opt/netbox/netbox/netbox/ldap_config.py
Expand All @@ -92,6 +92,9 @@ COPY docker/launch-netbox.sh /opt/netbox/launch-netbox.sh
COPY configuration/ /etc/netbox/config/
COPY docker/nginx-unit.json /etc/unit/

# Enabling the netbox-dns-plugin breaks unit testing.
# COPY plugins-oxcert.py /etc/netbox/config/plugins.py

WORKDIR /opt/netbox/netbox

# Must set permissions for '/opt/netbox/netbox/media' directory
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.4
1.2.5
2 changes: 1 addition & 1 deletion configuration/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# To learn how to build images with your required plugins
# See https://github.com/netbox-community/netbox-docker/wiki/Using-Netbox-Plugins

#PLUGINS = ["netbox_dns"]
# PLUGINS = ["netbox_bgp"]

# PLUGINS_CONFIG = {
# "netbox_bgp": {
Expand Down
15 changes: 15 additions & 0 deletions plugins-oxcert.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Add your plugins and plugin settings here.
# Of course uncomment this file out.

# To learn how to build images with your required plugins
# See https://github.com/netbox-community/netbox-docker/wiki/Using-Netbox-Plugins

PLUGINS = [
"netbox_dns",
]

# PLUGINS_CONFIG = {
# "netbox_bgp": {
# ADD YOUR SETTINGS HERE
# }
# }
16 changes: 8 additions & 8 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
# ./test.sh latest
# ./test.sh v2.9.7
# ./test.sh develop-2.10
# IMAGE='netboxcommunity/netbox:latest' ./test.sh
# IMAGE='netboxcommunity/netbox:v2.9.7' ./test.sh
# IMAGE='netboxcommunity/netbox:develop-2.10' ./test.sh
# export IMAGE='netboxcommunity/netbox:latest'; ./test.sh
# export IMAGE='netboxcommunity/netbox:v2.9.7'; ./test.sh
# export IMAGE='netboxcommunity/netbox:develop-2.10'; ./test.sh
# IMAGE='ghcr.io/oxcert/netbox:latest' ./test.sh
# IMAGE='ghcr.io/oxcert/netbox:v2.9.7' ./test.sh
# IMAGE='ghcr.io/oxcert/netbox:develop-2.10' ./test.sh
# export IMAGE='ghcr.io/oxcert/netbox:latest'; ./test.sh
# export IMAGE='ghcr.io/oxcert/netbox:v2.9.7'; ./test.sh
# export IMAGE='ghcr.io/oxcert/netbox:develop-2.10'; ./test.sh

# exit when a command exits with an exit code != 0
set -e
Expand All @@ -20,9 +20,9 @@ source ./build-functions/gh-functions.sh
# of the Docker Image that is to be used
if [ "${1}x" != "x" ]; then
# Use the command line argument
export IMAGE="netboxcommunity/netbox:${1}"
export IMAGE="ghcr.io/oxcert/netbox:${1}"
else
export IMAGE="${IMAGE-netboxcommunity/netbox:latest}"
export IMAGE="${IMAGE-ghcr.io/oxcert/netbox:latest}"
fi

# Ensure that an IMAGE is defined
Expand Down

0 comments on commit 7258e93

Please sign in to comment.