Compare commits
8 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
37a459a62e | ||
|
|
317d124f87 | ||
|
|
e88a796700 | ||
|
|
9a715e40f8 | ||
|
|
a24a24c082 | ||
|
|
a8021b40d8 | ||
|
|
e3635365bc | ||
|
|
35ce7d1376 |
8 changed files with 19 additions and 75 deletions
|
|
@ -1,27 +1,23 @@
|
||||||
composer-build:
|
composer-build:
|
||||||
stage: build
|
stage: build
|
||||||
image: composer:2.10
|
image: $CI_REGISTRY/ldc-web/projets/ldc-web-images-docker/uwil-qa-8.5:latest
|
||||||
cache:
|
|
||||||
key:
|
|
||||||
files:
|
|
||||||
- composer.lock
|
|
||||||
paths:
|
|
||||||
- vendor/
|
|
||||||
policy: pull-push
|
|
||||||
before_script:
|
before_script:
|
||||||
- composer config gitlab-token.lab.s-web.fr "${CI_DEPLOY_USER}" "${CI_DEPLOY_PASSWORD}"
|
- composer config gitlab-token.lab.s-web.fr $CI_DEPLOY_USER $CI_DEPLOY_PASSWORD
|
||||||
script:
|
cache:
|
||||||
- composer install --ignore-platform-reqs --no-interaction --no-plugins --no-scripts --no-dev --prefer-dist
|
|
||||||
artifacts:
|
|
||||||
paths:
|
paths:
|
||||||
- vendor/
|
- vendor/
|
||||||
expire_in: 1h
|
script:
|
||||||
|
- composer install --no-dev --optimize-autoloader --classmap-authoritative --no-scripts
|
||||||
|
artifacts:
|
||||||
|
expose_as: 'vendor'
|
||||||
|
paths:
|
||||||
|
- vendor
|
||||||
|
allow_failure: false
|
||||||
dependencies:
|
dependencies:
|
||||||
- composer-security
|
- composer-security
|
||||||
needs:
|
needs:
|
||||||
- job: composer-security
|
- job: composer-security
|
||||||
optional: true
|
optional: true
|
||||||
allow_failure: false
|
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_BRANCH == "trunk" || $CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "main"
|
- if: $CI_COMMIT_BRANCH == "trunk" || $CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "main"
|
||||||
- if: $CI_COMMIT_TAG != null
|
- if: $CI_COMMIT_TAG != null
|
||||||
|
|
@ -8,7 +8,6 @@
|
||||||
--context "${CI_PROJECT_DIR}"
|
--context "${CI_PROJECT_DIR}"
|
||||||
--build-arg "GITLAB_USER=${CI_DEPLOY_USER}"
|
--build-arg "GITLAB_USER=${CI_DEPLOY_USER}"
|
||||||
--build-arg "GITLAB_PASSWORD=${CI_DEPLOY_PASSWORD}"
|
--build-arg "GITLAB_PASSWORD=${CI_DEPLOY_PASSWORD}"
|
||||||
--build-arg "PHP_8_5_TAG=${PHP_8_5_TAG}"
|
|
||||||
--dockerfile "${CI_PROJECT_DIR}/Dockerfile"
|
--dockerfile "${CI_PROJECT_DIR}/Dockerfile"
|
||||||
--destination "${IMAGE_TAG}"
|
--destination "${IMAGE_TAG}"
|
||||||
--cache=true
|
--cache=true
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,5 @@
|
||||||
spec:
|
spec:
|
||||||
inputs:
|
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:
|
enable_rector:
|
||||||
default: false
|
default: false
|
||||||
type: boolean
|
type: boolean
|
||||||
|
|
@ -24,12 +13,6 @@ include:
|
||||||
- project: 'ldc-web/shared-ci'
|
- project: 'ldc-web/shared-ci'
|
||||||
ref: 'main'
|
ref: 'main'
|
||||||
file: 'lint/phpstan.yml'
|
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"
|
- project: "ldc-web/shared-ci"
|
||||||
ref: "main"
|
ref: "main"
|
||||||
file: "lint/rector.yml"
|
file: "lint/rector.yml"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
phpcs:
|
phpcs:
|
||||||
stage: lint
|
stage: lint
|
||||||
image: composer:2.10
|
image: $CI_REGISTRY/ldc-web/projets/ldc-web-images-docker/uwil-qa-8.5:latest
|
||||||
before_script:
|
before_script:
|
||||||
- composer config gitlab-token.lab.s-web.fr $CI_DEPLOY_USER $CI_DEPLOY_PASSWORD
|
- composer config gitlab-token.lab.s-web.fr $CI_DEPLOY_USER $CI_DEPLOY_PASSWORD
|
||||||
- composer install --no-scripts
|
- composer install --no-scripts
|
||||||
|
|
|
||||||
|
|
@ -1,40 +1,9 @@
|
||||||
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:
|
phpstan:
|
||||||
stage: lint
|
stage: lint
|
||||||
image: composer:2.10
|
image: $CI_REGISTRY/ldc-web/projets/ldc-web-images-docker/uwil-qa-8.5:latest
|
||||||
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:
|
before_script:
|
||||||
- composer config gitlab-token.lab.s-web.fr $CI_DEPLOY_USER $CI_DEPLOY_PASSWORD
|
- composer config gitlab-token.lab.s-web.fr $CI_DEPLOY_USER $CI_DEPLOY_PASSWORD
|
||||||
- composer install --no-scripts --no-interaction
|
- composer install --no-scripts
|
||||||
- |
|
|
||||||
if [ "$[[ inputs.larastan_bootstrap ]]" = "true" ]; then
|
|
||||||
cp .env.example .env
|
|
||||||
php artisan key:generate
|
|
||||||
fi
|
|
||||||
script:
|
script:
|
||||||
- vendor/bin/phpstan --error-format=junit > phpstan-report.xml
|
- vendor/bin/phpstan --error-format=junit > phpstan-report.xml
|
||||||
artifacts:
|
artifacts:
|
||||||
|
|
|
||||||
|
|
@ -8,15 +8,14 @@ spec:
|
||||||
|
|
||||||
rector:
|
rector:
|
||||||
stage: lint
|
stage: lint
|
||||||
image: composer:2.10
|
image: $CI_REGISTRY/ldc-web/projets/ldc-web-images-docker/uwil-qa-8.5:latest
|
||||||
cache:
|
cache:
|
||||||
key: rector-cache-$CI_COMMIT_REF_SLUG
|
key: rector-cache-$CI_COMMIT_REF_SLUG
|
||||||
paths:
|
paths:
|
||||||
- vendor/
|
|
||||||
- .rector-cache/
|
- .rector-cache/
|
||||||
before_script:
|
before_script:
|
||||||
- composer config gitlab-token.lab.s-web.fr $CI_DEPLOY_USER $CI_DEPLOY_PASSWORD
|
- composer config gitlab-token.lab.s-web.fr $CI_DEPLOY_USER $CI_DEPLOY_PASSWORD
|
||||||
- composer install --no-scripts --no-interaction
|
- composer install --no-scripts
|
||||||
script:
|
script:
|
||||||
- vendor/bin/rector process --dry-run --no-progress-bar --output-format=junit > rector-report.xml
|
- vendor/bin/rector process --dry-run --no-progress-bar --output-format=junit > rector-report.xml
|
||||||
artifacts:
|
artifacts:
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,8 @@
|
||||||
composer-security:
|
composer-security:
|
||||||
stage: security
|
stage: security
|
||||||
image: composer:2.10
|
image: $CI_REGISTRY/ldc-web/projets/ldc-web-images-docker/uwil-qa-8.5:latest
|
||||||
before_script:
|
|
||||||
- composer config gitlab-token.lab.s-web.fr $CI_DEPLOY_USER $CI_DEPLOY_PASSWORD
|
|
||||||
script:
|
script:
|
||||||
- composer audit --locked --format=json > composer-security-checker-report.json || true
|
- local-php-security-checker --format=json --path=./composer.lock > composer-security-checker-report.json
|
||||||
artifacts:
|
artifacts:
|
||||||
when: on_failure
|
when: on_failure
|
||||||
expose_as: 'composer-security-checker'
|
expose_as: 'composer-security-checker'
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
npm-security:
|
npm-security:
|
||||||
stage: security
|
stage: security
|
||||||
image: node:24
|
image: node:17.9.1
|
||||||
before_script:
|
before_script:
|
||||||
- npm install --location=global audit-ci@^6
|
- npm install --location=global audit-ci@^6
|
||||||
script:
|
script:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue