Update README.md (#1)
* Update README.md * We don't want to use the netbox-community pull-request template * Update container building workflow * Only build amd64 images * Add our 'oxcert' branch as equivalent to upstream's 'release' branch * Tag the version of the container as OxCERT's modification This is just for the netbox container: the underlying netbox version will come from upstream * Build own own images and push to ghcr.io * Only build amd64 images * Only push images to GitHub Container Registry for the OxCERT organization * Refer to our private copy in the GitHub Container Registry ghcr.io * Use ghcr.io/oxcert/netbox for all netbox images Build and push to this repo. Read from it with docker-compose * Make releases relative to the 'oxcert' branch rather than upstream's 'release' branch. This is a different workflow than used in any of our other repos, where PRs, changes, etc. are first merged into a 'develop' branch, and the release process is to merge accumulated changes into the main 'oxcert' branch. Tag names for releases should follow whatever upstream is using with "-oxcert" appended. * Re-add the pull-request template But in a very cut-down form. We don't have an issue tracker on this repo, and we assume the intentions and motivations for any PR will have been discussed within the team already. We do, however, want all PRs to be against the 'develop' branch, in parallel to upstream's workflow. * On second thoughts, set container version to 1.0.0 This is OxCERT's version 1.0.0 of the containerized Netbox image which is basically the same as the 2.7.0 netbox-community equivalent. * Fix typo from upstream Function should have been called `git_rebase()` rather than duplicating the name of `git_merge()`
This commit is contained in:
parent
b47e85ab3f
commit
f24bc0a9e0
63
.github/pull_request_template.md
vendored
63
.github/pull_request_template.md
vendored
@ -12,68 +12,6 @@ on all relevant titles.
|
|||||||
#########################################################################
|
#########################################################################
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!--
|
|
||||||
Please don't open an extra issue when submitting a PR.
|
|
||||||
|
|
||||||
But if there is already a related issue, please put it's number here.
|
|
||||||
|
|
||||||
E.g. #123 or N/A
|
|
||||||
-->
|
|
||||||
|
|
||||||
Related Issue:
|
|
||||||
|
|
||||||
## New Behavior
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Please describe in a few words the intentions of your PR.
|
|
||||||
-->
|
|
||||||
|
|
||||||
...
|
|
||||||
|
|
||||||
## Contrast to Current Behavior
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Please describe in a few words how the new behavior is different
|
|
||||||
from the current behavior.
|
|
||||||
-->
|
|
||||||
|
|
||||||
...
|
|
||||||
|
|
||||||
## Discussion: Benefits and Drawbacks
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Please make your case here:
|
|
||||||
|
|
||||||
- Why do you think this project and the community will benefit from your
|
|
||||||
proposed change?
|
|
||||||
- What are the drawbacks of this change?
|
|
||||||
- Is it backwards-compatible?
|
|
||||||
- Anything else that you think is relevant to the discussion of this PR.
|
|
||||||
|
|
||||||
(No need to write a huge article here. Just a few sentences that give some
|
|
||||||
additional context about the motivations for the change.)
|
|
||||||
-->
|
|
||||||
|
|
||||||
...
|
|
||||||
|
|
||||||
## Changes to the Wiki
|
|
||||||
|
|
||||||
<!--
|
|
||||||
If the README.md must be updated, please include the changes in the PR.
|
|
||||||
If the Wiki must be updated, please make a suggestion below.
|
|
||||||
-->
|
|
||||||
|
|
||||||
...
|
|
||||||
|
|
||||||
## Proposed Release Note Entry
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Please provide a short summary of your PR that we can copy & paste
|
|
||||||
into the release notes.
|
|
||||||
-->
|
|
||||||
|
|
||||||
...
|
|
||||||
|
|
||||||
## Double Check
|
## Double Check
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
@ -81,5 +19,4 @@ Please put an x into the brackets (like `[x]`) if you've completed that task.
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
* [ ] I have read the comments and followed the PR template.
|
* [ ] I have read the comments and followed the PR template.
|
||||||
* [ ] I have explained my PR according to the information in the comments.
|
|
||||||
* [ ] My PR targets the `develop` branch.
|
* [ ] My PR targets the `develop` branch.
|
||||||
|
5
.github/workflows/push.yml
vendored
5
.github/workflows/push.yml
vendored
@ -5,9 +5,11 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches-ignore:
|
branches-ignore:
|
||||||
- release
|
- release
|
||||||
|
- oxcert
|
||||||
pull_request:
|
pull_request:
|
||||||
branches-ignore:
|
branches-ignore:
|
||||||
- release
|
- release
|
||||||
|
- oxcert
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
@ -51,12 +53,11 @@ jobs:
|
|||||||
- ./build.sh develop
|
- ./build.sh develop
|
||||||
platform:
|
platform:
|
||||||
- linux/amd64
|
- linux/amd64
|
||||||
- linux/arm64
|
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
env:
|
env:
|
||||||
GH_ACTION: enable
|
GH_ACTION: enable
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
IMAGE_NAMES: docker.io/netboxcommunity/netbox
|
IMAGE_NAMES: ghcr.io/oxcert/netbox
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Builds new NetBox Docker Images
|
name: Builds new NetBox Docker Images
|
||||||
steps:
|
steps:
|
||||||
|
22
.github/workflows/release.yml
vendored
22
.github/workflows/release.yml
vendored
@ -19,14 +19,14 @@ jobs:
|
|||||||
- ./build.sh feature
|
- ./build.sh feature
|
||||||
- ./build.sh develop
|
- ./build.sh develop
|
||||||
platform:
|
platform:
|
||||||
- linux/amd64,linux/arm64
|
- linux/amd64
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Builds new NetBox Docker Images
|
name: Builds new NetBox Docker Images
|
||||||
env:
|
env:
|
||||||
GH_ACTION: enable
|
GH_ACTION: enable
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
IMAGE_NAMES: docker.io/netboxcommunity/netbox quay.io/netboxcommunity/netbox ghcr.io/netbox-community/netbox
|
IMAGE_NAMES: ghcr.io/oxcert/netbox
|
||||||
steps:
|
steps:
|
||||||
- id: source-checkout
|
- id: source-checkout
|
||||||
name: Checkout
|
name: Checkout
|
||||||
@ -48,24 +48,6 @@ jobs:
|
|||||||
name: Test the image
|
name: Test the image
|
||||||
run: IMAGE="${FINAL_DOCKER_TAG}" ./test.sh
|
run: IMAGE="${FINAL_DOCKER_TAG}" ./test.sh
|
||||||
if: steps.docker-build.outputs.skipped != 'true'
|
if: steps.docker-build.outputs.skipped != 'true'
|
||||||
# docker.io
|
|
||||||
- id: docker-io-login
|
|
||||||
name: Login to docker.io
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
|
||||||
registry: docker.io
|
|
||||||
username: ${{ secrets.dockerhub_username }}
|
|
||||||
password: ${{ secrets.dockerhub_password }}
|
|
||||||
if: steps.docker-build.outputs.skipped != 'true'
|
|
||||||
# quay.io
|
|
||||||
- id: quay-io-login
|
|
||||||
name: Login to Quay.io
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
|
||||||
registry: quay.io
|
|
||||||
username: ${{ secrets.quayio_username }}
|
|
||||||
password: ${{ secrets.quayio_password }}
|
|
||||||
if: steps.docker-build.outputs.skipped != 'true'
|
|
||||||
# ghcr.io
|
# ghcr.io
|
||||||
- id: ghcr-io-login
|
- id: ghcr-io-login
|
||||||
name: Login to GitHub Container Registry
|
name: Login to GitHub Container Registry
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
# netbox-docker
|
# netbox-docker
|
||||||
|
|
||||||
|
This is OxCERT's fork of the [netbox-docker](https://github.com/netbox-community/netbox-docker/wiki) repository.
|
||||||
|
|
||||||
|
We have a local branch [oxcert](https://github.com/oxcert/netbox-docker/tree/oxcert) which has been set as the default branch in this repository.
|
||||||
|
The idea is to keep the [release](https://github.com/oxcert/netbox-docker/tree/release) branch in synch with upstream but keep all our changes in
|
||||||
|
the oxcert branch, from where we build our netbox containers, etc. When there are upstream changes, we merge them in from the release branch.
|
||||||
|
|
||||||
[][github-release]
|
[][github-release]
|
||||||
[][github-stargazers]
|
[][github-stargazers]
|
||||||

|

|
||||||
|
4
build.sh
4
build.sh
@ -45,7 +45,7 @@ TAG The version part of the image tag.
|
|||||||
|
|
||||||
IMAGE_NAMES The names used for the image including the registry
|
IMAGE_NAMES The names used for the image including the registry
|
||||||
Used for tagging the image.
|
Used for tagging the image.
|
||||||
${_GREEN}Default:${_CLEAR} docker.io/netboxcommunity/netbox
|
${_GREEN}Default:${_CLEAR} ghcr.io/oxcert/netbox
|
||||||
${_CYAN}Example:${_CLEAR} 'docker.io/netboxcommunity/netbox quay.io/netboxcommunity/netbox'
|
${_CYAN}Example:${_CLEAR} 'docker.io/netboxcommunity/netbox quay.io/netboxcommunity/netbox'
|
||||||
|
|
||||||
DOCKER_TAG The name of the tag which is applied to the image.
|
DOCKER_TAG The name of the tag which is applied to the image.
|
||||||
@ -143,7 +143,7 @@ source ./build-functions/check-commands.sh
|
|||||||
source ./build-functions/get-public-image-config.sh
|
source ./build-functions/get-public-image-config.sh
|
||||||
source ./build-functions/gh-functions.sh
|
source ./build-functions/gh-functions.sh
|
||||||
|
|
||||||
IMAGE_NAMES="${IMAGE_NAMES-docker.io/netboxcommunity/netbox}"
|
IMAGE_NAMES="${IMAGE_NAMES-ghcr.io/oxcert/netbox}"
|
||||||
IFS=' ' read -ra IMAGE_NAMES <<<"${IMAGE_NAMES}"
|
IFS=' ' read -ra IMAGE_NAMES <<<"${IMAGE_NAMES}"
|
||||||
|
|
||||||
###
|
###
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
version: '3.4'
|
version: '3.4'
|
||||||
services:
|
services:
|
||||||
netbox: &netbox
|
netbox: &netbox
|
||||||
image: docker.io/netboxcommunity/netbox:${VERSION-v3.6-2.7.0}
|
image: ghcr.io/oxcert/netbox:${VERSION-v3.6-1.0.0}
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
- redis
|
- redis
|
||||||
|
14
release.sh
14
release.sh
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
DEFAULT_REPO=netbox-community/netbox-docker
|
DEFAULT_REPO=oxcert/netbox-docker
|
||||||
REPO="${REPO-${DEFAULT_REPO}}"
|
REPO="${REPO-${DEFAULT_REPO}}"
|
||||||
|
|
||||||
echomoji() {
|
echomoji() {
|
||||||
@ -105,9 +105,9 @@ check_develop() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
check_release() {
|
check_release() {
|
||||||
echomoji 📋 "?" "Checking 'release' branch"
|
echomoji 📋 "?" "Checking 'oxcert' branch"
|
||||||
|
|
||||||
check_upstream release
|
check_upstream oxcert
|
||||||
check_clean_repo
|
check_clean_repo
|
||||||
check_latest
|
check_latest
|
||||||
}
|
}
|
||||||
@ -150,7 +150,7 @@ git_merge() {
|
|||||||
echo_ok "The branch '${2}' was merged."
|
echo_ok "The branch '${2}' was merged."
|
||||||
}
|
}
|
||||||
|
|
||||||
git_merge() {
|
git_rebase() {
|
||||||
echomoji ⏩ "»" "Rebasing onto '${1}'…"
|
echomoji ⏩ "»" "Rebasing onto '${1}'…"
|
||||||
if ! git rebase "${1}"; then
|
if ! git rebase "${1}"; then
|
||||||
echo_nok "Could not rebase onto '${1}'."
|
echo_nok "Could not rebase onto '${1}'."
|
||||||
@ -170,7 +170,7 @@ check_origin
|
|||||||
check_develop
|
check_develop
|
||||||
check_tag
|
check_tag
|
||||||
|
|
||||||
git_switch release
|
git_switch oxcert
|
||||||
check_release
|
check_release
|
||||||
|
|
||||||
echomoji 📋 "▶︎" "Releasing '$(<VERSION)'"
|
echomoji 📋 "▶︎" "Releasing '$(<VERSION)'"
|
||||||
@ -179,10 +179,10 @@ git_merge develop
|
|||||||
check_tag
|
check_tag
|
||||||
git_tag "$(<VERSION)"
|
git_tag "$(<VERSION)"
|
||||||
|
|
||||||
git_push "origin" release
|
git_push "origin" oxcert
|
||||||
git_push "origin" "$(<VERSION)"
|
git_push "origin" "$(<VERSION)"
|
||||||
|
|
||||||
git_switch develop
|
git_switch develop
|
||||||
git_rebase release
|
git_rebase oxcert
|
||||||
|
|
||||||
echomoji ✅ "◼︎" "The release of '$(<VERSION)' is complete."
|
echomoji ✅ "◼︎" "The release of '$(<VERSION)' is complete."
|
||||||
|
Reference in New Issue
Block a user