All checks were successful
continuous-integration/drone/push Build is passing
- 在.drone.yml中添加节点配置以指定PVE环境 - 确保CI管道使用正确的执行节点进行构建
31 lines
597 B
YAML
31 lines
597 B
YAML
kind: pipeline
|
|
type: docker
|
|
name: student-build
|
|
|
|
node:
|
|
name: pve
|
|
|
|
steps:
|
|
- name: docker-build-push
|
|
image: plugins/docker
|
|
settings:
|
|
registry: harbor.seahi.me
|
|
repo: harbor.seahi.me/stu/whoami-for-swarm
|
|
tags:
|
|
- latest
|
|
- build-${DRONE_BUILD_NUMBER}
|
|
username:
|
|
from_secret: harbor_username
|
|
password:
|
|
from_secret: harbor_password
|
|
insecure: true
|
|
# 添加构建时间标签
|
|
build_args:
|
|
- BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
|
- VCS_REF=${DRONE_COMMIT_SHA:0:8}
|
|
|
|
trigger:
|
|
branch:
|
|
- main
|
|
|