This commit is contained in:
Бурденко Алексей
2025-06-20 15:36:38 +03:00
parent d0c4ea2766
commit 9cb012066d
6 changed files with 107 additions and 4 deletions
+39
View File
@@ -0,0 +1,39 @@
stages:
- prepare
- test
- build
- build-image
- deploy
include:
- "ci/build/*.inc.yml"
- "ci/build/*/*.inc.yml"
- "ci/variables.yml"
- "ci/rules.yml"
# default:
# image: harbor.vimpelcom.ru/dockerhub/library/docker:20.10.11-dind
# cache:
# paths:
# - node_modules/
# stages:
# - build
# - package
# - deploy
# variables:
# DIST_DIR: "./src/.vitepress/dist"
# DMZ_DIST_DIR: "./dmz-dist"
# CONTAINER_REGISTRY: harbor.vimpelcom.ru
# PRODUCT_FEATURE: vega/feature
# PRODUCT_FEATURE_STAND: vega/feature/stand
# PRODUCT_STAGE: vega/stage
# PRODUCT_DMZ: vega/dmz
# PRODUCT_PROD: vega
# IMAGE_NAME: docs
# include:
# - ci/feature.yml
# - ci/develop.yml
+1
View File
@@ -0,0 +1 @@
0.0.1
+45
View File
@@ -0,0 +1,45 @@
# - > переносы строк удаляются
# - | переносы строк не удаляются
build-npm:
image: harbor.vimpelcom.ru/dockerhub/library/node:lts
stage: build
cache:
- key:
files:
- package.json
paths:
- node_modules/
script:
# - GREEN=$'\033[0;32m'
# - RED=$'\033[0;31m'
# - BLUE=$'\033[0;36m'
# - WHITE=$'\033[0;37m'
# - RESET=$'\033[0m'
# - |
# if [ -f "${CI_PROJECT_DIR}/VERSION" ]; then
# APPVERSION=$(cat ${CI_PROJECT_DIR}/VERSION)
# fi
# echo "APPVERSION(VERSION) ${APPVERSION}"
# if [[ -z "$APPVERSION" ]]; then
# echo "APPVERSION is null"
# exit 1
# fi
# - echo VITE_VERSION = "$APPVERSION" >> .env
# - export PRODUCT="${PRODUCT_CLOUD}"
- npm install
- npm run build
needs:
- job: test-npm
artifacts: true # true by default, grabs `node_modules`
artifacts:
paths:
- "$NPM_DIST_DIR"
reports:
dotenv: .env
rules:
- !reference [.build-npm-rules, rules]
+8
View File
@@ -0,0 +1,8 @@
.build-npm-rules:
rules:
- if: $CI_COMMIT_BRANCH && $CI_PIPELINE_SOURCE == "merge_request_event"
when: never
- if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "main"
exists:
- .npmrc
- ./*/.npmrc
+13
View File
@@ -0,0 +1,13 @@
variables:
TEAM_NAME: vega
IMAGE_REGISTRY: harbor.vimpelcom.ru
CONTAINER_REGISTRY: ${IMAGE_REGISTRY}
NEXUS: https://nexus.vimpelcom.ru
NPM_DIST_DIR: "./src/.vitepress/dist"
IMAGE_NAME: ${CI_PROJECT_NAME}
PRODUCT_RELEASE: ${TEAM_NAME}
PRODUCT_DEVELOP: ${TEAM_NAME}/stage
PRODUCT_FEATURE: ${TEAM_NAME}/feature
PRODUCT_CLOUD: ${TEAM_NAME}/cloud
PRODUCT_VERSION: ${APPVERSION}
+1 -4
View File
@@ -37,15 +37,12 @@ const gitlab = `<?xml version="1.0" encoding="UTF-8" standalone="no"?>
</svg> </svg>
` `
const new_version = process.env?.VITE_NEW_VERSION;
console.log({ base: typeof new_version !== 'undefined' ? '/' : '/docs/' })
// https://vitepress.dev/reference/site-config // https://vitepress.dev/reference/site-config
export default defineConfig({ export default defineConfig({
title: "BeeCloud Docs", title: "BeeCloud Docs",
description: "Документация публичного облака", description: "Документация публичного облака",
head: [['link', { rel: 'icon', href: '/favicon.svg' }]], head: [['link', { rel: 'icon', href: '/favicon.svg' }]],
base: typeof new_version !== 'undefined' ? '/' : '/docs/', base: '/',
markdown: { markdown: {
config(md) { config(md) {
md.use(tabsMarkdownPlugin) md.use(tabsMarkdownPlugin)