Skip to content

Commit

Permalink
Dependabot: Move Dockerfiles into separate subdirs
Browse files Browse the repository at this point in the history
Instead of grouping all stable Dockerfiles together,
separate into subdirectories to provide Dependabot
an isolated view of the specific Docker image that
we wish for it to help maintain.

Update the Makefile to reflect the new paths.

refs GH-204
  • Loading branch information
atc0005 committed Jan 20, 2021
1 parent 3283c4b commit 5806afa
Show file tree
Hide file tree
Showing 7 changed files with 82 additions and 13 deletions.
74 changes: 73 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,79 @@ updates:
prefix: "docker"

- package-ecosystem: docker
directory: "/stable"
directory: "/stable/linting"
open-pull-requests-limit: 10
target-branch: "master"
schedule:
interval: "daily"
time: "02:00"
timezone: "America/Chicago"
assignees:
- "atc0005"
labels:
- "dependencies"
- "CI"
allow:
- dependency-type: "all"
commit-message:
prefix: "docker"

- package-ecosystem: docker
directory: "/stable/combined"
open-pull-requests-limit: 10
target-branch: "master"
schedule:
interval: "daily"
time: "02:00"
timezone: "America/Chicago"
assignees:
- "atc0005"
labels:
- "dependencies"
- "CI"
allow:
- dependency-type: "all"
commit-message:
prefix: "docker"

- package-ecosystem: docker
directory: "/stable/build/alpine-x64"
open-pull-requests-limit: 10
target-branch: "master"
schedule:
interval: "daily"
time: "02:00"
timezone: "America/Chicago"
assignees:
- "atc0005"
labels:
- "dependencies"
- "CI"
allow:
- dependency-type: "all"
commit-message:
prefix: "docker"

- package-ecosystem: docker
directory: "/stable/build/alpine-x86"
open-pull-requests-limit: 10
target-branch: "master"
schedule:
interval: "daily"
time: "02:00"
timezone: "America/Chicago"
assignees:
- "atc0005"
labels:
- "dependencies"
- "CI"
allow:
- dependency-type: "all"
commit-message:
prefix: "docker"

- package-ecosystem: docker
directory: "/stable/build/debian"
open-pull-requests-limit: 10
target-branch: "master"
schedule:
Expand Down
21 changes: 9 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,17 @@ build:
@echo "Building Docker containers"

@echo "Bundle linter config files to provide baseline default settings"
@for version in {stable,oldstable,unstable}; do cp -vf .markdownlint.yml $$version/; done
@for version in {oldstable,unstable}; do cp -vf .markdownlint.yml $$version/; done
@for version in {stable/linting,stable/combined,stable/build/alpine-x64,stable/build/alpine-x86,stable/build/debian}; do cp -vf .markdownlint.yml $$version/; done

# unstable container has its own copy of this file
@for version in {stable,oldstable}; do cp -vf .golangci.yml $$version/; done
@cp -vf .golangci.yml oldstable/
@for version in {stable/linting,stable/combined,stable/build/alpine-x64,stable/build/alpine-x86,stable/build/debian}; do cp -vf .golangci.yml $$version/; done

@echo "Building stable release"
sudo docker build \
--no-cache \
--file stable/Dockerfile.combined \
stable/ \
stable/combined/ \
-t $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):latest \
-t $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_STABLE) \
-t $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_STABLE)-$(REPO_VERSION) \
Expand All @@ -87,35 +88,31 @@ build:
@echo "Building stable-alpine-build.x64 release"
sudo docker build \
--no-cache \
--file stable/Dockerfile.alpine-build.x64 \
stable/ \
stable/build/alpine-x64/ \
-t $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_ALPINE_BUILDX64) \
-t $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_ALPINE_BUILDX64)-$(REPO_VERSION) \
--label=$(DOCKER_IMAGE_LABEL)

@echo "Building stable-alpine-build x86 release"
sudo docker build \
--no-cache \
--file stable/Dockerfile.alpine-build.x86 \
stable/ \
stable/build/alpine-x86/ \
-t $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_ALPINE_BUILDX86) \
-t $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_ALPINE_BUILDX86)-$(REPO_VERSION) \
--label=$(DOCKER_IMAGE_LABEL)

@echo "Building stable-debian-build release"
sudo docker build \
--no-cache \
--file stable/Dockerfile.debian-build \
stable/ \
stable/build/debian/ \
-t $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_DEBIAN_BUILD) \
-t $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_DEBIAN_BUILD)-$(REPO_VERSION) \
--label=$(DOCKER_IMAGE_LABEL)

@echo "Building stable linting-only release"
sudo docker build \
--no-cache \
--file stable/Dockerfile.linting \
stable/ \
stable/linting/ \
-t $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_STABLE_LINT_ONLY) \
-t $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_STABLE_LINT_ONLY)-$(REPO_VERSION) \
--label=$(DOCKER_IMAGE_LABEL)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 5806afa

Please sign in to comment.