Compare commits
2 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7917b8acf4 | ||
|
|
fd31a5b152 |
27 changed files with 217 additions and 303 deletions
12
.editorconfig
Normal file
12
.editorconfig
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
end_of_line = lf
|
||||||
|
indent_size = 4
|
||||||
|
indent_style = space
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.{yml,yaml}]
|
||||||
|
indent_size = 2
|
||||||
10
build/build8.3.yml
Normal file
10
build/build8.3.yml
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
include:
|
||||||
|
- project: "ldc-web/shared-ci"
|
||||||
|
ref: "main"
|
||||||
|
file: "build/composer8.3.yml"
|
||||||
|
- project: "ldc-web/shared-ci"
|
||||||
|
ref: "main"
|
||||||
|
file: "build/npm.yml"
|
||||||
|
- project: "ldc-web/shared-ci"
|
||||||
|
ref: "main"
|
||||||
|
file: "build/docker.yml"
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
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
|
|
||||||
|
|
@ -24,5 +24,6 @@ composer-build:
|
||||||
- job: composer-security
|
- job: composer-security
|
||||||
optional: true
|
optional: true
|
||||||
rules:
|
rules:
|
||||||
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||||
- 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
|
||||||
28
build/composer-bedrock8.3.yml
Normal file
28
build/composer-bedrock8.3.yml
Normal 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_PIPELINE_SOURCE == "merge_request_event"
|
||||||
|
- if: $CI_COMMIT_BRANCH == "trunk" || $CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "main"
|
||||||
|
- if: $CI_COMMIT_TAG != null
|
||||||
|
|
@ -1,27 +1,24 @@
|
||||||
composer-build:
|
composer-build:
|
||||||
stage: build
|
stage: build
|
||||||
image: composer:2.10
|
image: $CI_REGISTRY/ldc-web/projets/ldc-web-images-docker/ldcweb-qa-8.2: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_PIPELINE_SOURCE == "merge_request_event"
|
||||||
- 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
|
||||||
|
|
@ -1,23 +1,24 @@
|
||||||
composer-build:
|
composer-build:
|
||||||
stage: build
|
stage: build
|
||||||
image: composer:2.9.7
|
image: $CI_REGISTRY/ldc-web/projets/ldc-web-images-docker/ldcweb-qa:php7.3-1.0
|
||||||
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
|
||||||
cache:
|
cache:
|
||||||
paths:
|
paths:
|
||||||
- vendor/
|
- vendor/
|
||||||
script:
|
script:
|
||||||
- composer install --no-dev --optimize-autoloader --classmap-authoritative --no-scripts --ignore-platform-reqs
|
- composer install --no-dev --optimize-autoloader --classmap-authoritative --no-scripts
|
||||||
artifacts:
|
artifacts:
|
||||||
expose_as: 'vendor'
|
expose_as: 'vendor'
|
||||||
paths:
|
paths:
|
||||||
- vendor
|
- vendor
|
||||||
allow_failure: true
|
allow_failure: false
|
||||||
dependencies:
|
dependencies:
|
||||||
- composer-security
|
- composer-security
|
||||||
needs:
|
needs:
|
||||||
- job: composer-security
|
- job: composer-security
|
||||||
optional: true
|
optional: true
|
||||||
rules:
|
rules:
|
||||||
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||||
- 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
|
||||||
24
build/composer8.3.yml
Normal file
24
build/composer8.3.yml
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
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
|
||||||
|
cache:
|
||||||
|
paths:
|
||||||
|
- vendor/
|
||||||
|
script:
|
||||||
|
- composer install --no-dev --optimize-autoloader --classmap-authoritative --no-scripts
|
||||||
|
artifacts:
|
||||||
|
expose_as: "vendor"
|
||||||
|
paths:
|
||||||
|
- vendor
|
||||||
|
allow_failure: false
|
||||||
|
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
|
||||||
|
|
@ -1,51 +0,0 @@
|
||||||
.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
|
|
||||||
|
|
@ -15,6 +15,15 @@
|
||||||
- job: composer-build
|
- job: composer-build
|
||||||
optional: true
|
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:
|
docker-build:staging:
|
||||||
extends: .docker-build
|
extends: .docker-build
|
||||||
variables:
|
variables:
|
||||||
|
|
|
||||||
|
|
@ -1,50 +0,0 @@
|
||||||
.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
|
|
||||||
|
|
@ -18,14 +18,21 @@
|
||||||
- job: composer-build
|
- job: composer-build
|
||||||
optional: true
|
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:
|
docker-build:staging:
|
||||||
extends: .docker-build
|
extends: .docker-build
|
||||||
variables:
|
variables:
|
||||||
IMAGE_TAG: "${CI_REGISTRY_IMAGE}:s-${CI_COMMIT_SHA}"
|
IMAGE_TAG: "${CI_REGISTRY_IMAGE}:s-${CI_COMMIT_SHA}"
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_BRANCH == "trunk"
|
- if: $CI_COMMIT_BRANCH == "trunk"
|
||||||
when: manual
|
|
||||||
allow_failure: true
|
|
||||||
|
|
||||||
|
|
||||||
docker-build:latest:
|
docker-build:latest:
|
||||||
|
|
@ -34,8 +41,6 @@ docker-build:latest:
|
||||||
IMAGE_TAG: "${CI_REGISTRY_IMAGE}:p-${CI_COMMIT_SHA}"
|
IMAGE_TAG: "${CI_REGISTRY_IMAGE}:p-${CI_COMMIT_SHA}"
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "master"
|
- if: $CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "master"
|
||||||
when: manual
|
|
||||||
allow_failure: true
|
|
||||||
|
|
||||||
|
|
||||||
docker-build:release:
|
docker-build:release:
|
||||||
|
|
@ -43,6 +48,4 @@ docker-build:release:
|
||||||
variables:
|
variables:
|
||||||
IMAGE_TAG: "${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG}"
|
IMAGE_TAG: "${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG}"
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_TAG != null
|
- if: $CI_COMMIT_TAG != null
|
||||||
when: manual
|
|
||||||
allow_failure: true
|
|
||||||
|
|
@ -1,11 +1,9 @@
|
||||||
npm-build:
|
npm-build:
|
||||||
stage: build
|
stage: build
|
||||||
image: node:24
|
image: node:18
|
||||||
before_script:
|
before_script:
|
||||||
- npm config set @ldc-web:registry https://${CI_SERVER_HOST}/api/v4/packages/npm/
|
- 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 -- '//${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
|
- npm install
|
||||||
cache:
|
cache:
|
||||||
paths:
|
paths:
|
||||||
|
|
@ -23,5 +21,6 @@ npm-build:
|
||||||
- job: npm-security
|
- job: npm-security
|
||||||
optional: true
|
optional: true
|
||||||
rules:
|
rules:
|
||||||
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||||
- 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
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,11 @@
|
||||||
variables:
|
|
||||||
KUBERNETES_CLUSTER_NAME: prod-k8s-ldc-web
|
|
||||||
KUBERNETES_VERSION: 1.29.2
|
|
||||||
|
|
||||||
.kubernetes:
|
.kubernetes:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
image:
|
image:
|
||||||
name: "alpine/k8s:${KUBERNETES_VERSION}"
|
name: alpine/k8s:1.26.0
|
||||||
entrypoint: ['']
|
entrypoint: ['']
|
||||||
variables:
|
variables:
|
||||||
KUBE_CONTEXT: "ldc-web/cluster-k8s:${KUBERNETES_CLUSTER_NAME}"
|
KUBE_CONTEXT: ldc-web/cluster-k8s:k8s-ldc-web
|
||||||
KUBE_NAMESPACE: default
|
KUBE_NAMESPACE: default
|
||||||
CRT_TLS_NAME: "wildcard-k8s-ldc"
|
|
||||||
REDIRECT:
|
|
||||||
before_script:
|
before_script:
|
||||||
- kubectl config use-context ${KUBE_CONTEXT}
|
- kubectl config use-context ${KUBE_CONTEXT}
|
||||||
script:
|
script:
|
||||||
|
|
@ -26,29 +20,29 @@ variables:
|
||||||
action: stop
|
action: stop
|
||||||
|
|
||||||
|
|
||||||
# kubernetes:review:
|
kubernetes:review:
|
||||||
# extends: .kubernetes
|
extends: .kubernetes
|
||||||
# variables:
|
variables:
|
||||||
# KUBE_NAMESPACE: review
|
KUBE_NAMESPACE: review
|
||||||
# IMAGE_TAG: "${CI_REGISTRY_IMAGE}:review-${CI_MERGE_REQUEST_IID}"
|
IMAGE_TAG: "${CI_REGISTRY_IMAGE}:review-${CI_MERGE_REQUEST_IID}"
|
||||||
# needs:
|
needs:
|
||||||
# - job: docker-build:review
|
- job: docker-build:review
|
||||||
# rules:
|
rules:
|
||||||
# - if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||||
# when: manual
|
when: manual
|
||||||
# environment:
|
environment:
|
||||||
# name: review/${CI_MERGE_REQUEST_IID}
|
name: review/${CI_MERGE_REQUEST_IID}
|
||||||
# url: https://${DOMAIN}
|
url: https://${DOMAIN}
|
||||||
# on_stop: kubernetes_stop:review
|
on_stop: kubernetes_stop:review
|
||||||
|
|
||||||
# kubernetes_stop:review:
|
kubernetes_stop:review:
|
||||||
# extends: .kubernetes_stop
|
extends: .kubernetes_stop
|
||||||
# variables:
|
variables:
|
||||||
# KUBE_NAMESPACE: review
|
KUBE_NAMESPACE: review
|
||||||
# rules:
|
rules:
|
||||||
# - if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||||
# environment:
|
environment:
|
||||||
# name: review/${CI_MERGE_REQUEST_IID}
|
name: review/${CI_MERGE_REQUEST_IID}
|
||||||
|
|
||||||
|
|
||||||
kubernetes:staging:
|
kubernetes:staging:
|
||||||
|
|
@ -60,9 +54,6 @@ kubernetes:staging:
|
||||||
- job: docker-build:staging
|
- job: docker-build:staging
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_BRANCH == "trunk"
|
- 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
|
when: manual
|
||||||
environment:
|
environment:
|
||||||
name: staging
|
name: staging
|
||||||
|
|
@ -84,15 +75,10 @@ kubernetes:prod:
|
||||||
variables:
|
variables:
|
||||||
KUBE_NAMESPACE: production
|
KUBE_NAMESPACE: production
|
||||||
IMAGE_TAG: "${CI_REGISTRY_IMAGE}:p-${CI_COMMIT_SHA}"
|
IMAGE_TAG: "${CI_REGISTRY_IMAGE}:p-${CI_COMMIT_SHA}"
|
||||||
CRT_TLS_NAME: "${APP_DOMAIN}"
|
|
||||||
REDIRECT: "www."
|
|
||||||
needs:
|
needs:
|
||||||
- job: docker-build:latest
|
- job: docker-build:latest
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "master"
|
- 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
|
when: manual
|
||||||
environment:
|
environment:
|
||||||
name: production
|
name: production
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,9 @@
|
||||||
eslint:
|
eslint:
|
||||||
stage: lint
|
stage: lint
|
||||||
image: node:24
|
image: node:18
|
||||||
before_script:
|
before_script:
|
||||||
- npm config set @ldc-web:registry https://${CI_SERVER_HOST}/api/v4/packages/npm/
|
- 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 -- '//${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
|
- npm install
|
||||||
cache:
|
cache:
|
||||||
paths:
|
paths:
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,3 @@
|
||||||
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:
|
include:
|
||||||
- project: 'ldc-web/shared-ci'
|
- project: 'ldc-web/shared-ci'
|
||||||
ref: 'main'
|
ref: 'main'
|
||||||
|
|
@ -24,17 +5,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"
|
|
||||||
ref: "main"
|
|
||||||
file: "lint/rector.yml"
|
|
||||||
inputs:
|
|
||||||
enable_rector: $[[ inputs.enable_rector ]]
|
|
||||||
- project: 'ldc-web/shared-ci'
|
- project: 'ldc-web/shared-ci'
|
||||||
ref: 'main'
|
ref: 'main'
|
||||||
file: 'lint/eslint.yml'
|
file: 'lint/eslint.yml'
|
||||||
|
|
|
||||||
13
lint/lint8.3.yml
Normal file
13
lint/lint8.3.yml
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
include:
|
||||||
|
- project: "ldc-web/shared-ci"
|
||||||
|
ref: "main"
|
||||||
|
file: "lint/phpcs8.3.yml"
|
||||||
|
- project: "ldc-web/shared-ci"
|
||||||
|
ref: "main"
|
||||||
|
file: "lint/phpstan8.3.yml"
|
||||||
|
- project: "ldc-web/shared-ci"
|
||||||
|
ref: "main"
|
||||||
|
file: "lint/eslint.yml"
|
||||||
|
- project: "ldc-web/shared-ci"
|
||||||
|
ref: "main"
|
||||||
|
file: "lint/stylelint.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/ldcweb-qa-8.2: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
|
||||||
|
|
|
||||||
18
lint/phpcs8.3.yml
Normal file
18
lint/phpcs8.3.yml
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
phpcs:
|
||||||
|
stage: lint
|
||||||
|
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 install --no-scripts
|
||||||
|
script:
|
||||||
|
- vendor/bin/phpcs --report=junit --report-file=phpcs-report.xml
|
||||||
|
artifacts:
|
||||||
|
when: on_failure
|
||||||
|
expose_as: "phpcs"
|
||||||
|
paths:
|
||||||
|
- phpcs-report.xml
|
||||||
|
reports:
|
||||||
|
junit: phpcs-report.xml
|
||||||
|
allow_failure: false
|
||||||
|
rules:
|
||||||
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||||
|
|
@ -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/ldcweb-qa-8.2: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:
|
||||||
|
|
|
||||||
18
lint/phpstan8.3.yml
Normal file
18
lint/phpstan8.3.yml
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
phpstan:
|
||||||
|
stage: lint
|
||||||
|
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 install --no-scripts
|
||||||
|
script:
|
||||||
|
- vendor/bin/phpstan --error-format=junit > phpstan-report.xml
|
||||||
|
artifacts:
|
||||||
|
when: on_failure
|
||||||
|
expose_as: "phpstan"
|
||||||
|
paths:
|
||||||
|
- phpstan-report.xml
|
||||||
|
reports:
|
||||||
|
junit: phpstan-report.xml
|
||||||
|
allow_failure: true
|
||||||
|
rules:
|
||||||
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||||
|
|
@ -1,31 +0,0 @@
|
||||||
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"'
|
|
||||||
|
|
@ -1,11 +1,9 @@
|
||||||
stylelint:
|
stylelint:
|
||||||
stage: lint
|
stage: lint
|
||||||
image: node:24
|
image: node:18
|
||||||
before_script:
|
before_script:
|
||||||
- npm config set @ldc-web:registry https://${CI_SERVER_HOST}/api/v4/packages/npm/
|
- 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 -- '//${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
|
- npm install
|
||||||
cache:
|
cache:
|
||||||
paths:
|
paths:
|
||||||
|
|
@ -20,4 +18,4 @@ stylelint:
|
||||||
allow_failure: false
|
allow_failure: false
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||||
- if: $CI_COMMIT_BRANCH == "develop"
|
- if: $CI_COMMIT_BRANCH == "develop"
|
||||||
|
|
@ -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/ldcweb-qa-8.2: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'
|
||||||
|
|
|
||||||
15
security/composer8.3.yml
Normal file
15
security/composer8.3.yml
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
composer-security:
|
||||||
|
stage: security
|
||||||
|
image: $CI_REGISTRY/ldc-web/projets/ldc-web-images-docker/ldcweb-qa:php8.3-latest
|
||||||
|
script:
|
||||||
|
- local-php-security-checker --format=json --path=./composer.lock > composer-security-checker-report.json
|
||||||
|
artifacts:
|
||||||
|
when: on_failure
|
||||||
|
expose_as: "composer-security-checker"
|
||||||
|
paths:
|
||||||
|
- composer-security-checker-report.json
|
||||||
|
allow_failure: 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
|
||||||
|
|
@ -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:
|
||||||
|
|
|
||||||
7
security/security8.3.yml
Normal file
7
security/security8.3.yml
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
include:
|
||||||
|
- project: "ldc-web/shared-ci"
|
||||||
|
ref: "main"
|
||||||
|
file: "security/composer8.3.yml"
|
||||||
|
- project: "ldc-web/shared-ci"
|
||||||
|
ref: "main"
|
||||||
|
file: "security/npm.yml"
|
||||||
Loading…
Add table
Reference in a new issue