ci: use shared variables anchors
Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2282>
This commit is contained in:
parent
ec6293b994
commit
0b5b6e876e
|
@ -4,6 +4,13 @@ variables:
|
||||||
|
|
||||||
PIP_CACHE_DIR: $CI_PROJECT_DIR/.cache/pip
|
PIP_CACHE_DIR: $CI_PROJECT_DIR/.cache/pip
|
||||||
|
|
||||||
|
.shared_variables:
|
||||||
|
# Keep the git files permissions during job setup
|
||||||
|
keep_git_files_permissions: &keep_git_files_permissions
|
||||||
|
GIT_STRATEGY: clone
|
||||||
|
GIT_DEPTH: "5"
|
||||||
|
FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR: "true"
|
||||||
|
|
||||||
workflow:
|
workflow:
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||||
|
@ -315,10 +322,7 @@ build_front:
|
||||||
stage: build
|
stage: build
|
||||||
image: node:18-alpine
|
image: node:18-alpine
|
||||||
variables:
|
variables:
|
||||||
# Keep the git files attributes during job setup
|
<<: *keep_git_files_permissions
|
||||||
GIT_STRATEGY: clone
|
|
||||||
GIT_DEPTH: "5"
|
|
||||||
FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR: "true"
|
|
||||||
before_script:
|
before_script:
|
||||||
- apk add --no-cache jq bash coreutils python3
|
- apk add --no-cache jq bash coreutils python3
|
||||||
- cd front
|
- cd front
|
||||||
|
@ -342,10 +346,7 @@ build_api:
|
||||||
stage: build
|
stage: build
|
||||||
image: bash
|
image: bash
|
||||||
variables:
|
variables:
|
||||||
# Keep the git files attributes during job setup
|
<<: *keep_git_files_permissions
|
||||||
GIT_STRATEGY: clone
|
|
||||||
GIT_DEPTH: "5"
|
|
||||||
FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR: "true"
|
|
||||||
script:
|
script:
|
||||||
- rm -rf api/tests
|
- rm -rf api/tests
|
||||||
- >
|
- >
|
||||||
|
@ -385,6 +386,8 @@ deploy_documentation:
|
||||||
matrix:
|
matrix:
|
||||||
- COMPONENT: ["api", "front"]
|
- COMPONENT: ["api", "front"]
|
||||||
variables:
|
variables:
|
||||||
|
<<: *keep_git_files_permissions
|
||||||
|
|
||||||
IMAGE_NAME: funkwhale/$COMPONENT
|
IMAGE_NAME: funkwhale/$COMPONENT
|
||||||
IMAGE: $IMAGE_NAME:$CI_COMMIT_REF_NAME
|
IMAGE: $IMAGE_NAME:$CI_COMMIT_REF_NAME
|
||||||
IMAGE_LATEST: $IMAGE_NAME:latest
|
IMAGE_LATEST: $IMAGE_NAME:latest
|
||||||
|
@ -393,8 +396,6 @@ deploy_documentation:
|
||||||
DOCKER_DRIVER: overlay2
|
DOCKER_DRIVER: overlay2
|
||||||
DOCKER_TLS_CERTDIR: ""
|
DOCKER_TLS_CERTDIR: ""
|
||||||
BUILD_PLATFORMS: linux/amd64,linux/arm64,linux/arm/v7
|
BUILD_PLATFORMS: linux/amd64,linux/arm64,linux/arm/v7
|
||||||
|
|
||||||
FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR: "true"
|
|
||||||
tags:
|
tags:
|
||||||
- multiarch
|
- multiarch
|
||||||
services:
|
services:
|
||||||
|
|
Loading…
Reference in New Issue