You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
86 lines
2.5 KiB
86 lines
2.5 KiB
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: 长春派格FIS项目
|
|
|
|
platform:
|
|
arch: amd64
|
|
os: linux
|
|
|
|
steps:
|
|
- name: 分析
|
|
image: aosapps/drone-sonar-plugin
|
|
settings:
|
|
sonar_host: http://dev.ccwin-in.com:3005
|
|
sonar_token: sqa_a1da3cf5984f39d9a256493acbae857c6624e954
|
|
|
|
- name: 后端构建
|
|
image: mcr.microsoft.com/dotnet/sdk:6.0
|
|
privileged: true
|
|
commands:
|
|
- cd ./build
|
|
- chmod 755 ./be-build.sh
|
|
- ./be-build.sh
|
|
- 'git --no-pager log --date=format:"%Y-%m-%d %H:%M:%S" --pretty=format:"%h - %ad %cn: %s %b" --invert-grep --grep="CI SKIP" --grep="drone" >./publish/log.txt'
|
|
- echo "${DRONE_BUILD_NUMBER}-${DRONE_COMMIT_AUTHOR}-${DRONE_REPO_BRANCH}-${DRONE_COMMIT_SHA:0:8}\n">./publish/version.txt
|
|
- echo ${DRONE_COMMIT_MESSAGE}>>./publish/version.txt
|
|
|
|
# - name: 前端构建
|
|
# image: node:14.21.3
|
|
# privileged: true
|
|
# commands:
|
|
# - cd ./build
|
|
# - chmod 755 ./fe-build.sh
|
|
# - ./fe-build.sh
|
|
|
|
- name: 发布到MinIO
|
|
image: plugins/s3
|
|
settings:
|
|
endpoint: http://dev.ccwin-in.com:3008
|
|
path_style: true
|
|
bucket: default
|
|
access_key: O222sbIaMKeGfeX18t8K
|
|
secret_key: 0LEOWfXSDnaLbIYGZfdKUxyi2kYIayx4YvdLTgcR
|
|
source: build/publish/**/*
|
|
strip_prefix: build/publish/
|
|
target: /fis/cc-pai-ge/${DRONE_BUILD_NUMBER}-${DRONE_COMMIT_AUTHOR}-${DRONE_REPO_BRANCH}-${DRONE_COMMIT_SHA:0:8}
|
|
|
|
- name: 停止测试服务器服务
|
|
image: appleboy/drone-ssh
|
|
settings:
|
|
host: dev.ccwin-in.com
|
|
port: 16085
|
|
username: Administrator
|
|
password: Microsoft@2022
|
|
command_timeout: 10m
|
|
script:
|
|
- mkdir -p /d/publish/fis/cc-pai-ge/web
|
|
- cd /d/publish/fis/cc-pai-ge/web
|
|
- ./stop.cmd
|
|
- sleep 3
|
|
- cd ../..
|
|
- rm -rf /d/publish/fis/cc-pai-ge
|
|
- mkdir -p /d/publish/fis/cc-pai-ge
|
|
|
|
- name: 部署到测试服务器
|
|
image: cschlosser/drone-ftps
|
|
environment:
|
|
PLUGIN_HOSTNAME: dev.ccwin-in.com:16022
|
|
FTP_USERNAME: Administrator
|
|
FTP_PASSWORD: Microsoft@2022
|
|
PLUGIN_SRC_DIR: /build/publish
|
|
PLUGIN_DEST_DIR: /fis/cc-pai-ge
|
|
PLUGIN_SECURE: false
|
|
PLUGIN_CHMOD: false
|
|
|
|
- name: 启动测试服务器服务
|
|
image: appleboy/drone-ssh
|
|
settings:
|
|
host: dev.ccwin-in.com
|
|
port: 16085
|
|
username: Administrator
|
|
password: Microsoft@2022
|
|
command_timeout: 10m
|
|
script:
|
|
- cd /d/publish/fis/cc-pai-ge/web
|
|
- ./start.cmd
|
|
|