stages: - build_and_test - package - security - upload - image .img: &img image: "domaindrivenarchitecture/ddadevops-dind:4.7.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 .cljs-job: &cljs image: "domaindrivenarchitecture/ddadevops-clj-cljs:4.7.0" 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 .clj-job: &clj image: "domaindrivenarchitecture/ddadevops-clj-cljs:4.7.0" 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]+$/' test-clj: <<: *clj stage: build_and_test script: - pyb test_clj test-cljs: <<: *cljs stage: build_and_test script: - pyb test_cljs test-schema: <<: *clj stage: build_and_test script: - pyb test_schema artifacts: paths: - target/uberjar report-frontend: <<: *cljs stage: package script: - pyb report_frontend artifacts: paths: - target/frontend-build/build-report.html package-frontend: <<: *cljs stage: package script: - pyb package_frontend artifacts: paths: - target/frontend-build package-uberjar: <<: *clj stage: package script: - pyb package_uberjar artifacts: paths: - target/uberjar upload-clj-release: <<: *clj <<: *tag_only stage: upload script: - pyb upload_clj release-to-gitlab: <<: *tag_only stage: upload image: registry.gitlab.com/gitlab-org/release-cli:latest artifacts: paths: - target/uberjar - target/frontend-build script: - apk --no-cache add curl - | release-cli create --name "Release $CI_COMMIT_TAG" --tag-name $CI_COMMIT_TAG \ --assets-link "{\"name\":\"c4k-jitsi-standalone.jar\",\"url\":\"https://gitlab.com/domaindrivenarchitecture/c4k-jitsi/-/jobs/${CI_JOB_ID}/artifacts/file/target/uberjar/c4k-jitsi-standalone.jar\"}" \ --assets-link "{\"name\":\"c4k-jitsi-standalone.jar.sha256\",\"url\":\"https://gitlab.com/domaindrivenarchitecture/c4k-jitsi/-/jobs/${CI_JOB_ID}/artifacts/file/target/uberjar/c4k-jitsi-standalone.jar.sha256\"}" \ --assets-link "{\"name\":\"c4k-jitsi-standalone.jar.sha512\",\"url\":\"https://gitlab.com/domaindrivenarchitecture/c4k-jitsi/-/jobs/${CI_JOB_ID}/artifacts/file/target/uberjar/c4k-jitsi-standalone.jar.sha512\"}" \ --assets-link "{\"name\":\"c4k-jitsi.js\",\"url\":\"https://gitlab.com/domaindrivenarchitecture/c4k-jitsi/-/jobs/${CI_JOB_ID}/artifacts/file/target/frontend-build/c4k-jitsi.js\"}" \ --assets-link "{\"name\":\"c4k-jitsi.js.sha256\",\"url\":\"https://gitlab.com/domaindrivenarchitecture/c4k-jitsi/-/jobs/${CI_JOB_ID}/artifacts/file/target/frontend-build/c4k-jitsi.js.sha256\"}" \ --assets-link "{\"name\":\"c4k-jitsi.js.sha512\",\"url\":\"https://gitlab.com/domaindrivenarchitecture/c4k-jitsi/-/jobs/${CI_JOB_ID}/artifacts/file/target/frontend-build/c4k-jitsi.js.sha512\"}" \ release-to-forgejo: <<: *clj <<: *tag_only stage: upload script: - pyb publish_artifacts jitsi-image-test-publish: <<: *img <<: *tag_only stage: image script: - cd infrastructure/docker-jitsi-web && pyb image test publish