chore(ci): remove sonarqube and docker build stages

This commit is contained in:
Julien Calixte
2026-04-22 14:13:41 +02:00
parent f2bd71183f
commit 8f3496b07a

View File

@@ -1,12 +1,9 @@
stages: stages:
- validate - validate
- sonar
- test - test
- build
variables: variables:
DENO_VERSION: "2.6.4" DENO_VERSION: "2.6.4"
DOCKER_IMAGE_NAME: "$CI_REGISTRY/deeplite"
PORT: "8000" PORT: "8000"
# Global template for Deno jobs # Global template for Deno jobs
@@ -45,40 +42,6 @@ type:check:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"' - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: "$CI_COMMIT_BRANCH" - if: "$CI_COMMIT_BRANCH"
# ===== SONARQUBE STAGE =====
sonarqube:scan:
stage: sonar
image:
name: sonarsource/sonar-scanner-cli:latest
entrypoint: [""]
variables:
SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar"
GIT_DEPTH: "0"
cache:
key: "${CI_JOB_NAME}"
paths:
- .sonar/cache
script:
- |
sonar-scanner \
-Dsonar.host.url="${SONAR_HOST}" \
-Dsonar.token="${SONAR_TOKEN}" \
-Dsonar.projectKey="${CI_PROJECT_PATH_SLUG}" \
-Dsonar.projectName="${CI_PROJECT_NAME}" \
-Dsonar.projectVersion="${CI_COMMIT_SHORT_SHA}" \
-Dsonar.sources=src \
-Dsonar.sourceEncoding=UTF-8 \
-Dsonar.language=ts \
-Dsonar.exclusions="**/*.test.ts,**/test/**" \
-Dsonar.tests=src \
-Dsonar.test.inclusions="**/*.test.ts"
allow_failure: true
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH"
dependencies: []
# ===== TEST STAGE ===== # ===== TEST STAGE =====
integration:test: integration:test:
@@ -129,42 +92,3 @@ integration:test:
when: when:
- runner_system_failure - runner_system_failure
- stuck_or_timeout_failure - stuck_or_timeout_failure
# ===== BUILD & PUSH STAGE (Tags only) =====
docker:build-push:
stage: build
image: docker:29-dind
services:
- docker:29-dind
variables:
DOCKER_TLS_CERTDIR: "/certs"
before_script:
- docker info
- echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" --password-stdin "$CI_REGISTRY"
script:
- export VERSION=${CI_COMMIT_TAG#v}
- echo "Building and pushing Docker image version $VERSION"
- |
docker build \
--build-arg DENO_VERSION=${DENO_VERSION} \
--tag ${DOCKER_IMAGE_NAME}:${VERSION} \
--tag ${DOCKER_IMAGE_NAME}:${CI_COMMIT_SHA} \
--tag ${DOCKER_IMAGE_NAME}:latest \
.
- docker push ${DOCKER_IMAGE_NAME}:${VERSION}
- docker push ${DOCKER_IMAGE_NAME}:${CI_COMMIT_SHA}
- docker push ${DOCKER_IMAGE_NAME}:latest
- echo "Successfully pushed:"
- echo " - ${DOCKER_IMAGE_NAME}:${VERSION}"
- echo " - ${DOCKER_IMAGE_NAME}:${CI_COMMIT_SHA}"
- echo " - ${DOCKER_IMAGE_NAME}:latest"
rules:
- if: '$CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+$/'
retry:
max: 2
when:
- runner_system_failure