ci: explicit dependencies between jobs
Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2286>
This commit is contained in:
parent
2020952cd6
commit
d18d94bbc2
|
@ -77,6 +77,7 @@ stages:
|
||||||
review_front:
|
review_front:
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
stage: review
|
stage: review
|
||||||
|
dependencies: []
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||||
when: manual
|
when: manual
|
||||||
|
@ -106,6 +107,7 @@ review_front:
|
||||||
review_docs:
|
review_docs:
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
stage: review
|
stage: review
|
||||||
|
dependencies: []
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||||
changes: [docs/**/*]
|
changes: [docs/**/*]
|
||||||
|
@ -152,6 +154,7 @@ find_broken_links:
|
||||||
|
|
||||||
require_changelog:
|
require_changelog:
|
||||||
stage: lint
|
stage: lint
|
||||||
|
dependencies: []
|
||||||
rules:
|
rules:
|
||||||
# Don't run on merge request that mention NOCHANGELOG or renovate bot commits
|
# Don't run on merge request that mention NOCHANGELOG or renovate bot commits
|
||||||
- if: >
|
- if: >
|
||||||
|
@ -171,6 +174,7 @@ pre-commit:
|
||||||
lint_api:
|
lint_api:
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
stage: lint
|
stage: lint
|
||||||
|
dependencies: []
|
||||||
|
|
||||||
image: $CI_REGISTRY/funkwhale/ci/python-funkwhale-api:3.11
|
image: $CI_REGISTRY/funkwhale/ci/python-funkwhale-api:3.11
|
||||||
before_script:
|
before_script:
|
||||||
|
@ -181,6 +185,7 @@ lint_api:
|
||||||
|
|
||||||
lint_front:
|
lint_front:
|
||||||
stage: lint
|
stage: lint
|
||||||
|
dependencies: []
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_BRANCH =~ /(stable|develop)/
|
- if: $CI_COMMIT_BRANCH =~ /(stable|develop)/
|
||||||
- changes: [front/**/*]
|
- changes: [front/**/*]
|
||||||
|
@ -197,6 +202,7 @@ lint_front:
|
||||||
test_api:
|
test_api:
|
||||||
retry: 1
|
retry: 1
|
||||||
stage: test
|
stage: test
|
||||||
|
dependencies: []
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_BRANCH =~ /(stable|develop)/
|
- if: $CI_COMMIT_BRANCH =~ /(stable|develop)/
|
||||||
- changes: [api/**/*]
|
- changes: [api/**/*]
|
||||||
|
@ -238,6 +244,7 @@ test_api:
|
||||||
|
|
||||||
test_front:
|
test_front:
|
||||||
stage: test
|
stage: test
|
||||||
|
dependencies: []
|
||||||
rules:
|
rules:
|
||||||
# Disabled for now since no vitest dom emulation is providing
|
# Disabled for now since no vitest dom emulation is providing
|
||||||
# AudioContext, which is required for our HTML audio player
|
# AudioContext, which is required for our HTML audio player
|
||||||
|
@ -258,6 +265,7 @@ test_front:
|
||||||
|
|
||||||
build_api_schema:
|
build_api_schema:
|
||||||
stage: build
|
stage: build
|
||||||
|
dependencies: []
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_BRANCH =~ /(stable|develop)/
|
- if: $CI_COMMIT_BRANCH =~ /(stable|develop)/
|
||||||
- changes: [api/**/*]
|
- changes: [api/**/*]
|
||||||
|
@ -287,9 +295,7 @@ build_api_schema:
|
||||||
|
|
||||||
build_docs:
|
build_docs:
|
||||||
stage: build
|
stage: build
|
||||||
needs:
|
dependencies: [build_api_schema]
|
||||||
- job: build_api_schema
|
|
||||||
artifacts: true
|
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_BRANCH =~ /(stable|develop)/
|
- if: $CI_COMMIT_BRANCH =~ /(stable|develop)/
|
||||||
- changes: [docs/**/*]
|
- changes: [docs/**/*]
|
||||||
|
@ -316,6 +322,7 @@ build_docs:
|
||||||
|
|
||||||
build_front:
|
build_front:
|
||||||
stage: build
|
stage: build
|
||||||
|
dependencies: []
|
||||||
|
|
||||||
image: $CI_REGISTRY/funkwhale/ci/node-python:18
|
image: $CI_REGISTRY/funkwhale/ci/node-python:18
|
||||||
variables:
|
variables:
|
||||||
|
@ -333,6 +340,7 @@ build_front:
|
||||||
|
|
||||||
build_api:
|
build_api:
|
||||||
stage: build
|
stage: build
|
||||||
|
dependencies: []
|
||||||
|
|
||||||
image: $CI_REGISTRY/funkwhale/ci/python:3.11
|
image: $CI_REGISTRY/funkwhale/ci/python:3.11
|
||||||
variables:
|
variables:
|
||||||
|
@ -352,9 +360,7 @@ deploy_docs:
|
||||||
interruptible: false
|
interruptible: false
|
||||||
extends: .ssh-agent
|
extends: .ssh-agent
|
||||||
stage: publish
|
stage: publish
|
||||||
needs:
|
dependencies: [build_docs]
|
||||||
- job: build_docs
|
|
||||||
artifacts: true
|
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_BRANCH == "stable"
|
- if: $CI_COMMIT_BRANCH == "stable"
|
||||||
|
|
||||||
|
@ -365,6 +371,7 @@ deploy_docs:
|
||||||
.docker_publish:
|
.docker_publish:
|
||||||
interruptible: false
|
interruptible: false
|
||||||
stage: publish
|
stage: publish
|
||||||
|
dependencies: []
|
||||||
|
|
||||||
image: $CI_REGISTRY/funkwhale/ci/docker
|
image: $CI_REGISTRY/funkwhale/ci/docker
|
||||||
parallel:
|
parallel:
|
||||||
|
@ -387,6 +394,10 @@ deploy_docs:
|
||||||
- multiarch
|
- multiarch
|
||||||
before_script:
|
before_script:
|
||||||
- docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
|
- docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
|
||||||
|
- >
|
||||||
|
if [[ "$CI_COMMIT_REF_NAME" =~ ^develop|stable$ ]]; then
|
||||||
|
./scripts/set-api-build-metadata.sh $CI_COMMIT_SHORT_SHA;
|
||||||
|
fi
|
||||||
cache:
|
cache:
|
||||||
key: docker_public_${CI_COMMIT_REF_NAME}
|
key: docker_public_${CI_COMMIT_REF_NAME}
|
||||||
paths:
|
paths:
|
||||||
|
|
Loading…
Reference in New Issue