Added gitlab ci
This commit is contained in:
parent
39e3b25ac0
commit
b7bc7da053
1 changed files with 29 additions and 0 deletions
29
.gitlab-ci.yml
Normal file
29
.gitlab-ci.yml
Normal 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
|
Loading…
Reference in a new issue