c4k-common/.gitlab-ci.yml

58 lines
1.1 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
image: domaindrivenarchitecture/shadow-cljs
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
2021-06-18 14:00:26 +00:00
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
2021-06-18 14:18:46 +00:00
test-cljs:
<<: *cljs
stage: build_and_test
script:
- shadow-cljs compile test
2021-07-09 17:04:43 +00:00
upload-clj-release:
<<: *clj
stage: upload
rules:
2021-07-09 17:58:42 +00:00
- if: '$CI_COMMIT_TAG != null'
2021-07-09 17:04:43 +00:00
script:
2022-02-25 10:43:30 +00:00
- lein deploy
2021-07-09 17:04:43 +00:00
upload-cljs-release:
<<: *clj
stage: upload
rules:
2021-07-09 17:58:42 +00:00
- if: '$CI_COMMIT_TAG != null'
2021-07-09 17:04:43 +00:00
script:
- mv project.clj project-clj.clj && mv project-cljs.clj project.clj
2022-02-25 10:43:30 +00:00
- lein deploy
2021-07-09 17:04:43 +00:00