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 - image
.img: &img .img: &img
image: "domaindrivenarchitecture/ddadevops-dind:4.1.0" image: "domaindrivenarchitecture/ddadevops-dind:4.7.0"
services: services:
- docker:dind - docker:dind
before_script: before_script:
- export RELEASE_ARTIFACT_TOKEN=$MEISSA_REPO_BUERO_RW
- export IMAGE_DOCKERHUB_USER=$DOCKERHUB_USER - export IMAGE_DOCKERHUB_USER=$DOCKERHUB_USER
- export IMAGE_DOCKERHUB_PASSWORD=$DOCKERHUB_PASSWORD - export IMAGE_DOCKERHUB_PASSWORD=$DOCKERHUB_PASSWORD
- export IMAGE_TAG=$CI_COMMIT_TAG - export IMAGE_TAG=$CI_COMMIT_TAG
.cljs-job: &cljs .cljs-job: &cljs
image: "domaindrivenarchitecture/ddadevops-clj-cljs:4.3.0" image: "domaindrivenarchitecture/ddadevops-clj-cljs:4.7.0"
cache: cache:
key: ${CI_COMMIT_REF_SLUG} key: ${CI_COMMIT_REF_SLUG}
paths: paths:
@ -23,16 +24,18 @@ stages:
- .shadow-cljs/ - .shadow-cljs/
- .m2 - .m2
before_script: before_script:
- export RELEASE_ARTIFACT_TOKEN=$MEISSA_REPO_BUERO_RW
- echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc - echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
- npm install - npm install
.clj-job: &clj .clj-job: &clj
image: "domaindrivenarchitecture/ddadevops-clj-cljs:4.3.0" image: "domaindrivenarchitecture/ddadevops-clj-cljs:4.7.0"
cache: cache:
key: ${CI_COMMIT_REF_SLUG} key: ${CI_COMMIT_REF_SLUG}
paths: paths:
- .m2 - .m2
before_script: before_script:
- export RELEASE_ARTIFACT_TOKEN=$MEISSA_REPO_BUERO_RW
- mkdir -p /root/.lein - mkdir -p /root/.lein
- echo "{:auth {:repository-auth {#\"clojars\" {:username \"${CLOJARS_USER}\" :password \"${CLOJARS_TOKEN_DOMAINDRIVENARCHITECTURE}\" }}}}" > ~/.lein/profiles.clj - echo "{:auth {:repository-auth {#\"clojars\" {:username \"${CLOJARS_USER}\" :password \"${CLOJARS_TOKEN_DOMAINDRIVENARCHITECTURE}\" }}}}" > ~/.lein/profiles.clj
@ -97,10 +100,10 @@ upload-clj-release:
script: script:
- pyb upload_clj - pyb upload_clj
release: release-to-gitlab:
image: registry.gitlab.com/gitlab-org/release-cli:latest
stage: upload
<<: *tag_only <<: *tag_only
stage: upload
image: registry.gitlab.com/gitlab-org/release-cli:latest
artifacts: artifacts:
paths: paths:
- target/uberjar - 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.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\"}" \ --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: jitsi-image-test-publish:
<<: *img <<: *img
<<: *tag_only <<: *tag_only

View file

@ -22,7 +22,14 @@ def initialize(project):
"release_primary_build_file": "project.clj", "release_primary_build_file": "project.clj",
"release_secondary_build_files": [ "release_secondary_build_files": [
"package.json", "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 = get_devops_build(project)
build.tag_bump_and_push_release() build.tag_bump_and_push_release()
@task
def publish_artifacts(project):
build = get_devops_build(project)
build.publish_artifacts()
def release(project): def release(project):
prepare(project) prepare(project)
@ -164,4 +175,4 @@ def linttest(project, release_type):
test_clj(project) test_clj(project)
test_cljs(project) test_cljs(project)
test_schema(project) test_schema(project)
lint(project) #lint(project)