ci: 修改helm chart流水线,不再另行构建麦麦本体镜像

pull/1361/head
zhangxinhui02 2025-11-17 17:33:24 +08:00
parent a071fb5b1d
commit 52b9c5663e
No known key found for this signature in database
GPG Key ID: 22C23383864A313F
1 changed files with 36 additions and 36 deletions

View File

@ -1,5 +1,5 @@
stages: stages:
- initialize-maibot-git-repo # - initialize-maibot-git-repo
- build - build
- package - package
@ -9,41 +9,41 @@ workflow:
- if: '$CI_COMMIT_BRANCH == "helm-chart"' - if: '$CI_COMMIT_BRANCH == "helm-chart"'
- when: never - when: never
# 查询并将麦麦仓库的工作区置为最后一个tag的版本 ## 查询并将麦麦仓库的工作区置为最后一个tag的版本
initialize-maibot-git-repo: #initialize-maibot-git-repo:
stage: initialize-maibot-git-repo # stage: initialize-maibot-git-repo
image: reg.mikumikumi.xyz/base/git:latest # image: reg.mikumikumi.xyz/base/git:latest
cache: # cache:
key: git-repo # key: git-repo
policy: push # policy: push
paths: # paths:
- target-repo/ # - target-repo/
script: # script:
- git clone https://github.com/Mai-with-u/MaiBot.git target-repo/ # - git clone https://github.com/Mai-with-u/MaiBot.git target-repo/
- cd target-repo/ # - cd target-repo/
- export MAIBOT_VERSION=$(git describe --tags --abbrev=0) # - export MAIBOT_VERSION=$(git describe --tags --abbrev=0)
- echo "Current version is ${MAIBOT_VERSION}" # - echo "Current version is ${MAIBOT_VERSION}"
- git reset --hard ${MAIBOT_VERSION} # - git reset --hard ${MAIBOT_VERSION}
- echo ${MAIBOT_VERSION} > MAIBOT_VERSION # - echo ${MAIBOT_VERSION} > MAIBOT_VERSION
- git clone https://github.com/MaiM-with-u/maim_message maim_message # - git clone https://github.com/MaiM-with-u/maim_message maim_message
- git clone https://github.com/MaiM-with-u/MaiMBot-LPMM.git MaiMBot-LPMM # - git clone https://github.com/MaiM-with-u/MaiMBot-LPMM.git MaiMBot-LPMM
- ls -al # - ls -al
#
# 构建最后一个tag的麦麦本体的镜像 ## 构建最后一个tag的麦麦本体的镜像
build-core: #build-core:
stage: build # stage: build
image: reg.mikumikumi.xyz/base/kaniko-builder:latest # image: reg.mikumikumi.xyz/base/kaniko-builder:latest
cache: # cache:
key: git-repo # key: git-repo
policy: pull # policy: pull
paths: # paths:
- target-repo/ # - target-repo/
script: # script:
- cd target-repo/ # - cd target-repo/
- export BUILD_CONTEXT=$(pwd) # - export BUILD_CONTEXT=$(pwd)
- ls -al # - ls -al
- export BUILD_DESTINATION="reg.mikumikumi.xyz/maibot/maibot:tag-$(cat MAIBOT_VERSION)" # - export BUILD_DESTINATION="reg.mikumikumi.xyz/maibot/maibot:tag-$(cat MAIBOT_VERSION)"
- build # - build
# 将Helm Chart版本作为tag构建并推送镜像 # 将Helm Chart版本作为tag构建并推送镜像
build-adapter-cm-generator: build-adapter-cm-generator: