gitlab_ci_cd_documentation:cotrav-platform
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| gitlab_ci_cd_documentation:cotrav-platform [2026/03/30 10:57] – [.gitlab-ci.yml] raviraj | gitlab_ci_cd_documentation:cotrav-platform [2026/03/31 05:54] (current) – [Stage 1 — Test] raviraj | ||
|---|---|---|---|
| Line 1493: | Line 1493: | ||
| < | < | ||
| + | test-auth | ||
| </ | </ | ||
| - | |||
| - | test-auth | ||
| This stage runs automated tests before building the service. | This stage runs automated tests before building the service. | ||
| Line 1508: | Line 1507: | ||
| The job extends a reusable template: | The job extends a reusable template: | ||
| - | < | + | < |
| + | extends: .base_test_job | ||
| </ | </ | ||
| Line 1514: | Line 1514: | ||
| The runner used: | The runner used: | ||
| - | < | + | < |
| + | tags: | ||
| - docker-runner01 | - docker-runner01 | ||
| Line 1520: | Line 1521: | ||
| ---- | ---- | ||
| + | |||
| ====== 4. Stage 2 — Build ====== | ====== 4. Stage 2 — Build ====== | ||
| Line 1809: | Line 1811: | ||
| < | < | ||
| - | |||
| Cotrav_Services | Cotrav_Services | ||
| │ | │ | ||
| Line 1827: | Line 1828: | ||
| Tools used: | Tools used: | ||
| + | PNPM TurboRepo TypeScript | ||
| </ | </ | ||
| - | * | ||
| - | < | ||
| - | PNPM | ||
| - | </ | ||
| - | * | ||
| < | < | ||
| - | TurboRepo | + | include: |
| + | - local: gitlab/ | ||
| + | - local: gitlab/ | ||
| + | - local: gitlab/ | ||
| + | - local: gitlab/ | ||
| - | </file> | + | variables: |
| - | * | + | RUNNER_TAG: " |
| - | <file> | + | DOCKER_BUILDKIT: |
| - | TypeScript | + | MONOREPO_ROOT: |
| + | SERVICE_PATH: | ||
| + | | ||
| + | VERSION_NUMBER: | ||
| + | DOCKER_IMAGE: | ||
| + | DOCKER_TAG: " | ||
| + | REMOTE_BASE_PATH: | ||
| + | ENV_CONTENT: | ||
| + | |||
| + | stages: | ||
| + | - test | ||
| + | - build | ||
| + | - validate | ||
| + | - deploy | ||
| + | - cleanup | ||
| + | |||
| + | cache: | ||
| + | key: " | ||
| + | paths: | ||
| + | - " | ||
| + | - " | ||
| + | - " | ||
| + | policy: pull-push | ||
| + | |||
| + | .auth-service_rules: | ||
| + | rules: | ||
| + | - if: ' | ||
| + | changes: | ||
| + | - " | ||
| + | - " | ||
| + | - " | ||
| + | - " | ||
| + | # ... | ||
| + | |||
| + | # ─── TEST ──────────────────────────────────────────────── | ||
| + | test-auth: | ||
| + | extends: .base_test_job | ||
| + | tags: | ||
| + | - " | ||
| + | | ||
| + | |||
| + | # ─── BUILD ─────────────────────────────────────────────── | ||
| + | build-auth: | ||
| + | extends: .base_build_job | ||
| + | needs: [" | ||
| + | tags: | ||
| + | - " | ||
| + | <<: *auth_rules | ||
| + | |||
| + | # ─── VALIDATE ──────────────────────────────────────────── | ||
| + | validate-auth: | ||
| + | extends: .base_validate_job | ||
| + | stage: validate | ||
| + | needs: | ||
| + | - job: build-auth | ||
| + | artifacts: true | ||
| + | tags: | ||
| + | - " | ||
| + | <<: *auth_rules | ||
| + | |||
| + | # ─── DEPLOY DEV ────────────────────────────────────────── | ||
| + | deploy-dev: | ||
| + | extends: .base_deploy_job | ||
| + | needs: | ||
| + | - job: build-auth | ||
| + | artifacts: true | ||
| + | - job: validate-auth | ||
| + | artifacts: true | ||
| + | variables: | ||
| + | SERVICE_NAME: | ||
| + | TARGET_ENV: " | ||
| + | DEPLOY_SERVER_IP: | ||
| + | SSH_USER: " | ||
| + | PORT: " | ||
| + | INTERNAL_PORT: | ||
| + | environment: | ||
| + | name: dev/ | ||
| + | rules: | ||
| + | - if: ' | ||
| + | |||
| + | # ─── DEPLOY TEST ───────────────────────────────────────── | ||
| + | deploy-test: | ||
| + | extends: .base_deploy_job | ||
| + | needs: | ||
| + | - job: build-auth | ||
| + | artifacts: true | ||
| + | - job: validate-auth | ||
| + | artifacts: true | ||
| + | variables: | ||
| + | SERVICE_NAME: | ||
| + | TARGET_ENV: " | ||
| + | DEPLOY_SERVER_IP: | ||
| + | SSH_USER: " | ||
| + | PORT: " | ||
| + | INTERNAL_PORT: | ||
| + | environment: | ||
| + | name: test/ | ||
| + | rules: | ||
| + | - if: ' | ||
| + | when: manual | ||
| + | |||
| + | # ─── DEPLOY PROD ───────────────────────────────────────── | ||
| + | deploy-prod: | ||
| + | extends: .base_deploy_job | ||
| + | needs: | ||
| + | - job: build-auth | ||
| + | artifacts: true | ||
| + | - job: validate-auth | ||
| + | artifacts: true | ||
| + | variables: | ||
| + | SERVICE_NAME: | ||
| + | TARGET_ENV: " | ||
| + | DEPLOY_SERVER_IP: | ||
| + | SSH_USER: " | ||
| + | BLUE_PORT: " | ||
| + | GREEN_PORT: " | ||
| + | PORT: " | ||
| + | INTERNAL_PORT: | ||
| + | environment: | ||
| + | name: prod/ | ||
| + | rules: | ||
| + | - if: ' | ||
| + | when: manual | ||
| + | |||
| + | # ─── CLEANUP ───────────────────────────────────── | ||
| + | cleanup-registry: | ||
| + | stage: cleanup | ||
| + | image: registry.gitlab.com/ | ||
| + | script: | ||
| + | - echo " | ||
| + | - glab registry delete " | ||
| + | rules: | ||
| + | - if: ' | ||
| + | when: on_success | ||
| + | allow_failure: | ||
| </ | </ | ||
| ---- | ---- | ||
| + | |||
| ====== 17. Deployment Server ====== | ====== 17. Deployment Server ====== | ||
gitlab_ci_cd_documentation/cotrav-platform.1774868238.txt.gz · Last modified: by raviraj
