From 3c6b36948d4f0810f7007f16b2dfc3e8e17d7dc6 Mon Sep 17 00:00:00 2001 From: Michael Jerger Date: Fri, 30 Jun 2023 17:34:14 +0200 Subject: [PATCH 1/4] upgrade deps --- project.clj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/project.clj b/project.clj index f294721..57bb81d 100644 --- a/project.clj +++ b/project.clj @@ -5,7 +5,7 @@ :url "https://www.apache.org/licenses/LICENSE-2.0.html"} :dependencies [[org.clojure/clojure "1.11.1" :scope "provided"] [org.clojure/tools.reader "1.3.6"] - [org.domaindrivenarchitecture/c4k-common-clj "6.0.1"] + [org.domaindrivenarchitecture/c4k-common-clj "6.0.2"] [hickory "0.7.1"]] :target-path "target/%s/" :source-paths ["src/main/cljc" @@ -22,8 +22,8 @@ :uberjar {:aot :all :main dda.c4k-forgejo.uberjar :uberjar-name "c4k-forgejo-standalone.jar" - :dependencies [[org.clojure/tools.cli "1.0.214"] - [ch.qos.logback/logback-classic "1.4.6" + :dependencies [[org.clojure/tools.cli "1.0.219"] + [ch.qos.logback/logback-classic "1.4.8" :exclusions [com.sun.mail/javax.mail]] [org.slf4j/jcl-over-slf4j "2.0.7"]]}} :release-tasks [["test"] From a530cdf8bfda6b3a982452f40069302ea484f064 Mon Sep 17 00:00:00 2001 From: Michael Jerger Date: Fri, 30 Jun 2023 17:34:27 +0200 Subject: [PATCH 2/4] add doc --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 7ddd9e5..a0b23af 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ c4k-forgejo provides a k8s deployment file for forgejo containing: * forgejo +* test federated forgejo * ingress having a letsencrypt managed certificate * postgres database * encrypted backup on S3 & restore From c03bc5e3b8e0942c1bece72d84f3fa6438734d6c Mon Sep 17 00:00:00 2001 From: Michael Jerger Date: Fri, 30 Jun 2023 17:45:22 +0200 Subject: [PATCH 3/4] support for releasing --- build.py | 46 ++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 42 insertions(+), 4 deletions(-) diff --git a/build.py b/build.py index 81bb3d3..de5d5da 100644 --- a/build.py +++ b/build.py @@ -1,9 +1,10 @@ from os import environ +from subprocess import run from pybuilder.core import task, init from ddadevops import * -name = 'forgejo' -MODULE = 'c4k' +name = 'c4k' +MODULE = 'forgejo' PROJECT_ROOT_PATH = '..' @init @@ -31,6 +32,43 @@ def prepare_release(project): build.prepare_release() @task -def after_publish(project): +def tag_bump_and_push_release(project): build = get_devops_build(project) - build.tag_bump_and_push_release() \ No newline at end of file + build.tag_bump_and_push_release() + +@task +def patch(project): + build_all(project, "PATCH") + +@task +def minor(project): + build_all(project, "MINOR") + +@task +def major(project): + build_all(project, "MAJOR") + +@task +def dev(project): + build_all(project, "NONE") + +@task +def test(project): + run("lein test", shell=True) + +@task +def build_it(project): + run("lein uberjar", shell=True) + +@task +def publish(project): + run("lein deploy", shell=True) + +def build_all(project, release_type): + build = get_devops_build(project) + build.update_release_type(release_type) + test(project) + prepare_release(project) + build_it(project) + tag_bump_and_push_release(project) + From 94d5af2435a1c6ff40c05b92a043f20c5f72ca6d Mon Sep 17 00:00:00 2001 From: Michael Jerger Date: Fri, 30 Jun 2023 18:57:18 +0200 Subject: [PATCH 4/4] use another repo / branch to build --- infrastructure/docker-federated/image/Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/infrastructure/docker-federated/image/Dockerfile b/infrastructure/docker-federated/image/Dockerfile index bf2e710..e3d831b 100644 --- a/infrastructure/docker-federated/image/Dockerfile +++ b/infrastructure/docker-federated/image/Dockerfile @@ -9,8 +9,10 @@ ARG TAGS="sqlite sqlite_unlock_notify" ENV TAGS "bindata timetzdata $TAGS" ARG CGO_EXTRA_CFLAGS -ENV FORGEJO_GIT_URL "https://codeberg.org/forgejo/forgejo.git" -ENV FORGEJO_BRANCH "forgejo-federation" +#ENV FORGEJO_GIT_URL "https://codeberg.org/forgejo/forgejo.git" +ENV FORGEJO_GIT_URL "https://git.exozy.me/a/gitea.git" +#ENV FORGEJO_BRANCH "forgejo-federation" +ENV FORGEJO_BRANCH "libreplanet-federation-demo" #Build deps RUN apk --no-cache add build-base git nodejs npm