diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 608aae14c..d0e172d57 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -77,7 +77,7 @@ stages: review_front: allow_failure: true stage: review - dependencies: [] + needs: [] rules: - if: $CI_PIPELINE_SOURCE == "merge_request_event" when: manual @@ -107,7 +107,7 @@ review_front: review_docs: allow_failure: true stage: review - dependencies: [] + needs: [] rules: - if: $CI_PIPELINE_SOURCE == "merge_request_event" changes: [docs/**/*] @@ -154,7 +154,7 @@ find_broken_links: require_changelog: stage: lint - dependencies: [] + needs: [] rules: # Don't run on merge request that mention NOCHANGELOG or renovate bot commits - if: > @@ -174,7 +174,7 @@ pre-commit: lint_api: allow_failure: true stage: lint - dependencies: [] + needs: [] rules: - if: $CI_COMMIT_BRANCH =~ /(stable|develop)/ - changes: [api/**/*] @@ -188,7 +188,7 @@ lint_api: lint_front: stage: lint - dependencies: [] + needs: [] rules: - if: $CI_COMMIT_BRANCH =~ /(stable|develop)/ - changes: [front/**/*] @@ -205,7 +205,8 @@ lint_front: test_api: retry: 1 stage: test - dependencies: [] + needs: + - job: lint_api rules: - if: $CI_COMMIT_BRANCH =~ /(stable|develop)/ - changes: [api/**/*] @@ -247,7 +248,8 @@ test_api: test_front: stage: test - dependencies: [] + needs: + - job: lint_front rules: # Disabled for now since no vitest dom emulation is providing # AudioContext, which is required for our HTML audio player @@ -268,7 +270,9 @@ test_front: build_api_schema: stage: build - dependencies: [] + needs: + - job: test_api + optional: true rules: - if: $CI_COMMIT_BRANCH =~ /(stable|develop)/ - changes: [api/**/*] @@ -300,7 +304,9 @@ build_api_schema: build_docs: stage: build - dependencies: [build_api_schema] + needs: + - job: build_api_schema + artifacts: true rules: - if: $CI_COMMIT_BRANCH =~ /(stable|develop)/ - changes: [docs/**/*] @@ -327,7 +333,14 @@ build_docs: build_front: stage: build - dependencies: [] + needs: + # The test_front job is currently disabled + # - job: test_front + - job: lint_front + optional: true + rules: + - if: $CI_COMMIT_BRANCH =~ /(stable|develop)/ + - changes: [front/**/*] image: $CI_REGISTRY/funkwhale/ci/node-python:18 variables: @@ -345,7 +358,12 @@ build_front: build_api: stage: build - dependencies: [] + needs: + - job: test_api + optional: true + rules: + - if: $CI_COMMIT_BRANCH =~ /(stable|develop)/ + - changes: [api/**/*] image: $CI_REGISTRY/funkwhale/ci/python:3.11 variables: @@ -365,7 +383,9 @@ deploy_docs: interruptible: false extends: .ssh-agent stage: publish - dependencies: [build_docs] + needs: + - job: build_docs + artifacts: true rules: - if: $CI_COMMIT_BRANCH == "stable" @@ -376,7 +396,11 @@ deploy_docs: .docker: interruptible: false stage: build - dependencies: [] + needs: + - job: test_api + optional: true + - job: test_front + optional: true image: $CI_REGISTRY/funkwhale/ci/docker parallel: