Merge commit '99c243e9cdbe95f4439463500b6797e9ae6d7f17'
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
SHELL := /bin/bash
|
SHELL := /bin/bash
|
||||||
|
|
||||||
IMAGE ?= $(shell cat IMAGE):$(shell cat VERSION)
|
VERSION ?= $(shell cat VERSION)
|
||||||
|
IMAGE ?= $(shell cat IMAGE):$(VERSION)
|
||||||
IMAGE_LATEST ?= $(shell cat IMAGE):latest
|
IMAGE_LATEST ?= $(shell cat IMAGE):latest
|
||||||
PWD ?= $(shell pwd)
|
PWD ?= $(shell pwd)
|
||||||
STASH ?= "common-update-stash"
|
STASH ?= "common-update-stash"
|
||||||
@@ -9,6 +10,7 @@ include .gitlab/make/docker.makefile
|
|||||||
include .gitlab/make/helm.makefile
|
include .gitlab/make/helm.makefile
|
||||||
include .gitlab/make/kaniko.makefile
|
include .gitlab/make/kaniko.makefile
|
||||||
include .gitlab/make/truenas.makefile
|
include .gitlab/make/truenas.makefile
|
||||||
|
include .gitlab/make/git.makefile
|
||||||
|
|
||||||
.PHONY: warning
|
.PHONY: warning
|
||||||
warning:
|
warning:
|
||||||
@@ -22,9 +24,7 @@ make-stash-drop:
|
|||||||
|
|
||||||
.PHONY: make-update
|
.PHONY: make-update
|
||||||
make-update:
|
make-update:
|
||||||
@git stash save $(STASH)
|
-git subtree pull --prefix .gitlab --message "Merge update from Common" -q git@gitlab.ducoterra.net:services/common.git main
|
||||||
-git subtree pull --prefix .gitlab git@gitlab.ducoterra.net:services/common.git main
|
|
||||||
@if [ ! -z "$$(git stash list | grep -r 'stash@{0}.*common')" ]; then git stash pop; fi
|
|
||||||
|
|
||||||
.PHONY: make-push
|
.PHONY: make-push
|
||||||
make-push: warning
|
make-push: warning
|
||||||
@@ -32,4 +32,3 @@ make-push: warning
|
|||||||
@git remote add common git@gitlab.ducoterra.net:services/common.git
|
@git remote add common git@gitlab.ducoterra.net:services/common.git
|
||||||
@git subtree push --prefix .gitlab common main
|
@git subtree push --prefix .gitlab common main
|
||||||
@git remote remove common
|
@git remote remove common
|
||||||
@make make-update
|
|
||||||
|
|||||||
@@ -5,18 +5,25 @@ docker-init:
|
|||||||
|
|
||||||
.PHONY: buildx-context
|
.PHONY: buildx-context
|
||||||
buildx-context:
|
buildx-context:
|
||||||
docker buildx create --name arm64 --use --platform linux/amd64,linux/arm64
|
docker buildx create --name container-builder --use --platform linux/amd64,linux/arm64
|
||||||
|
|
||||||
.PHONY: buildx-clear
|
.PHONY: buildx-clear
|
||||||
buildx-clear:
|
buildx-clear:
|
||||||
docker buildx rm arm64
|
docker buildx rm container-builder
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build:
|
build:
|
||||||
docker buildx build --load . -t $(IMAGE)
|
docker buildx build --load . -t $(IMAGE)
|
||||||
@docker buildx build --load . -t $(IMAGE_LATEST)
|
@docker buildx build --load . -t $(IMAGE_LATEST)
|
||||||
|
|
||||||
.PHONY: push
|
.PHONY: push
|
||||||
push:
|
push:
|
||||||
docker buildx build --platform linux/amd64 --push . -t $(IMAGE)
|
-make buildx-clear
|
||||||
@docker buildx build --platform linux/amd64 --push . -t $(IMAGE_LATEST)
|
@make 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
|
||||||
|
|||||||
5
.gitlab/make/git.makefile
Normal file
5
.gitlab/make/git.makefile
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
.PHONY: git-release
|
||||||
|
git-release:
|
||||||
|
@git add .
|
||||||
|
@git commit -m "Automated release for version $(VERSION)"
|
||||||
|
@git tag $(VERSION)
|
||||||
Reference in New Issue
Block a user