From b7bc7da05338ad1d75d1bc16e45f0a18d3ee7481 Mon Sep 17 00:00:00 2001 From: Clemens Geibel Date: Fri, 18 Jun 2021 16:00:26 +0200 Subject: [PATCH] Added gitlab ci --- .gitlab-ci.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..f34fc51 --- /dev/null +++ b/.gitlab-ci.yml @@ -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