c4k-common/.gitlab-ci.yml

62 lines
1.3 KiB
YAML
Raw Normal View History

2021-06-18 14:00:26 +00:00
stages:
- build_and_test
- package
- security
- upload
2021-06-18 14:18:46 +00:00
.cljs-job: &cljs
2024-02-17 13:41:39 +00:00
image: "domaindrivenarchitecture/ddadevops-clj-cljs:4.11.4"
2021-06-18 14:18:46 +00:00
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
- .shadow-cljs/
- .m2
before_script:
2024-01-19 11:04:00 +00:00
- export RELEASE_ARTIFACT_TOKEN=$MEISSA_REPO_BUERO_RW
2021-06-18 14:18:46 +00:00
- echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
- npm install
.clj-job: &clj
2024-02-17 13:41:39 +00:00
image: "domaindrivenarchitecture/ddadevops-clj:4.11.4"
2021-06-18 14:00:26 +00:00
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- .m2
before_script:
2024-01-19 11:04:00 +00:00
- export RELEASE_ARTIFACT_TOKEN=$MEISSA_REPO_BUERO_RW
2021-06-18 14:00:26 +00:00
- mkdir -p /root/.lein
- echo "{:auth {:repository-auth {#\"clojars\" {:username \"${CLOJARS_USER}\" :password \"${CLOJARS_TOKEN_DOMAINDRIVENARCHITECTURE}\" }}}}" > ~/.lein/profiles.clj
2023-07-20 07:23:19 +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]+$/'
2021-06-18 14:00:26 +00:00
test-clj:
<<: *clj
stage: build_and_test
script:
2023-07-20 07:23:19 +00:00
- pyb test_clj
2021-06-18 14:00:26 +00:00
2021-06-18 14:18:46 +00:00
test-cljs:
<<: *cljs
stage: build_and_test
script:
2023-07-20 07:23:19 +00:00
- pyb test_cljs
2021-06-18 14:18:46 +00:00
2021-07-09 17:04:43 +00:00
upload-clj-release:
<<: *clj
2023-07-20 07:23:19 +00:00
<<: *tag_only
2021-07-09 17:04:43 +00:00
stage: upload
script:
2023-07-20 07:23:19 +00:00
- pyb upload_clj
2021-07-09 17:04:43 +00:00
upload-cljs-release:
<<: *clj
2023-07-20 07:23:19 +00:00
<<: *tag_only
2021-07-09 17:04:43 +00:00
stage: upload
script:
2023-07-20 07:23:19 +00:00
- pyb upload_cljs