2022-09-08 13:04:17 +00:00
|
|
|
stages:
|
|
|
|
- build_and_test
|
|
|
|
- package
|
|
|
|
- security
|
|
|
|
- upload
|
|
|
|
- image
|
|
|
|
|
2023-10-13 09:24:13 +00:00
|
|
|
.img: &img
|
2023-12-21 22:24:20 +00:00
|
|
|
image: "domaindrivenarchitecture/ddadevops-dind:4.10.5"
|
2023-10-13 09:24:13 +00:00
|
|
|
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
|
2022-09-08 13:04:17 +00:00
|
|
|
|
|
|
|
.cljs-job: &cljs
|
2023-12-21 22:24:20 +00:00
|
|
|
image: "domaindrivenarchitecture/ddadevops-clj-cljs:4.10.5"
|
2022-09-08 13:04:17 +00:00
|
|
|
cache:
|
|
|
|
key: ${CI_COMMIT_REF_SLUG}
|
|
|
|
paths:
|
|
|
|
- node_modules/
|
|
|
|
- .shadow-cljs/
|
|
|
|
- .m2
|
|
|
|
before_script:
|
2023-10-13 09:24:13 +00:00
|
|
|
- export RELEASE_ARTIFACT_TOKEN=$MEISSA_REPO_BUERO_RW
|
|
|
|
- echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
|
|
|
|
- npm install
|
2022-09-08 13:04:17 +00:00
|
|
|
|
2023-10-13 09:24:13 +00:00
|
|
|
.clj-job: &clj
|
2023-12-21 22:24:20 +00:00
|
|
|
image: "domaindrivenarchitecture/ddadevops-clj-cljs:4.10.5"
|
2022-09-08 13:04:17 +00:00
|
|
|
cache:
|
|
|
|
key: ${CI_COMMIT_REF_SLUG}
|
|
|
|
paths:
|
|
|
|
- .m2
|
|
|
|
before_script:
|
2023-10-13 09:24:13 +00:00
|
|
|
- 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
|
2022-09-08 13:04:17 +00:00
|
|
|
|
2023-10-13 09:24:13 +00:00
|
|
|
.tag_only: &tag_only
|
|
|
|
rules:
|
|
|
|
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
|
|
|
when: never
|
|
|
|
- if: '$CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+$/'
|
2022-09-08 13:04:17 +00:00
|
|
|
|
|
|
|
test-clj:
|
|
|
|
<<: *clj
|
|
|
|
stage: build_and_test
|
|
|
|
script:
|
2023-10-13 09:24:13 +00:00
|
|
|
- pyb test_clj
|
|
|
|
|
|
|
|
test-cljs:
|
|
|
|
<<: *cljs
|
|
|
|
stage: build_and_test
|
|
|
|
script:
|
|
|
|
- pyb test_cljs
|
2022-09-08 13:04:17 +00:00
|
|
|
|
|
|
|
test-schema:
|
|
|
|
<<: *clj
|
|
|
|
stage: build_and_test
|
|
|
|
script:
|
2023-10-13 09:24:13 +00:00
|
|
|
- pyb test_schema
|
2022-09-08 13:04:17 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- target/uberjar
|
|
|
|
|
|
|
|
report-frontend:
|
|
|
|
<<: *cljs
|
|
|
|
stage: package
|
|
|
|
script:
|
2023-10-13 09:24:13 +00:00
|
|
|
- pyb report_frontend
|
2022-09-08 13:04:17 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- target/frontend-build/build-report.html
|
|
|
|
|
|
|
|
package-frontend:
|
|
|
|
<<: *cljs
|
|
|
|
stage: package
|
|
|
|
script:
|
2023-10-13 09:24:13 +00:00
|
|
|
- pyb package_frontend
|
2022-09-08 13:04:17 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- target/frontend-build
|
|
|
|
|
|
|
|
package-uberjar:
|
|
|
|
<<: *clj
|
|
|
|
stage: package
|
|
|
|
script:
|
2023-10-13 09:24:13 +00:00
|
|
|
- pyb package_uberjar
|
2022-09-08 13:04:17 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
2023-10-13 09:24:13 +00:00
|
|
|
- target/uberjar
|
2022-09-08 13:04:17 +00:00
|
|
|
|
2023-10-13 09:24:13 +00:00
|
|
|
release-to-clojars:
|
2022-09-08 13:04:17 +00:00
|
|
|
<<: *clj
|
2023-10-13 09:24:13 +00:00
|
|
|
<<: *tag_only
|
2022-09-08 13:04:17 +00:00
|
|
|
stage: upload
|
|
|
|
script:
|
2023-10-13 09:24:13 +00:00
|
|
|
- pyb upload_clj
|
2022-09-08 13:04:17 +00:00
|
|
|
|
2023-10-13 09:24:13 +00:00
|
|
|
release-to-forgejo:
|
|
|
|
<<: *clj
|
|
|
|
<<: *tag_only
|
2022-09-08 13:04:17 +00:00
|
|
|
stage: upload
|
|
|
|
script:
|
2023-10-13 09:24:13 +00:00
|
|
|
- pyb publish_artifacts
|
2023-01-20 13:01:18 +00:00
|
|
|
|
2023-10-13 09:24:13 +00:00
|
|
|
website-image-publish:
|
|
|
|
<<: *img
|
|
|
|
<<: *tag_only
|
2023-01-20 13:01:18 +00:00
|
|
|
stage: image
|
|
|
|
script:
|
2023-10-13 09:24:13 +00:00
|
|
|
- cd infrastructure/build && pyb image publish
|