c4k-common/.gitlab-ci.yml

60 lines
1.2 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
2023-07-21 15:49:53 +00:00
image: "domaindrivenarchitecture/ddadevops-clj-cljs:4.3.0"
2021-06-18 14:18:46 +00:00
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
- .shadow-cljs/
- .m2
before_script:
- echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
- npm install
.clj-job: &clj
2023-07-21 15:49:53 +00:00
image: "domaindrivenarchitecture/ddadevops-clj-cljs:4.3.0"
2021-06-18 14:00:26 +00:00
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- .m2
before_script:
- 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