diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a5a9af0b05123e3ab37674f45fc4e1f5551454f3..eebc96fb4c1747e44642aa50884d2311ad8767bf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,7 +23,16 @@ variables: ## Build jobs # -.template:basic_build: &basic_build +.sources_changed: + only: + changes: + - "CMakeLists.txt" + - ".gitlab-ci.yml" + - "src/**/*" + - "tests/**/*" + +.basic_build: + extends: .sources_changed stage: build tags: - docker @@ -38,74 +47,75 @@ variables: paths: - build/ -.template:fedora_build: &fedora_build - <<: *basic_build +.fedora_build: + extends: .basic_build image: docker.louiz.org/louiz/biboumi/test-fedora:latest build:fedora: - <<: *fedora_build + extends: .fedora_build build:debian: - <<: *basic_build + extends: .basic_build image: docker.louiz.org/louiz/biboumi/test-debian:latest build:alpine: + extends: .basic_build variables: SYSTEMD: "-DWITHOUT_SYSTEMD=1" - <<: *basic_build image: docker.louiz.org/louiz/biboumi/test-alpine:latest build:archlinux: - <<: *basic_build + extends: .basic_build only: - branches@louiz/biboumi - when: manual + - triggers tags: - armv7l artifacts: paths: [] build:no_botan: + extends: .fedora_build variables: BOTAN: "-DWITHOUT_BOTAN=1" - <<: *fedora_build build:no_udns: + extends: .fedora_build variables: UDNS: "-DWITHOUT_UDNS=1" - <<: *fedora_build build:no_libidn: + extends: .fedora_build variables: UDNS: "-DWITHOUT_UDNS=1" - <<: *fedora_build build:no_sqlite3: + extends: .fedora_build variables: SQLITE3: "-DWITHOUT_SQLITE3=1" TEST_POSTGRES_URI: "postgres@postgres/postgres" services: - postgres:latest - <<: *fedora_build build:no_db: + extends: .fedora_build variables: SQLITE3: "-DWITHOUT_SQLITE3=1" POSTGRESQL: "-DWITHOUT_POSTGRESQL=1" - <<: *fedora_build build:no_db_botan: + extends: .fedora_build variables: SQLITE3: "-DWITHOUT_SQLITE3=1" POSTGRESQL: "-DWITHOUT_POSTGRESQL=1" BOTAN: "-DWITHOUT_BOTAN=1" - <<: *fedora_build # ## Test jobs # -.template:basic_test: &basic_test +.basic_test: + extends: .sources_changed stage: test tags: - docker @@ -115,14 +125,15 @@ build:no_db_botan: - make e2e -j$(nproc || echo 1) test:debian: + extends: .basic_test image: docker.louiz.org/louiz/biboumi/test-debian:latest - <<: *basic_test dependencies: - build:debian + needs: ["build:debian"] test:fedora: + extends: .basic_test image: docker.louiz.org/louiz/biboumi/test-fedora:latest - <<: *basic_test script: - cd build/ - make coverage_check -j$(nproc || echo 1) @@ -130,6 +141,7 @@ test:fedora: - make coverage dependencies: - build:fedora + needs: ["build:fedora"] artifacts: expire_in: 2 weeks paths: @@ -141,16 +153,18 @@ test:fedora: name: $CI_PROJECT_NAME-test-$CI_JOB_ID test:no_udns: + extends: .basic_test image: docker.louiz.org/louiz/biboumi/test-fedora:latest - <<: *basic_test dependencies: - build:no_udns + needs: ["build:no_udns"] test:alpine: + extends: .basic_test image: docker.louiz.org/louiz/biboumi/test-alpine:latest - <<: *basic_test dependencies: - build:alpine + needs: ["build:alpine"] image: docker.louiz.org/louiz/biboumi/test-alpine:latest test:freebsd: @@ -169,6 +183,7 @@ test:freebsd: - make check - make e2e dependencies: [] + needs: [] # ## Packaging jobs @@ -241,53 +256,82 @@ packaging:archlinux: # Deploy jobs # -deploy_doc: +.doc_changed: + only: + changes: + - "CMakeLists.txt" + - ".gitlab-ci.yml" + - "doc/**/*" + +# The jobs with the secure tag need to access directories where important +# files are stored: the latest doc, etc.' +# Other jobs can not access these, otherwise anybody doing a merge request +# could delete the official doc +.deploy:doc: + extends: .doc_changed stage: deploy + image: docker.louiz.org/louiz/biboumi/doc-builder + script: + - cd doc/ + - make html + - rm -rf /www/$DOC_DEPLOY_DIR + - mv _build/html /www/$DOC_DEPLOY_DIR + dependencies: [] + +deploy:doc:latest: + extends: .deploy:doc only: - master@louiz/biboumi tags: - www + - secure environment: name: doc.latest url: https://doc.biboumi.louiz.org - image: docker.louiz.org/louiz/biboumi/doc-builder - script: - - cd doc/ - - make html - - rm -rf /www/latest - - mv _build/html /www/latest - dependencies: [] + variables: + DOC_DEPLOY_DIR: "latest" -deploy_doc_tag: - stage: deploy +deploy:doc:tag: + extends: .deploy:doc only: - - tags@louiz/biboumi + - tags tags: - www + - secure environment: name: doc.$CI_COMMIT_TAG url: https://doc.biboumi.louiz.org/$CI_COMMIT_TAG/ - on_stop: undeploy_doc_tag - image: docker.louiz.org/louiz/biboumi/doc-builder - script: - - cd doc/ - - make html - - mv _build/html /www/$CI_COMMIT_TAG - dependencies: [] + variables: + DOC_DEPLOY_DIR: $CI_COMMIT_TAG -undeploy_doc_tag: - stage: deploy +deploy:doc:mr: + extends: .deploy:doc only: - - tags@testing/biboumi + - merge_requests + tags: + - www + - unsecure + environment: + name: doc.mr.$CI_MERGE_REQUEST_ID + url: https://doc.biboumi.louiz.org/mr/$CI_MERGE_REQUEST_ID/ + on_stop: undeploy:doc:mr + variables: + DOC_DEPLOY_DIR: $CI_MERGE_REQUEST_ID + +undeploy:doc:mr: + stage: deploy tags: - www + - unsecure + only: + - merge_requests + image: docker.louiz.org/louiz/biboumi/doc-builder variables: GIT_STRATEGY: none + when: manual environment: - name: doc.$CI_COMMIT_TAG + name: doc.mr.$CI_MERGE_REQUEST_ID action: stop - image: docker.louiz.org/louiz/biboumi/doc-builder script: - - rm -rf /www/$CI_COMMIT_TAG - when: manual + - rm -rf /www/$CI_MERGE_REQUEST_ID dependencies: [] diff --git a/doc/admin.rst b/doc/admin.rst index a5850a73626ee243d6230eb676f252feaf8b98e4..39030b269b18c30f3f57fed0ba4c08764bbc147d 100644 --- a/doc/admin.rst +++ b/doc/admin.rst @@ -2,6 +2,8 @@ Administrator documentation ########################### +L’admin est un con + Usage ===== diff --git a/doc/index.rst b/doc/index.rst index b97c8fd135d8b0b60cc1c75520f6fefb0d949697..eec6d3eac934f33b411d4c2593c0d396e671337d 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -8,6 +8,8 @@ Biboumi – XMPP gateway to IRC Homepage: https://biboumi.louiz.org +MRed, allo?, oui ? + Forge: https://lab.louiz.org/louiz/biboumi Biboumi is an XMPP gateway that connects to IRC servers and translates