From 4d4409d69c587a8bf42cc1ef050c742bfab4d60c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Fri, 13 Sep 2019 08:57:08 +0200 Subject: [PATCH 01/12] ci: Only run the archlinux test on triggers --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a5a9af0..47e314f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -59,7 +59,7 @@ build:archlinux: <<: *basic_build only: - branches@louiz/biboumi - when: manual + - triggers tags: - armv7l artifacts: -- GitLab From d700aacf0b3a5de136cd99e613cf5778688ff934 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Fri, 13 Sep 2019 09:25:30 +0200 Subject: [PATCH 02/12] ci: Add "needs" in the test stage --- .gitlab-ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 47e314f..a55b483 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -119,6 +119,7 @@ test:debian: <<: *basic_test dependencies: - build:debian + needs: ["build:debian"] test:fedora: image: docker.louiz.org/louiz/biboumi/test-fedora:latest @@ -130,6 +131,7 @@ test:fedora: - make coverage dependencies: - build:fedora + needs: ["build:fedora"] artifacts: expire_in: 2 weeks paths: @@ -145,12 +147,14 @@ test:no_udns: <<: *basic_test dependencies: - build:no_udns + needs: ["build:no_udns"] test:alpine: 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 +173,7 @@ test:freebsd: - make check - make e2e dependencies: [] + needs: [] # ## Packaging jobs -- GitLab From 80d9453240c99d63c133b565c99fabd72d58fd94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Fri, 13 Sep 2019 09:40:55 +0200 Subject: [PATCH 03/12] ci: use the "extends" key instead of the ugly anchor syntax --- .gitlab-ci.yml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a55b483..1a073f9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,7 +23,7 @@ variables: ## Build jobs # -.template:basic_build: &basic_build +.basic_build: stage: build tags: - docker @@ -38,25 +38,25 @@ 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 - triggers @@ -66,46 +66,46 @@ build:archlinux: 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: stage: test tags: - docker @@ -115,15 +115,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) @@ -143,15 +143,15 @@ 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"] -- GitLab From cd2cf9af180f8d91daf68c8983d835e52da86b3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Fri, 13 Sep 2019 09:48:02 +0200 Subject: [PATCH 04/12] ci: only run the build and test jobs if sources changed --- .gitlab-ci.yml | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1a073f9..9a76938 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,7 +23,16 @@ variables: ## Build jobs # +.sources_changed: + only: + changes: + - "CMakeLists.txt" + - ".gitlab-ci.yml" + - "src/**/*" + - "tests/**/*" + .basic_build: + extends: .sources_changed stage: build tags: - docker @@ -106,6 +115,7 @@ build:no_db_botan: # .basic_test: + extends: .sources_changed stage: test tags: - docker @@ -246,10 +256,16 @@ packaging:archlinux: # Deploy jobs # +.doc_changed: + only: + changes: + - "CMakeLists.txt" + - ".gitlab-ci.yml" + - "doc/**/*" + deploy_doc: + extends: .doc_changed stage: deploy - only: - - master@louiz/biboumi tags: - www environment: @@ -264,9 +280,8 @@ deploy_doc: dependencies: [] deploy_doc_tag: + extends: .doc_changed stage: deploy - only: - - tags@louiz/biboumi tags: - www environment: @@ -282,8 +297,6 @@ deploy_doc_tag: undeploy_doc_tag: stage: deploy - only: - - tags@testing/biboumi tags: - www variables: -- GitLab From 80ab26251dc383f3162b5718cb25d16b188a921e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Fri, 13 Sep 2019 10:02:11 +0200 Subject: [PATCH 05/12] ci: Rename deploy jobs --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9a76938..c783e6a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -263,7 +263,7 @@ packaging:archlinux: - ".gitlab-ci.yml" - "doc/**/*" -deploy_doc: +deploy:doc:latest: extends: .doc_changed stage: deploy tags: @@ -279,7 +279,7 @@ deploy_doc: - mv _build/html /www/latest dependencies: [] -deploy_doc_tag: +deploy:doc:tag: extends: .doc_changed stage: deploy tags: @@ -295,7 +295,7 @@ deploy_doc_tag: - mv _build/html /www/$CI_COMMIT_TAG dependencies: [] -undeploy_doc_tag: +undeploy:doc:tag: stage: deploy tags: - www -- GitLab From bbcb3aba4c39d99ee084e0592eb18bc3217819ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Fri, 13 Sep 2019 19:04:28 +0200 Subject: [PATCH 06/12] ci: Add a job to deploy the doc for MRs --- .gitlab-ci.yml | 51 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c783e6a..1a360d0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -263,11 +263,18 @@ packaging:archlinux: - ".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:latest: extends: .doc_changed stage: deploy tags: - www + - secure + only: + - master@louiz/biboumi environment: name: doc.latest url: https://doc.biboumi.louiz.org @@ -282,23 +289,30 @@ deploy:doc:latest: deploy:doc:tag: extends: .doc_changed stage: deploy + only: + - tags tags: - www + - secure environment: name: doc.$CI_COMMIT_TAG url: https://doc.biboumi.louiz.org/$CI_COMMIT_TAG/ - on_stop: undeploy_doc_tag + on_stop: undeploy:doc:tag image: docker.louiz.org/louiz/biboumi/doc-builder script: - cd doc/ - make html + - rm -rf /www/$CI_COMMIT_TAG - mv _build/html /www/$CI_COMMIT_TAG dependencies: [] undeploy:doc:tag: stage: deploy + only: + - tags tags: - www + - secure variables: GIT_STRATEGY: none environment: @@ -309,3 +323,38 @@ undeploy:doc:tag: - rm -rf /www/$CI_COMMIT_TAG when: manual dependencies: [] + +deploy:doc:mr: + extends: .doc_changed + stage: deploy + only: + - merge_requests + tags: + - www + - unsecure + image: docker.louiz.org/louiz/biboumi/doc-builder + environment: + name: doc.mr.$CI_MERGE_REQUEST_ID + url: https://doc.biboumi.louiz.org/mr/$CI_MERGE_REQUEST_ID/ + on_stop: undeploy:doc:mr + script: + - echo Deploying to /www/merge_requests/$CI_MERGE_REQUEST_ID + dependencies: [] + +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.mr.$CI_MERGE_REQUEST_ID + action: stop + script: + - echo Deploying to /www/merge_requests/$CI_MERGE_REQUEST_ID + dependencies: [] -- GitLab From 126f947cdca63dc2bcfbcd43241bd9e1f72f578e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Fri, 13 Sep 2019 19:34:43 +0200 Subject: [PATCH 07/12] rm me --- .gitlab-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1a360d0..441adbd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -273,8 +273,6 @@ deploy:doc:latest: tags: - www - secure - only: - - master@louiz/biboumi environment: name: doc.latest url: https://doc.biboumi.louiz.org -- GitLab From e3411d44e8bd9b11b2e902800b444015ad67be2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Sun, 15 Sep 2019 20:57:19 +0200 Subject: [PATCH 08/12] meuh --- .gitlab-ci.yml | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 441adbd..d7f1b3b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -295,7 +295,6 @@ deploy:doc:tag: 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/ @@ -304,24 +303,6 @@ deploy:doc:tag: - mv _build/html /www/$CI_COMMIT_TAG dependencies: [] -undeploy:doc:tag: - stage: deploy - only: - - tags - tags: - - www - - secure - variables: - GIT_STRATEGY: none - environment: - name: doc.$CI_COMMIT_TAG - action: stop - image: docker.louiz.org/louiz/biboumi/doc-builder - script: - - rm -rf /www/$CI_COMMIT_TAG - when: manual - dependencies: [] - deploy:doc:mr: extends: .doc_changed stage: deploy @@ -336,7 +317,10 @@ deploy:doc:mr: url: https://doc.biboumi.louiz.org/mr/$CI_MERGE_REQUEST_ID/ on_stop: undeploy:doc:mr script: - - echo Deploying to /www/merge_requests/$CI_MERGE_REQUEST_ID + - cd doc/ + - make html + - rm -rf /www/merge_requests/$CI_MERGE_REQUEST_ID + - mv _build/html /www/merge_requests/$CI_MERGE_REQUEST_ID dependencies: [] undeploy:doc:mr: @@ -354,5 +338,5 @@ undeploy:doc:mr: name: doc.mr.$CI_MERGE_REQUEST_ID action: stop script: - - echo Deploying to /www/merge_requests/$CI_MERGE_REQUEST_ID + - rm -rf /www/merge_requests/$CI_MERGE_REQUEST_ID dependencies: [] -- GitLab From 06064f4146de986b36da2b084441493701f4035a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Sun, 15 Sep 2019 21:14:36 +0200 Subject: [PATCH 09/12] ci: refactor --- .gitlab-ci.yml | 49 ++++++++++++++++++++++--------------------------- 1 file changed, 22 insertions(+), 27 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d7f1b3b..eebc96f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -267,26 +267,32 @@ packaging:archlinux: # 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:latest: +.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: - extends: .doc_changed - stage: deploy + extends: .deploy:doc only: - tags tags: @@ -295,33 +301,22 @@ deploy:doc:tag: environment: name: doc.$CI_COMMIT_TAG url: https://doc.biboumi.louiz.org/$CI_COMMIT_TAG/ - image: docker.louiz.org/louiz/biboumi/doc-builder - script: - - cd doc/ - - make html - - rm -rf /www/$CI_COMMIT_TAG - - mv _build/html /www/$CI_COMMIT_TAG - dependencies: [] + variables: + DOC_DEPLOY_DIR: $CI_COMMIT_TAG deploy:doc:mr: - extends: .doc_changed - stage: deploy + extends: .deploy:doc only: - merge_requests tags: - www - unsecure - image: docker.louiz.org/louiz/biboumi/doc-builder environment: name: doc.mr.$CI_MERGE_REQUEST_ID url: https://doc.biboumi.louiz.org/mr/$CI_MERGE_REQUEST_ID/ on_stop: undeploy:doc:mr - script: - - cd doc/ - - make html - - rm -rf /www/merge_requests/$CI_MERGE_REQUEST_ID - - mv _build/html /www/merge_requests/$CI_MERGE_REQUEST_ID - dependencies: [] + variables: + DOC_DEPLOY_DIR: $CI_MERGE_REQUEST_ID undeploy:doc:mr: stage: deploy @@ -338,5 +333,5 @@ undeploy:doc:mr: name: doc.mr.$CI_MERGE_REQUEST_ID action: stop script: - - rm -rf /www/merge_requests/$CI_MERGE_REQUEST_ID + - rm -rf /www/$CI_MERGE_REQUEST_ID dependencies: [] -- GitLab From 4efc4465fb5e186616253f332a619d4f88593bdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Sun, 15 Sep 2019 21:01:11 +0200 Subject: [PATCH 10/12] ici --- doc/index.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/index.rst b/doc/index.rst index b97c8fd..007e0df 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? + Forge: https://lab.louiz.org/louiz/biboumi Biboumi is an XMPP gateway that connects to IRC servers and translates -- GitLab From 871f000e399350a7488677b75c02290542c08f35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Sun, 15 Sep 2019 21:20:12 +0200 Subject: [PATCH 11/12] oui --- doc/admin.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/admin.rst b/doc/admin.rst index a5850a7..39030b2 100644 --- a/doc/admin.rst +++ b/doc/admin.rst @@ -2,6 +2,8 @@ Administrator documentation ########################### +L’admin est un con + Usage ===== -- GitLab From f8d60a3e63f4b4de7ae7192f716e535c113d8dd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Sun, 15 Sep 2019 21:39:13 +0200 Subject: [PATCH 12/12] meuh --- doc/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/index.rst b/doc/index.rst index 007e0df..eec6d3e 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -8,7 +8,7 @@ Biboumi – XMPP gateway to IRC Homepage: https://biboumi.louiz.org -MRed, allo? +MRed, allo?, oui ? Forge: https://lab.louiz.org/louiz/biboumi -- GitLab