Compare commits

..

68 commits

Author SHA1 Message Date
Vincent BRIDIER
4d19fa9b7f Merge branch 'develop' into 'main'
feat: Add PHP 8.5 TAG VAR

See merge request ldc-web/shared-ci!29
2026-08-24 12:49:00 +02:00
Vincent BRIDIER
e071a603f6 feat: Add PHP 8.5 TAG VAR 2026-08-24 12:48:47 +02:00
Vincent BRIDIER
fedde1e0a8 Merge branch 'develop' into 'main'
Tmp disable kaniko cache

See merge request ldc-web/shared-ci!28
2026-08-21 16:19:20 +02:00
Vincent BRIDIER
fa814e8d55 Tmp disable kaniko cache 2026-08-21 16:19:05 +02:00
Vincent BRIDIER
6606eb89e7 Merge branch 'develop' into 'main'
feat: Add gitlab token for composer audit

See merge request ldc-web/shared-ci!27
2026-08-21 15:21:01 +02:00
Vincent BRIDIER
b9c76afa6d feat: Add gitlab token for composer audit 2026-08-21 15:19:30 +02:00
Vincent BRIDIER
a75ff7e880 Merge branch 'develop' into 'main'
Develop

See merge request ldc-web/shared-ci!26
2026-08-21 12:37:47 +02:00
Vincent BRIDIER
8adc82419f feat: Remove 8.5 QA Image deps 2026-08-21 12:37:08 +02:00
Vincent BRIDIER
494539a2e3 Merge branch 'develop' of lab.s-web.fr:ldc-web/shared-ci into develop 2026-08-21 11:40:22 +02:00
Vincent BRIDIER
2bf7556e36 Merge branch 'develop' into 'main'
Develop

See merge request ldc-web/shared-ci!25
2026-08-03 11:48:36 +02:00
Vincent BRIDIER
9742e761c6 Merge branch 'addRector-new' into 'develop'
config rector for CI

See merge request ldc-web/shared-ci!24
2026-08-03 11:48:19 +02:00
Abdel LAMRANI
396d5761db Merge branch 'develop' of lab.s-web.fr:ldc-web/shared-ci into addRector-new 2026-08-03 11:34:57 +02:00
Vincent BRIDIER
bdfdf9e5e7 Merge branch 'customRef' into 'develop'
add params for phpStan

See merge request ldc-web/shared-ci!22
2026-08-03 11:21:53 +02:00
Abdel LAMRANI
384b4da9ad feat: make Larastan bootstrap for phpstan and configurable via inputs 2026-08-03 11:08:11 +02:00
Abdel LAMRANI
e951b5a2c2 config rector for CI 2026-08-03 11:01:31 +02:00
Vincent BRIDIER
9d4a029160 Merge branch 'bump-node' into 'main'
ci: bump node to 24 LTS

See merge request ldc-web/shared-ci!21
2026-05-11 08:51:34 +00:00
Jeremy Munsch
afd9b33c1a
ci: bump node to 24 LTS 2026-05-11 10:48:38 +02:00
Vincent BRIDIER
1dae191892 Merge branch 'fix-gl-npm-registry-config' into 'main'
Fixes #8 ci: fix uswil npm registry

Closes #8

See merge request ldc-web/shared-ci!20
2026-05-11 08:36:13 +00:00
Jeremy Munsch
1594e75961
ci: fix uswil npm registry 2026-05-07 15:26:04 +02:00
Noix
25270cf2a5 Merge branch 'develop' into 'main'
Update composer7.3.yml

See merge request ldc-web/shared-ci!19
2026-04-21 10:48:26 +00:00
Noix
647b49831f Update composer7.3.yml 2026-04-21 10:48:14 +00:00
Noix
a2646d700a Merge branch 'develop' into 'main'
Update composer7.3.yml - Used composer latest version

See merge request ldc-web/shared-ci!18
2026-04-21 10:42:52 +00:00
Noix
d119c9dde6 Update composer7.3.yml - Used composer latest version 2026-04-21 10:42:42 +00:00
Noix
ad05da74ab Merge branch 'develop' into 'main'
Update composer7.3.yml - try to replace ldcweb image with php image

See merge request ldc-web/shared-ci!17
2026-04-20 10:12:10 +00:00
Noix
2e9110839c Update composer7.3.yml - try to replace ldcweb image with php image 2026-04-20 10:11:58 +00:00
Noix
a9cbc35796 Merge branch 'develop' into 'main'
Allow failure in composer7.3.yml (too old ....)

See merge request ldc-web/shared-ci!16
2026-04-20 09:28:37 +00:00
Noix
cdf3fc956e Allow failure in composer7.3.yml (too old ....) 2026-04-20 09:28:19 +00:00
Noix
772b5f3535 Merge branch 'develop' into 'main'
ci: 👷 Make 7.3 great again

See merge request ldc-web/shared-ci!15
2026-04-16 14:40:12 +00:00
Noix
b1e7bec849 Merge branch 'make-7.3-great-again' into 'develop'
ci: 👷 Make 7.3 great again

See merge request ldc-web/shared-ci!14
2026-04-16 14:38:55 +00:00
Noah Lancien
62dd61d007 ci: 👷 Make 7
.3 great again
2026-04-16 16:36:49 +02:00
Vincent BRIDIER
ae9e7adb89 Merge branch 'develop' into 'main'
Develop

See merge request ldc-web/shared-ci!13
2026-04-08 07:18:34 +00:00
Vincent BRIDIER
8c0115a5e4 Bump to PHP8.5 2026-04-08 07:18:15 +00:00
Vincent BRIDIER
7bdda5445a Bump to PHP8.5 2026-04-08 07:17:58 +00:00
Vincent BRIDIER
619249d8c4 Bump to PHP8.5 2026-04-08 07:17:26 +00:00
Vincent BRIDIER
41e7fd2b3e Bump to PHP8.5 2026-04-08 07:17:06 +00:00
Vincent BRIDIER
8b813bbd1f Merge branch 'develop' into 'main'
Develop

See merge request ldc-web/shared-ci!12
2026-04-07 15:10:41 +00:00
Vincent BRIDIER
2617138e84 Update stylelint.yml 2026-04-07 15:10:30 +00:00
Vincent BRIDIER
49d0055be1 Update eslint.yml 2026-04-07 15:08:56 +00:00
Vincent BRIDIER
5b03768d21 Merge branch 'vincent.bridier-main-patch-16835' into 'main'
Update eslint.yml

See merge request ldc-web/shared-ci!11
2026-04-07 11:14:23 +00:00
Vincent BRIDIER
48101ac07a Update eslint.yml 2026-04-07 11:14:01 +00:00
Vincent BRIDIER
762323d645 Merge branch 'develop' into 'main'
Develop

See merge request ldc-web/shared-ci!10
2025-09-30 15:21:57 +00:00
Vincent BRIDIER
d4541d8c51 Merge branch 'added-docker-multistage-bedrock-missing-variables' into 'develop'
Added docker multostage for Bedrock (ACF variables)

See merge request ldc-web/shared-ci!9
2025-09-30 15:21:26 +00:00
noah.lancien
3d7cf89a2f Added docker multostage for Bedrock (ACF variables) 2025-09-30 14:50:35 +00:00
Louis Rossignol
2077795637 Merge branch 'develop' into 'main'
Develop

See merge request ldc-web/shared-ci!8
2025-09-29 14:28:08 +00:00
Guillaume Marsay
aa210160db Merge branch 'add-staging-ressources-file' into 'develop'
Update CI for kubernetes staging, add staging-resources file

See merge request ldc-web/shared-ci!7
2025-09-26 13:38:46 +00:00
LOR
74ed18852a Update CI for kubernetes staging, add staging-resources file 2025-09-26 15:15:40 +02:00
noah.lancien
ee19be6dd3 Added composer bedrock for php 8.3 2025-09-12 11:08:35 +00:00
Vincent BRIDIER
cf8f8560d2 feat: bump 7.3 qa image tag 2025-08-06 07:41:17 +00:00
Vincent BRIDIER
2e0a17df49 Bump to PHP 8.4 2025-06-17 13:21:39 +00:00
Vincent BRIDIER
6bb6d39f9c Update eslint.yml bump node version to 20 2025-04-28 14:01:50 +00:00
Vincent BRIDIER
4a40c2a8f1 Update phpstan.yml with PHP8.3 QA image 2025-04-28 13:53:31 +00:00
Vincent BRIDIER
5af11a522e feat: Remove manual build from docker multistage 2025-02-24 16:17:54 +00:00
Vincent BRIDIER
0f393a153a Add cache for build 2024-11-14 10:04:48 +00:00
Vincent BRIDIER
35a30ce9af feat: Add docker-multistage yml 2024-10-23 12:20:19 +00:00
Vincent BRIDIER
a42eff5580 Bump from PHP 8.2 to 8.3 QA in CICD 2024-08-14 11:30:20 +00:00
noah.lancien
6e41653e80 Tmp remove review 2024-08-06 07:40:42 +00:00
Vincent BRIDIER
d00dc073ff TMP Remove MR or review things 2024-08-05 15:48:29 +00:00
Thibault Raquet
c27c80b48a Update kubernetes.yml 2024-07-09 12:12:20 +00:00
Thibault Raquet
766bc977b7 Merge branch 'update-shared-ci' into 'main'
update default cluster

See merge request ldc-web/shared-ci!6
2024-07-08 11:54:24 +00:00
thibault.raquet
10838a0ffa update default cluster 2024-07-04 17:43:06 +02:00
Thibault Raquet
6735bb6403 Update kubernetes.yml 2024-06-26 15:30:37 +00:00
Thibault Raquet
1683182234 Update kubernetes.yml 2024-06-26 13:26:42 +00:00
Louis Rossignol
7037483107 Merge branch 'add-certificate-manifest' into 'main'
add certificate

See merge request ldc-web/shared-ci!5
2024-06-26 13:17:22 +00:00
thibault.raquet
539269c8fd add certificate 2024-06-26 13:35:50 +02:00
Administrator
7bf789e472 Merge branch 'make-docker-build-manual' into 'main'
Make docker build manual

See merge request ldc-web/shared-ci!4
2024-05-06 13:35:15 +00:00
Administrator
bc032620a0 Make docker build manual 2024-05-06 13:35:15 +00:00
Administrator
6e4eb2124d Merge branch 'switch-k8s-context' into 'main'
Switch k8s context

See merge request ldc-web/shared-ci!3
2024-04-15 16:24:56 +00:00
Administrator
e67b4e4536 Switch k8s context 2024-04-15 16:24:55 +00:00
18 changed files with 302 additions and 73 deletions

View file

@ -0,0 +1,28 @@
composer-build:
stage: build
image: $CI_REGISTRY/ldc-web/projets/ldc-web-images-docker/ldcweb-qa-8.3:latest
before_script:
- composer config gitlab-token.lab.s-web.fr $CI_DEPLOY_USER $CI_DEPLOY_PASSWORD
- composer config http-basic.connect.advancedcustomfields.com $APP_ACF_USER $APP_ACF_PWD
cache:
paths:
- vendor/
- public/
script:
- composer install --no-dev --optimize-autoloader --classmap-authoritative
artifacts:
expose_as: 'composer-build'
paths:
- vendor
- public
allow_failure: false
dependencies:
- composer-security
needs:
- job: composer-security
optional: true
rules:
- if: $CI_COMMIT_BRANCH == "trunk" || $CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "main"
- if: $CI_COMMIT_TAG != null

View file

@ -24,6 +24,5 @@ composer-build:
- job: composer-security
optional: true
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH == "trunk" || $CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "main"
- if: $CI_COMMIT_TAG != null

View file

@ -1,24 +1,27 @@
composer-build:
stage: build
image: $CI_REGISTRY/ldc-web/projets/ldc-web-images-docker/ldcweb-qa-8.2:latest
before_script:
- composer config gitlab-token.lab.s-web.fr $CI_DEPLOY_USER $CI_DEPLOY_PASSWORD
image: composer:2.10
cache:
key:
files:
- composer.lock
paths:
- vendor/
policy: pull-push
before_script:
- composer config gitlab-token.lab.s-web.fr "${CI_DEPLOY_USER}" "${CI_DEPLOY_PASSWORD}"
script:
- composer install --no-dev --optimize-autoloader --classmap-authoritative --no-scripts
- composer install --ignore-platform-reqs --no-interaction --no-plugins --no-scripts --no-dev --prefer-dist
artifacts:
expose_as: 'vendor'
paths:
- vendor
allow_failure: false
paths:
- vendor/
expire_in: 1h
dependencies:
- composer-security
needs:
- job: composer-security
optional: true
allow_failure: false
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH == "trunk" || $CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "main"
- if: $CI_COMMIT_TAG != null
- if: $CI_COMMIT_TAG != null

View file

@ -1,24 +1,23 @@
composer-build:
stage: build
image: $CI_REGISTRY/ldc-web/projets/ldc-web-images-docker/ldcweb-qa:php7.3-1.0
image: composer:2.9.7
before_script:
- composer config gitlab-token.lab.s-web.fr $CI_DEPLOY_USER $CI_DEPLOY_PASSWORD
cache:
paths:
- vendor/
script:
- composer install --no-dev --optimize-autoloader --classmap-authoritative --no-scripts
- composer install --no-dev --optimize-autoloader --classmap-authoritative --no-scripts --ignore-platform-reqs
artifacts:
expose_as: 'vendor'
paths:
- vendor
allow_failure: false
allow_failure: true
dependencies:
- composer-security
needs:
- job: composer-security
optional: true
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH == "trunk" || $CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "main"
- if: $CI_COMMIT_TAG != null
- if: $CI_COMMIT_TAG != null

View file

@ -0,0 +1,51 @@
.docker-build:
stage: build
image:
name: gcr.io/kaniko-project/executor:v1.23.2-debug
entrypoint: [""]
script:
- /kaniko/executor
--context "${CI_PROJECT_DIR}"
--build-arg "GITLAB_USER=${CI_DEPLOY_USER}"
--build-arg "GITLAB_PASSWORD=${CI_DEPLOY_PASSWORD}"
--build-arg "APP_ACF_USER=${APP_ACF_USER}"
--build-arg "APP_ACF_PWD=${APP_ACF_PWD}"
--dockerfile "${CI_PROJECT_DIR}/Dockerfile"
--destination "${IMAGE_TAG}"
--cache=true
--cache-ttl 24h
allow_failure: false
dependencies:
- composer-security
- npm-security
needs:
- job: composer-security
optional: true
- job: npm-security
optional: true
docker-build:staging:
extends: .docker-build
variables:
IMAGE_TAG: "${CI_REGISTRY_IMAGE}:s-${CI_COMMIT_SHA}"
rules:
- if: $CI_COMMIT_BRANCH == "trunk"
allow_failure: true
docker-build:latest:
extends: .docker-build
variables:
IMAGE_TAG: "${CI_REGISTRY_IMAGE}:p-${CI_COMMIT_SHA}"
rules:
- if: $CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "master"
allow_failure: true
docker-build:release:
extends: .docker-build
variables:
IMAGE_TAG: "${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG}"
rules:
- if: $CI_COMMIT_TAG != null
allow_failure: true

View file

@ -15,15 +15,6 @@
- job: composer-build
optional: true
docker-build:review:
extends: .docker-build
variables:
IMAGE_TAG: "${CI_REGISTRY_IMAGE}:review-${CI_MERGE_REQUEST_IID}"
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
docker-build:staging:
extends: .docker-build
variables:

View file

@ -0,0 +1,50 @@
.docker-build:
stage: build
image:
name: gcr.io/kaniko-project/executor:v1.23.2-debug
entrypoint: [""]
script:
- /kaniko/executor
--context "${CI_PROJECT_DIR}"
--build-arg "GITLAB_USER=${CI_DEPLOY_USER}"
--build-arg "GITLAB_PASSWORD=${CI_DEPLOY_PASSWORD}"
--build-arg "PHP_8_5_TAG=${PHP_8_5_TAG}"
--dockerfile "${CI_PROJECT_DIR}/Dockerfile"
--destination "${IMAGE_TAG}"
--cache=true
--cache-ttl 24h
allow_failure: false
dependencies:
- composer-security
- npm-security
needs:
- job: composer-security
optional: true
- job: npm-security
optional: true
docker-build:staging:
extends: .docker-build
variables:
IMAGE_TAG: "${CI_REGISTRY_IMAGE}:s-${CI_COMMIT_SHA}"
rules:
- if: $CI_COMMIT_BRANCH == "trunk"
allow_failure: true
docker-build:latest:
extends: .docker-build
variables:
IMAGE_TAG: "${CI_REGISTRY_IMAGE}:p-${CI_COMMIT_SHA}"
rules:
- if: $CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "master"
allow_failure: true
docker-build:release:
extends: .docker-build
variables:
IMAGE_TAG: "${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG}"
rules:
- if: $CI_COMMIT_TAG != null
allow_failure: true

View file

@ -18,21 +18,14 @@
- job: composer-build
optional: true
docker-build:review:
extends: .docker-build
variables:
IMAGE_TAG: "${CI_REGISTRY_IMAGE}:review-${CI_MERGE_REQUEST_IID}"
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
docker-build:staging:
extends: .docker-build
variables:
IMAGE_TAG: "${CI_REGISTRY_IMAGE}:s-${CI_COMMIT_SHA}"
rules:
- if: $CI_COMMIT_BRANCH == "trunk"
when: manual
allow_failure: true
docker-build:latest:
@ -41,6 +34,8 @@ docker-build:latest:
IMAGE_TAG: "${CI_REGISTRY_IMAGE}:p-${CI_COMMIT_SHA}"
rules:
- if: $CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "master"
when: manual
allow_failure: true
docker-build:release:
@ -48,4 +43,6 @@ docker-build:release:
variables:
IMAGE_TAG: "${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG}"
rules:
- if: $CI_COMMIT_TAG != null
- if: $CI_COMMIT_TAG != null
when: manual
allow_failure: true

View file

@ -1,9 +1,11 @@
npm-build:
stage: build
image: node:18
image: node:24
before_script:
- npm config set @ldc-web:registry https://${CI_SERVER_HOST}/api/v4/packages/npm/
- npm config set -- '//${CI_SERVER_HOST}/api/v4/packages/npm/:_authToken' "${CI_DEPLOY_PASSWORD}"
- npm config set @uwil:registry=https://lab.s-web.fr/api/v4/groups/ldc-web/-/packages/npm/
- npm config set -- '//${CI_SERVER_HOST}/api/v4/groups/ldc-web/-/packages/npm/:_authToken' "${CI_DEPLOY_PASSWORD}"
- npm install
cache:
paths:
@ -21,6 +23,5 @@ npm-build:
- job: npm-security
optional: true
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH == "trunk" || $CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "main"
- if: $CI_COMMIT_TAG != null

View file

@ -1,17 +1,21 @@
variables:
KUBERNETES_CLUSTER_NAME: prod-k8s-ldc-web
KUBERNETES_VERSION: 1.29.2
.kubernetes:
stage: deploy
image:
name: alpine/k8s:1.26.0
name: "alpine/k8s:${KUBERNETES_VERSION}"
entrypoint: ['']
variables:
KUBE_CONTEXT: ldc-web/cluster-k8s:k8s-ldc-web
KUBE_CONTEXT: "ldc-web/cluster-k8s:${KUBERNETES_CLUSTER_NAME}"
KUBE_NAMESPACE: default
CRT_TLS_NAME: "wildcard-k8s-ldc"
REDIRECT:
before_script:
- kubectl config use-context ${KUBE_CONTEXT}
script:
- envsubst < manifest.yaml
- kubectl delete --ignore-not-found=true --namespace ${KUBE_NAMESPACE} -f manifest.yaml
- kubectl apply --namespace ${KUBE_NAMESPACE} -f manifest.yaml
- envsubst < manifest.yaml | kubectl apply --namespace ${KUBE_NAMESPACE} -f -
.kubernetes_stop:
extends: .kubernetes
@ -22,29 +26,29 @@
action: stop
kubernetes:review:
extends: .kubernetes
variables:
KUBE_NAMESPACE: review
IMAGE_TAG: "${CI_REGISTRY_IMAGE}:review-${CI_MERGE_REQUEST_IID}"
needs:
- job: docker-build:review
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: manual
environment:
name: review/${CI_MERGE_REQUEST_IID}
url: https://${DOMAIN}
on_stop: kubernetes_stop:review
# kubernetes:review:
# extends: .kubernetes
# variables:
# KUBE_NAMESPACE: review
# IMAGE_TAG: "${CI_REGISTRY_IMAGE}:review-${CI_MERGE_REQUEST_IID}"
# needs:
# - job: docker-build:review
# rules:
# - if: $CI_PIPELINE_SOURCE == "merge_request_event"
# when: manual
# environment:
# name: review/${CI_MERGE_REQUEST_IID}
# url: https://${DOMAIN}
# on_stop: kubernetes_stop:review
kubernetes_stop:review:
extends: .kubernetes_stop
variables:
KUBE_NAMESPACE: review
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
environment:
name: review/${CI_MERGE_REQUEST_IID}
# kubernetes_stop:review:
# extends: .kubernetes_stop
# variables:
# KUBE_NAMESPACE: review
# rules:
# - if: $CI_PIPELINE_SOURCE == "merge_request_event"
# environment:
# name: review/${CI_MERGE_REQUEST_IID}
kubernetes:staging:
@ -56,6 +60,9 @@ kubernetes:staging:
- job: docker-build:staging
rules:
- if: $CI_COMMIT_BRANCH == "trunk"
script:
- envsubst < manifest.yaml | kubectl apply --namespace ${KUBE_NAMESPACE} -f -
- envsubst < staging-resources.yaml | kubectl apply --namespace ${KUBE_NAMESPACE} -f -
when: manual
environment:
name: staging
@ -77,10 +84,15 @@ kubernetes:prod:
variables:
KUBE_NAMESPACE: production
IMAGE_TAG: "${CI_REGISTRY_IMAGE}:p-${CI_COMMIT_SHA}"
CRT_TLS_NAME: "${APP_DOMAIN}"
REDIRECT: "www."
needs:
- job: docker-build:latest
rules:
- if: $CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "master"
script:
- envsubst < manifest.yaml | kubectl apply --namespace ${KUBE_NAMESPACE} -f -
- envsubst < production-resources.yaml | kubectl apply --namespace ${KUBE_NAMESPACE} -f -
when: manual
environment:
name: production

View file

@ -1,9 +1,11 @@
eslint:
stage: lint
image: node:18
image: node:24
before_script:
- npm config set @ldc-web:registry https://${CI_SERVER_HOST}/api/v4/packages/npm/
- npm config set -- '//${CI_SERVER_HOST}/api/v4/packages/npm/:_authToken' "${CI_DEPLOY_PASSWORD}"
- npm config set @uwil:registry=https://lab.s-web.fr/api/v4/groups/ldc-web/-/packages/npm/
- npm config set -- '//${CI_SERVER_HOST}/api/v4/groups/ldc-web/-/packages/npm/:_authToken' "${CI_DEPLOY_PASSWORD}"
- npm install
cache:
paths:

View file

@ -1,3 +1,22 @@
spec:
inputs:
larastan_bootstrap:
default: false
type: boolean
db_connection:
default: "sqlite"
db_database:
default: ":memory:"
cache_store:
default: "array"
session_driver:
default: "array"
enable_rector:
default: false
type: boolean
---
include:
- project: 'ldc-web/shared-ci'
ref: 'main'
@ -5,6 +24,17 @@ include:
- project: 'ldc-web/shared-ci'
ref: 'main'
file: 'lint/phpstan.yml'
inputs:
larastan_bootstrap: $[[ inputs.larastan_bootstrap ]]
db_connection: $[[ inputs.db_connection ]]
db_database: $[[ inputs.db_database ]]
cache_store: $[[ inputs.cache_store ]]
session_driver: $[[ inputs.session_driver ]]
- project: "ldc-web/shared-ci"
ref: "main"
file: "lint/rector.yml"
inputs:
enable_rector: $[[ inputs.enable_rector ]]
- project: 'ldc-web/shared-ci'
ref: 'main'
file: 'lint/eslint.yml'

View file

@ -1,6 +1,6 @@
phpcs:
stage: lint
image: $CI_REGISTRY/ldc-web/projets/ldc-web-images-docker/ldcweb-qa-8.2:latest
image: composer:2.10
before_script:
- composer config gitlab-token.lab.s-web.fr $CI_DEPLOY_USER $CI_DEPLOY_PASSWORD
- composer install --no-scripts

View file

@ -1,9 +1,40 @@
spec:
inputs:
larastan_bootstrap:
default: false
type: boolean
db_connection:
default: "sqlite"
db_database:
default: ":memory:"
cache_store:
default: "array"
session_driver:
default: "array"
---
phpstan:
stage: lint
image: $CI_REGISTRY/ldc-web/projets/ldc-web-images-docker/ldcweb-qa-8.2:latest
image: composer:2.10
cache:
key: phpstan-cache-${CI_COMMIT_REF_SLUG}
paths:
- vendor/
- .phpstan-cache/
variables:
DB_CONNECTION: "$[[ inputs.db_connection ]]"
DB_DATABASE: "$[[ inputs.db_database ]]"
CACHE_STORE: "$[[ inputs.cache_store ]]"
SESSION_DRIVER: "$[[ inputs.session_driver ]]"
before_script:
- composer config gitlab-token.lab.s-web.fr $CI_DEPLOY_USER $CI_DEPLOY_PASSWORD
- composer install --no-scripts
- composer install --no-scripts --no-interaction
- |
if [ "$[[ inputs.larastan_bootstrap ]]" = "true" ]; then
cp .env.example .env
php artisan key:generate
fi
script:
- vendor/bin/phpstan --error-format=junit > phpstan-report.xml
artifacts:

31
lint/rector.yml Normal file
View file

@ -0,0 +1,31 @@
spec:
inputs:
enable_rector:
default: false
type: boolean
---
rector:
stage: lint
image: composer:2.10
cache:
key: rector-cache-$CI_COMMIT_REF_SLUG
paths:
- vendor/
- .rector-cache/
before_script:
- composer config gitlab-token.lab.s-web.fr $CI_DEPLOY_USER $CI_DEPLOY_PASSWORD
- composer install --no-scripts --no-interaction
script:
- vendor/bin/rector process --dry-run --no-progress-bar --output-format=junit > rector-report.xml
artifacts:
when: always
expose_as: 'rector'
paths:
- rector-report.xml
reports:
junit: rector-report.xml
allow_failure: true
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && "$[[ inputs.enable_rector ]]" == "true"'

View file

@ -1,9 +1,11 @@
stylelint:
stage: lint
image: node:18
image: node:24
before_script:
- npm config set @ldc-web:registry https://${CI_SERVER_HOST}/api/v4/packages/npm/
- npm config set -- '//${CI_SERVER_HOST}/api/v4/packages/npm/:_authToken' "${CI_DEPLOY_PASSWORD}"
- npm config set @uwil:registry=https://lab.s-web.fr/api/v4/groups/ldc-web/-/packages/npm/
- npm config set -- '//${CI_SERVER_HOST}/api/v4/groups/ldc-web/-/packages/npm/:_authToken' "${CI_DEPLOY_PASSWORD}"
- npm install
cache:
paths:
@ -18,4 +20,4 @@ stylelint:
allow_failure: false
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH == "develop"
- if: $CI_COMMIT_BRANCH == "develop"

View file

@ -1,8 +1,10 @@
composer-security:
stage: security
image: $CI_REGISTRY/ldc-web/projets/ldc-web-images-docker/ldcweb-qa-8.2:latest
image: composer:2.10
before_script:
- composer config gitlab-token.lab.s-web.fr $CI_DEPLOY_USER $CI_DEPLOY_PASSWORD
script:
- local-php-security-checker --format=json --path=./composer.lock > composer-security-checker-report.json
- composer audit --locked --format=json > composer-security-checker-report.json || true
artifacts:
when: on_failure
expose_as: 'composer-security-checker'

View file

@ -1,6 +1,6 @@
npm-security:
stage: security
image: node:17.9.1
image: node:24
before_script:
- npm install --location=global audit-ci@^6
script: