c4k-nextcloud/.gitlab-ci.yml

143 lines
3.3 KiB
YAML
Raw Permalink Normal View History

2021-08-06 15:36:59 +00:00
stages:
- build_and_test
- package
- security
- upload
- image
#- integrationtest
2021-08-06 15:36:59 +00:00
.img: &img
2023-12-07 21:07:07 +00:00
image: "domaindrivenarchitecture/ddadevops-dind:4.10.0"
services:
- docker:dind
before_script:
- export RELEASE_ARTIFACT_TOKEN=$MEISSA_REPO_BUERO_RW
- export IMAGE_DOCKERHUB_USER=$DOCKERHUB_USER
- export IMAGE_DOCKERHUB_PASSWORD=$DOCKERHUB_PASSWORD
- export IMAGE_TAG=$CI_COMMIT_TAG
2021-08-06 15:36:59 +00:00
.cljs-job: &cljs
2023-12-07 21:07:07 +00:00
image: "domaindrivenarchitecture/ddadevops-clj-cljs:4.10.0"
2021-08-06 15:36:59 +00:00
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
- .shadow-cljs/
- .m2
before_script:
- export RELEASE_ARTIFACT_TOKEN=$MEISSA_REPO_BUERO_RW
- echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
- npm install
2021-08-06 15:36:59 +00:00
.clj-job: &clj
2023-12-07 21:07:07 +00:00
image: "domaindrivenarchitecture/ddadevops-clj-cljs:4.10.0"
2021-08-06 15:36:59 +00:00
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- .m2
before_script:
- export RELEASE_ARTIFACT_TOKEN=$MEISSA_REPO_BUERO_RW
- mkdir -p /root/.lein
- echo "{:auth {:repository-auth {#\"clojars\" {:username \"${CLOJARS_USER}\" :password \"${CLOJARS_TOKEN_DOMAINDRIVENARCHITECTURE}\" }}}}" > ~/.lein/profiles.clj
.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-08-06 15:36:59 +00:00
test-clj:
<<: *clj
stage: build_and_test
script:
- pyb test_clj
test-cljs:
<<: *cljs
stage: build_and_test
script:
- pyb test_cljs
2021-08-06 15:36:59 +00:00
test-schema:
<<: *clj
stage: build_and_test
script:
- pyb test_schema
2021-08-06 15:36:59 +00:00
artifacts:
paths:
- target/uberjar
2022-02-25 15:24:20 +00:00
report-frontend:
2021-08-06 15:36:59 +00:00
<<: *cljs
stage: package
script:
- pyb report_frontend
2021-08-06 15:36:59 +00:00
artifacts:
paths:
- target/frontend-build/build-report.html
2022-02-25 15:24:20 +00:00
package-frontend:
2021-08-06 15:36:59 +00:00
<<: *cljs
stage: package
script:
- pyb package_frontend
2021-08-06 15:36:59 +00:00
artifacts:
paths:
- target/frontend-build
package-uberjar:
<<: *clj
stage: package
script:
- pyb package_uberjar
2021-08-06 15:36:59 +00:00
artifacts:
paths:
- target/uberjar
release-to-clojars:
2021-08-06 15:36:59 +00:00
<<: *clj
<<: *tag_only
2021-08-06 15:36:59 +00:00
stage: upload
script:
- pyb upload_clj
2021-08-06 15:36:59 +00:00
release-to-forgejo:
<<: *clj
<<: *tag_only
2021-08-06 15:36:59 +00:00
stage: upload
script:
- pyb publish_artifacts
2021-08-06 15:36:59 +00:00
backup-image-publish:
<<: *img
<<: *tag_only
2021-08-06 15:36:59 +00:00
stage: image
script:
- cd infrastructure/backup && pyb image publish
2021-08-06 15:36:59 +00:00
nextcloud-image-publish:
<<: *img
<<: *tag_only
2021-08-06 15:36:59 +00:00
stage: image
2021-12-15 12:49:57 +00:00
script:
- cd infrastructure/nextcloud && pyb image publish
2021-12-15 12:49:57 +00:00
#.nextcloud-integrationtest:
# stage: integrationtest
# image: registry.gitlab.com/gitlab-org/cluster-integration/helm-install-image/releases/3.7.1-kube-1.20.11-alpine-3.14
# services:
# - name: registry.gitlab.com/gitlab-org/cluster-integration/test-utils/k3s-gitlab-ci/releases/v1.22.2-k3s2
# alias: k3s
# script:
# - apk add curl sudo bash
# - apk add wget curl bash sudo openjdk8
# - wget -P /etc/apk/keys/ https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub
# - apk add --no-cache --repository=https://apkproxy.herokuapp.com/sgerrand/alpine-pkg-leiningen leiningen
#
# - mkdir -p ${HOME}/.kube/
# - curl -f k3s:8081 > ${HOME}/.kube/config
# - kubectl version
# - kubectl cluster-info
# - echo "---------- Integration test -------------"
# - pwd
# - cd ./src/test/resources/local-integration-test/ && ./setup-local-s3-on-k3d.sh