[PR #471] [MERGED] travis: Automate docker builds #12061

Closed
opened 2025-12-29 22:19:25 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/471
Author: @joonas
Created: 8/16/2016
Status: Merged
Merged: 8/16/2016
Merged by: @zachmoody

Base: developHead: travis/automated-docker-builds


📝 Commits (2)

  • 5afb98f Added scripts/docker-build.sh for building docker images in CI
  • 4fc0fd9 Produce a docker image when there's a new tag

📊 Changes

2 files changed (+33 additions, -0 deletions)

View changed files

📝 .travis.yml (+12 -0)
scripts/docker-build.sh (+21 -0)

📄 Description

This adds automation for docker builds when a new tag is pushed up. Once a new tag is pushed up, docker build gets run with that tag used as the docker tag that then gets pushed up to docker hub.

This depends on 4 new environment variable to be set up in the settings:

  • DOCKER_REPOSITORY - digitalocean
  • DOCKER_IMAGE_NAME - netbox
  • DOCKER_USERNAME - we have a user set up for this (stored as a secure environment variable)
  • DOCKER_PASSWORD - password for the aforementioned user (stored as a secure environment variable)

cc @zachmoody @mdlayher


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/471 **Author:** [@joonas](https://github.com/joonas) **Created:** 8/16/2016 **Status:** ✅ Merged **Merged:** 8/16/2016 **Merged by:** [@zachmoody](https://github.com/zachmoody) **Base:** `develop` ← **Head:** `travis/automated-docker-builds` --- ### 📝 Commits (2) - [`5afb98f`](https://github.com/netbox-community/netbox/commit/5afb98ffa747fdd8431da4d7190815d39729d807) Added scripts/docker-build.sh for building docker images in CI - [`4fc0fd9`](https://github.com/netbox-community/netbox/commit/4fc0fd9a9a2175f0e6e8a71566b1c49b9733ae9e) Produce a docker image when there's a new tag ### 📊 Changes **2 files changed** (+33 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `.travis.yml` (+12 -0) ➕ `scripts/docker-build.sh` (+21 -0) </details> ### 📄 Description This adds automation for docker builds when a new tag is pushed up. Once a new tag is pushed up, docker build gets run with that tag used as the docker tag that then gets pushed up to [docker hub](https://hub.docker.com/r/digitalocean/netbox/). This depends on 4 new environment variable to be set up in the [settings](https://travis-ci.org/digitalocean/netbox/settings): - `DOCKER_REPOSITORY` - `digitalocean` - `DOCKER_IMAGE_NAME` - `netbox` - `DOCKER_USERNAME` - we have a user set up for this (stored as a secure environment variable) - `DOCKER_PASSWORD` - password for the aforementioned user (stored as a secure environment variable) cc @zachmoody @mdlayher --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 22:19:25 +01:00
adam closed this issue 2025-12-29 22:19:25 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12061