Merge branch 'federated-user' into 'main'

Federated features

See merge request domaindrivenarchitecture/c4k-forgejo!5
This commit is contained in:
Michael Jerger 2023-07-03 06:39:50 +00:00
commit cfb7fdae14
4 changed files with 50 additions and 9 deletions

View file

@ -8,6 +8,7 @@
c4k-forgejo provides a k8s deployment file for forgejo containing: c4k-forgejo provides a k8s deployment file for forgejo containing:
* forgejo * forgejo
* test federated forgejo
* ingress having a letsencrypt managed certificate * ingress having a letsencrypt managed certificate
* postgres database * postgres database
* encrypted backup on S3 & restore * encrypted backup on S3 & restore

View file

@ -1,9 +1,10 @@
from os import environ from os import environ
from subprocess import run
from pybuilder.core import task, init from pybuilder.core import task, init
from ddadevops import * from ddadevops import *
name = 'forgejo' name = 'c4k'
MODULE = 'c4k' MODULE = 'forgejo'
PROJECT_ROOT_PATH = '..' PROJECT_ROOT_PATH = '..'
@init @init
@ -31,6 +32,43 @@ def prepare_release(project):
build.prepare_release() build.prepare_release()
@task @task
def after_publish(project): def tag_bump_and_push_release(project):
build = get_devops_build(project) build = get_devops_build(project)
build.tag_bump_and_push_release() 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)

View file

@ -9,8 +9,10 @@ ARG TAGS="sqlite sqlite_unlock_notify"
ENV TAGS "bindata timetzdata $TAGS" ENV TAGS "bindata timetzdata $TAGS"
ARG CGO_EXTRA_CFLAGS ARG CGO_EXTRA_CFLAGS
ENV FORGEJO_GIT_URL "https://codeberg.org/forgejo/forgejo.git" #ENV FORGEJO_GIT_URL "https://codeberg.org/forgejo/forgejo.git"
ENV FORGEJO_BRANCH "forgejo-federation" ENV FORGEJO_GIT_URL "https://git.exozy.me/a/gitea.git"
#ENV FORGEJO_BRANCH "forgejo-federation"
ENV FORGEJO_BRANCH "libreplanet-federation-demo"
#Build deps #Build deps
RUN apk --no-cache add build-base git nodejs npm RUN apk --no-cache add build-base git nodejs npm

View file

@ -5,7 +5,7 @@
:url "https://www.apache.org/licenses/LICENSE-2.0.html"} :url "https://www.apache.org/licenses/LICENSE-2.0.html"}
:dependencies [[org.clojure/clojure "1.11.1" :scope "provided"] :dependencies [[org.clojure/clojure "1.11.1" :scope "provided"]
[org.clojure/tools.reader "1.3.6"] [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"]] [hickory "0.7.1"]]
:target-path "target/%s/" :target-path "target/%s/"
:source-paths ["src/main/cljc" :source-paths ["src/main/cljc"
@ -22,8 +22,8 @@
:uberjar {:aot :all :uberjar {:aot :all
:main dda.c4k-forgejo.uberjar :main dda.c4k-forgejo.uberjar
:uberjar-name "c4k-forgejo-standalone.jar" :uberjar-name "c4k-forgejo-standalone.jar"
:dependencies [[org.clojure/tools.cli "1.0.214"] :dependencies [[org.clojure/tools.cli "1.0.219"]
[ch.qos.logback/logback-classic "1.4.6" [ch.qos.logback/logback-classic "1.4.8"
:exclusions [com.sun.mail/javax.mail]] :exclusions [com.sun.mail/javax.mail]]
[org.slf4j/jcl-over-slf4j "2.0.7"]]}} [org.slf4j/jcl-over-slf4j "2.0.7"]]}}
:release-tasks [["test"] :release-tasks [["test"]