Merge branch 'expire-artifacts' into 'develop'

GitLab CI support for default artifacts setting is broken

See merge request pleroma/pleroma!4385
This commit is contained in:
feld 2025-10-23 18:34:39 +00:00
commit 6942244bb1

View file

@ -1,9 +1,5 @@
image: git.pleroma.social:5050/pleroma/pleroma/ci-base:elixir-1.15.8-otp-26 image: git.pleroma.social:5050/pleroma/pleroma/ci-base:elixir-1.15.8-otp-26
default:
artifacts:
expire_in: 1 week
variables: &global_variables variables: &global_variables
# Only used for the release # Only used for the release
ELIXIR_VER: 1.17.3 ELIXIR_VER: 1.17.3
@ -23,6 +19,10 @@ workflow:
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
when: never when: never
# Default artifacts configuration
.default_artifacts: &default_artifacts
expire_in: 30 days
cache: &global_cache_policy cache: &global_cache_policy
key: $CI_JOB_IMAGE-$CI_COMMIT_SHORT_SHA key: $CI_JOB_IMAGE-$CI_COMMIT_SHORT_SHA
paths: paths:
@ -60,6 +60,7 @@ check-changelog:
before_script: '' before_script: ''
after_script: '' after_script: ''
cache: {} cache: {}
artifacts: *default_artifacts
script: script:
- apk add git - apk add git
- sh ./tools/check-changelog - sh ./tools/check-changelog
@ -75,6 +76,7 @@ check-changelog:
.using-ci-base: .using-ci-base:
tags: tags:
- amd64 - amd64
artifacts: *default_artifacts
build-1.15.8-otp-26: build-1.15.8-otp-26:
extends: extends:
@ -105,6 +107,7 @@ spec-build:
artifacts: artifacts:
paths: paths:
- spec.json - spec.json
expire_in: 42 years
script: script:
- mix pleroma.openapi_spec spec.json - mix pleroma.openapi_spec spec.json
@ -157,6 +160,7 @@ unit-testing-1.15.8-otp-26:
- su testuser -c "HOME=/home/testuser mix pleroma.test_runner --cover --preload-modules" - su testuser -c "HOME=/home/testuser mix pleroma.test_runner --cover --preload-modules"
coverage: '/^Line total: ([^ ]*%)$/' coverage: '/^Line total: ([^ ]*%)$/'
artifacts: artifacts:
expire_in: 30 days
reports: reports:
coverage_report: coverage_report:
coverage_format: cobertura coverage_format: cobertura
@ -175,6 +179,7 @@ unit-testing-1.18.3-otp-27:
formatting-1.15: formatting-1.15:
extends: .build_changes_policy extends: .build_changes_policy
artifacts: *default_artifacts
image: &formatting_elixir elixir:1.15-alpine image: &formatting_elixir elixir:1.15-alpine
stage: lint stage: lint
cache: *testing_cache_policy cache: *testing_cache_policy
@ -189,6 +194,7 @@ formatting-1.15:
cycles-1.15: cycles-1.15:
extends: .build_changes_policy extends: .build_changes_policy
artifacts: *default_artifacts
image: *formatting_elixir image: *formatting_elixir
stage: lint stage: lint
cache: {} cache: {}
@ -212,7 +218,7 @@ dialyzer:
- .using-ci-base - .using-ci-base
stage: lint stage: lint
allow_failure: true allow_failure: true
when: manual when: manual
cache: *testing_cache_policy cache: *testing_cache_policy
tags: tags:
- feld - feld
@ -221,6 +227,7 @@ dialyzer:
docs-deploy: docs-deploy:
stage: deploy stage: deploy
artifacts: *default_artifacts
cache: *testing_cache_policy cache: *testing_cache_policy
image: alpine:latest image: alpine:latest
only: only:
@ -245,6 +252,7 @@ review_app:
except: except:
- master - master
- develop - develop
artifacts: *default_artifacts
script: script:
- echo "$CI_ENVIRONMENT_SLUG" - echo "$CI_ENVIRONMENT_SLUG"
- mkdir -p ~/.ssh - mkdir -p ~/.ssh
@ -264,6 +272,7 @@ spec-deploy:
artifacts: artifacts:
paths: paths:
- spec.json - spec.json
expire_in: 30 days
only: only:
- develop@pleroma/pleroma - develop@pleroma/pleroma
image: alpine:latest image: alpine:latest
@ -276,6 +285,7 @@ spec-deploy:
stop_review_app: stop_review_app:
image: alpine:3.9 image: alpine:3.9
stage: deploy stage: deploy
artifacts: *default_artifacts
before_script: before_script:
- apk update && apk add openssh-client git - apk update && apk add openssh-client git
when: manual when: manual