Skip to content

Commit

Permalink
Update README.md (#1)
Browse files Browse the repository at this point in the history
* 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()`
  • Loading branch information
infracaninophile authored Oct 13, 2023
1 parent b47e85a commit f24bc0a
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 96 deletions.
63 changes: 0 additions & 63 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,74 +12,11 @@ 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

<!--
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 explained my PR according to the information in the comments.
* [ ] My PR targets the `develop` branch.
5 changes: 3 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ on:
push:
branches-ignore:
- release
- oxcert
pull_request:
branches-ignore:
- release
- oxcert

jobs:
lint:
Expand Down Expand Up @@ -51,12 +53,11 @@ jobs:
- ./build.sh develop
platform:
- linux/amd64
- linux/arm64
fail-fast: false
env:
GH_ACTION: enable
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
IMAGE_NAMES: docker.io/netboxcommunity/netbox
IMAGE_NAMES: ghcr.io/oxcert/netbox
runs-on: ubuntu-latest
name: Builds new NetBox Docker Images
steps:
Expand Down
22 changes: 2 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ jobs:
- ./build.sh feature
- ./build.sh develop
platform:
- linux/amd64,linux/arm64
- linux/amd64
fail-fast: false
runs-on: ubuntu-latest
name: Builds new NetBox Docker Images
env:
GH_ACTION: enable
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:
- id: source-checkout
name: Checkout
Expand All @@ -48,24 +48,6 @@ jobs:
name: Test the image
run: IMAGE="${FINAL_DOCKER_TAG}" ./test.sh
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
- id: ghcr-io-login
name: Login to GitHub Container Registry
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# 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 (latest by date)](https://img.shields.io/github/v/release/netbox-community/netbox-docker)][github-release]
[![GitHub stars](https://img.shields.io/github/stars/netbox-community/netbox-docker)][github-stargazers]
![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed-raw/netbox-community/netbox-docker)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.0
1.0.0
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ TAG The version part of the image tag.
IMAGE_NAMES The names used for the image including the registry
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'
DOCKER_TAG The name of the tag which is applied to the image.
Expand Down Expand Up @@ -143,7 +143,7 @@ source ./build-functions/check-commands.sh
source ./build-functions/get-public-image-config.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}"

###
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3.4'
services:
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:
- postgres
- redis
Expand Down
14 changes: 7 additions & 7 deletions release.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

DEFAULT_REPO=netbox-community/netbox-docker
DEFAULT_REPO=oxcert/netbox-docker
REPO="${REPO-${DEFAULT_REPO}}"

echomoji() {
Expand Down Expand Up @@ -105,9 +105,9 @@ check_develop() {
}

check_release() {
echomoji 📋 "?" "Checking 'release' branch"
echomoji 📋 "?" "Checking 'oxcert' branch"

check_upstream release
check_upstream oxcert
check_clean_repo
check_latest
}
Expand Down Expand Up @@ -150,7 +150,7 @@ git_merge() {
echo_ok "The branch '${2}' was merged."
}

git_merge() {
git_rebase() {
echomoji ⏩ "»" "Rebasing onto '${1}'…"
if ! git rebase "${1}"; then
echo_nok "Could not rebase onto '${1}'."
Expand All @@ -170,7 +170,7 @@ check_origin
check_develop
check_tag

git_switch release
git_switch oxcert
check_release

echomoji 📋 "▶︎" "Releasing '$(<VERSION)'"
Expand All @@ -179,10 +179,10 @@ git_merge develop
check_tag
git_tag "$(<VERSION)"

git_push "origin" release
git_push "origin" oxcert
git_push "origin" "$(<VERSION)"

git_switch develop
git_rebase release
git_rebase oxcert

echomoji ✅ "◼︎" "The release of '$(<VERSION)' is complete."

0 comments on commit f24bc0a

Please sign in to comment.