Added gitlab ci

This commit is contained in:
Clemens Geibel 2021-06-18 16:00:26 +02:00
parent 39e3b25ac0
commit b7bc7da053

29
.gitlab-ci.yml Normal file
View file

@ -0,0 +1,29 @@
stages:
- build_and_test
- package
- security
- upload
.clj-uploadjob: &clj
image: domaindrivenarchitecture/lein
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
test-clj:
<<: *clj
stage: build_and_test
script:
- lein test
upload-clj-prerelease:
<<: *clj
stage: upload
rules:
- if: '$CI_COMMIT_BRANCH == "master" && $CI_COMMIT_TAG == null'
script:
- lein deploy clojars