Squashed '.gitlab/' changes from 6430416..16ee2f3
16ee2f3 Merge branch 'various-docker-fixes' into 'main' 5b3e196 fix docker build and remove release 4bf9d45 Merge branch 'prefix-docker-commands' into 'main' 91b77b3 don't reset head after subtree pull, it breaks things 66b4362 prefix all docker commands with docker- ba2827a Merge branch 'allow-specify-branch' into 'main' 4de5558 ignore .gitlab 71ff227 Allow pulling specific branch with BRANCH_NAME git-subtree-dir: .gitlab git-subtree-split: 16ee2f3ddcc1235cb4a6b7a38c82d52859e8408f
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.gitlab
|
||||
4
Makefile
4
Makefile
@@ -6,6 +6,7 @@ IMAGE ?= $(shell cat IMAGE):$(VERSION)
|
||||
IMAGE_LATEST ?= $(shell cat IMAGE):latest
|
||||
PWD ?= $(shell pwd)
|
||||
STASH ?= "common-update-stash"
|
||||
MAKE_BRANCH ?= main
|
||||
|
||||
include .gitlab/make/docker.makefile
|
||||
include .gitlab/make/helm.makefile
|
||||
@@ -14,6 +15,7 @@ include .gitlab/make/truenas.makefile
|
||||
include .gitlab/make/git.makefile
|
||||
include .gitlab/make/kubectl.makefile
|
||||
|
||||
# git subtree add --prefix .gitlab --squash --message "Merge update from Common" -q git@gitlab.ducoterra.net:services/common.git main
|
||||
.PHONY: make-update
|
||||
make-update:
|
||||
@git subtree pull --prefix .gitlab --squash --message "Merge update from Common" -q git@gitlab.ducoterra.net:services/common.git main
|
||||
@git subtree pull --prefix .gitlab --squash --message "Merge update from Common" -q git@gitlab.ducoterra.net:services/common.git $(MAKE_BRANCH)
|
||||
|
||||
@@ -3,27 +3,21 @@ docker-init:
|
||||
@touch VERSION
|
||||
@touch IMAGE
|
||||
|
||||
.PHONY: buildx-context
|
||||
buildx-context:
|
||||
docker buildx create --name container-builder --use --platform linux/amd64,linux/arm64
|
||||
.PHONY: docker-buildx-context
|
||||
docker-buildx-context:
|
||||
@docker buildx create --name container-builder --use --platform linux/amd64,linux/arm64
|
||||
|
||||
.PHONY: buildx-clear
|
||||
buildx-clear:
|
||||
docker buildx rm container-builder
|
||||
.PHONY: docker-buildx-clear
|
||||
docker-buildx-clear:
|
||||
@docker buildx rm container-builder
|
||||
|
||||
.PHONY: build
|
||||
build:
|
||||
docker buildx build --load . -t $(IMAGE)
|
||||
@docker buildx build --load . -t $(IMAGE_LATEST)
|
||||
.PHONY: docker-build
|
||||
docker-build:
|
||||
docker build . -t $(IMAGE)
|
||||
|
||||
.PHONY: push
|
||||
push:
|
||||
-make buildx-clear
|
||||
@make buildx-context
|
||||
.PHONY: docker-push
|
||||
docker-push:
|
||||
-make docker-buildx-clear
|
||||
@make docker-buildx-context
|
||||
docker buildx build --platform linux/amd64,linux/arm64 --push . -t $(IMAGE)
|
||||
@docker buildx build --platform linux/amd64,linux/arm64 --push . -t $(IMAGE_LATEST)
|
||||
|
||||
.PHONY: docker-release
|
||||
docker-release:
|
||||
@yq e ".services.minecraft.image = \"$(IMAGE)\"" -i docker-compose.yaml
|
||||
@make push
|
||||
|
||||
Reference in New Issue
Block a user