From 93a8977aeb69a38147781025b454c7b6f51c5225 Mon Sep 17 00:00:00 2001 From: William Petit Date: Wed, 23 Aug 2023 11:54:18 -0600 Subject: [PATCH] ci: add jenkins pipeline --- .gitignore | 1 + Jenkinsfile | 3 +++ Makefile | 23 +++++++++++++++++++++++ tasks/checkmake.mk | 8 ++++++++ 4 files changed, 35 insertions(+) create mode 100644 .gitignore create mode 100644 Jenkinsfile create mode 100644 Makefile create mode 100644 tasks/checkmake.mk diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c50f923 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +tools/ diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..4c74bd0 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,3 @@ +@Library("cadoles") _ + +standardMakePipeline() \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d907f6b --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +.PHONY: all +all: test build + +.PHONY: test +test: tools/checkmake/bin/checkmake + tools/checkmake/bin/checkmake Makefile + +.PHONY: build +build: + +.PHONY: release +release: changelog + $(MAKE) MKT_GITEA_RELEASE_ATTACHMENTS="CHANGELOG.md" mkt-gitea-release + +.PHONY: clean +clean: + rm -rf tools + +.PHONY: changelog +changelog: + $(MAKE) MKT_GIT_CHGLOG_PROJECT_ORG=Cadoles MKT_GIT_CHGLOG_PROJECT_NAME=mktools mkt-changelog + +include tasks/*.mk \ No newline at end of file diff --git a/tasks/checkmake.mk b/tasks/checkmake.mk new file mode 100644 index 0000000..6652e75 --- /dev/null +++ b/tasks/checkmake.mk @@ -0,0 +1,8 @@ +MKT_CHECKMAKE_VERSION ?= 0.2.2 +MKT_CHECKMAKE_URL ?= https://github.com/mrtazz/checkmake/releases/download/$(MKT_CHECKMAKE_VERSION)/checkmake-$(MKT_CHECKMAKE_VERSION).linux.amd64 + +tools/checkmake/bin/checkmake: + mkdir -p tools/checkmake/bin + grep -qF -- "tools/" ".gitignore" 2>/dev/null || echo "tools/" >> ".gitignore" + curl -sL -o tools/checkmake/bin/checkmake "$(MKT_CHECKMAKE_URL)" + chmod +x tools/checkmake/bin/checkmake \ No newline at end of file