Squashed '.gitlab/' content from commit cf41f2e
git-subtree-dir: .gitlab git-subtree-split: cf41f2e7768da3a340b86debcddc949b588448c7
This commit is contained in:
18
Makefile
Normal file
18
Makefile
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
SHELL := /bin/bash
|
||||||
|
|
||||||
|
PROJECT_NAME ?= $(shell git config --local remote.origin.url | sed -n 's\#.*/\([^.]*\)\.git\#\1\#p')
|
||||||
|
VERSION ?= $(shell cat VERSION)
|
||||||
|
IMAGE ?= $(shell cat IMAGE):$(VERSION)
|
||||||
|
IMAGE_LATEST ?= $(shell cat IMAGE):latest
|
||||||
|
PWD ?= $(shell pwd)
|
||||||
|
STASH ?= "common-update-stash"
|
||||||
|
|
||||||
|
include .gitlab/make/docker.makefile
|
||||||
|
include .gitlab/make/helm.makefile
|
||||||
|
include .gitlab/make/kaniko.makefile
|
||||||
|
include .gitlab/make/truenas.makefile
|
||||||
|
include .gitlab/make/git.makefile
|
||||||
|
|
||||||
|
.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
|
||||||
9
README.md
Normal file
9
README.md
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# Adding the "common" subtree as your .gitlab folder
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Add the subtree as a remote
|
||||||
|
git subtree add --prefix .gitlab git@gitlab.ducoterra.net:services/common.git main --squash --message "Add Common .gitlab Subtree"
|
||||||
|
|
||||||
|
# Now you can run the following to update
|
||||||
|
make make-update
|
||||||
|
```
|
||||||
29
make/docker.makefile
Normal file
29
make/docker.makefile
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
.PHONY: docker-init
|
||||||
|
docker-init:
|
||||||
|
@touch VERSION
|
||||||
|
@touch IMAGE
|
||||||
|
|
||||||
|
.PHONY: buildx-context
|
||||||
|
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: build
|
||||||
|
build:
|
||||||
|
docker buildx build --load . -t $(IMAGE)
|
||||||
|
@docker buildx build --load . -t $(IMAGE_LATEST)
|
||||||
|
|
||||||
|
.PHONY: push
|
||||||
|
push:
|
||||||
|
-make buildx-clear
|
||||||
|
@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
make/git.makefile
Normal file
5
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)
|
||||||
4
make/helm.makefile
Normal file
4
make/helm.makefile
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
.PHONY: helm-release
|
||||||
|
helm-release:
|
||||||
|
@yq e ".version = \"$(shell cat VERSION)\"" -i helm/Chart.yaml
|
||||||
|
@yq e ".appVersion = \"$(shell cat VERSION)\"" -i helm/Chart.yaml
|
||||||
0
make/kaniko.makefile
Normal file
0
make/kaniko.makefile
Normal file
5
make/truenas.makefile
Normal file
5
make/truenas.makefile
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
.PHONY: chart-release
|
||||||
|
chart-release:
|
||||||
|
@rsync -av $(CHART)/helm/ charts/$(CHART)/$(shell cat $(CHART)/VERSION)/
|
||||||
|
@git add charts/$(CHART)
|
||||||
|
@git commit -m "Automated release for chart $(CHART) version $(shell cat $(CHART)/VERSION)" -e
|
||||||
Reference in New Issue
Block a user