test new release creation process

This commit is contained in:
Michael Jerger 2023-08-17 17:38:29 +02:00
parent 1999f8b68a
commit 33c499f364
2 changed files with 33 additions and 12 deletions

View file

@ -6,16 +6,17 @@ stages:
- image
.img: &img
image: "domaindrivenarchitecture/ddadevops-dind:4.1.0"
image: "domaindrivenarchitecture/ddadevops-dind:4.7.0"
services:
- docker:dind
before_script:
- export RELEASE_ARTIFACT_TOKEN=$MEISSA_REPO_BUERO_RW
- export IMAGE_DOCKERHUB_USER=$DOCKERHUB_USER
- export IMAGE_DOCKERHUB_PASSWORD=$DOCKERHUB_PASSWORD
- export IMAGE_TAG=$CI_COMMIT_TAG
.cljs-job: &cljs
image: "domaindrivenarchitecture/ddadevops-clj-cljs:4.3.0"
image: "domaindrivenarchitecture/ddadevops-clj-cljs:4.7.0"
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
@ -23,16 +24,18 @@ stages:
- .shadow-cljs/
- .m2
before_script:
- export RELEASE_ARTIFACT_TOKEN=$MEISSA_REPO_BUERO_RW
- echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
- npm install
.clj-job: &clj
image: "domaindrivenarchitecture/ddadevops-clj-cljs:4.3.0"
image: "domaindrivenarchitecture/ddadevops-clj-cljs:4.7.0"
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- .m2
before_script:
- export RELEASE_ARTIFACT_TOKEN=$MEISSA_REPO_BUERO_RW
- mkdir -p /root/.lein
- echo "{:auth {:repository-auth {#\"clojars\" {:username \"${CLOJARS_USER}\" :password \"${CLOJARS_TOKEN_DOMAINDRIVENARCHITECTURE}\" }}}}" > ~/.lein/profiles.clj
@ -97,10 +100,10 @@ upload-clj-release:
script:
- pyb upload_clj
release:
image: registry.gitlab.com/gitlab-org/release-cli:latest
stage: upload
release-to-gitlab:
<<: *tag_only
stage: upload
image: registry.gitlab.com/gitlab-org/release-cli:latest
artifacts:
paths:
- target/uberjar
@ -116,6 +119,13 @@ release:
--assets-link "{\"name\":\"c4k-jitsi.js.sha256\",\"url\":\"https://gitlab.com/domaindrivenarchitecture/c4k-jitsi/-/jobs/${CI_JOB_ID}/artifacts/file/target/frontend-build/c4k-jitsi.js.sha256\"}" \
--assets-link "{\"name\":\"c4k-jitsi.js.sha512\",\"url\":\"https://gitlab.com/domaindrivenarchitecture/c4k-jitsi/-/jobs/${CI_JOB_ID}/artifacts/file/target/frontend-build/c4k-jitsi.js.sha512\"}" \
release-to-forgejo:
<<: *clj
<<: *tag_only
stage: upload
script:
- pyb publish_artifacts
jitsi-image-test-publish:
<<: *img
<<: *tag_only

View file

@ -22,7 +22,14 @@ def initialize(project):
"release_primary_build_file": "project.clj",
"release_secondary_build_files": [
"package.json",
"infrastructure/docker-jitsi-web/build.py"
"infrastructure/docker-jitsi-web/build.py",
],
"release_artifact_server_url": "https://repo.prod.meissa.de",
"release_organisation": "meissa",
"release_repository_name": name,
"release_artifacts": [
"target/uberjar/c4k-jitsi-standalone.jar",
"target/frontend-build/c4k-jitsi.js",
],
}
@ -152,6 +159,10 @@ def tag(project):
build = get_devops_build(project)
build.tag_bump_and_push_release()
@task
def publish_artifacts(project):
build = get_devops_build(project)
build.publish_artifacts()
def release(project):
prepare(project)
@ -164,4 +175,4 @@ def linttest(project, release_type):
test_clj(project)
test_cljs(project)
test_schema(project)
lint(project)
#lint(project)