|
@ -3,6 +3,10 @@ kind: pipeline |
|
|
type: docker |
|
|
type: docker |
|
|
name: linux-amd64 |
|
|
name: linux-amd64 |
|
|
|
|
|
|
|
|
|
|
|
environment: |
|
|
|
|
|
PRODUCT:product1 |
|
|
|
|
|
PROJECT:project1 |
|
|
|
|
|
|
|
|
platform: |
|
|
platform: |
|
|
arch: amd64 |
|
|
arch: amd64 |
|
|
os: linux |
|
|
os: linux |
|
@ -12,8 +16,23 @@ steps: |
|
|
image: mcr.microsoft.com/dotnet/sdk:6.0 |
|
|
image: mcr.microsoft.com/dotnet/sdk:6.0 |
|
|
privileged: true |
|
|
privileged: true |
|
|
commands: |
|
|
commands: |
|
|
- '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" >log.txt' |
|
|
- mkdir -p ./build/publish |
|
|
- cat log.txt |
|
|
- cd ./build |
|
|
|
|
|
- '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: publish |
|
|
|
|
|
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: /${PRODUCT}/${PROJECT}/${DRONE_BUILD_NUMBER}-${DRONE_COMMIT_AUTHOR}-${DRONE_REPO_BRANCH}-${DRONE_COMMIT_SHA:0:8} |
|
|
|
|
|
|
|
|
- name: stop |
|
|
- name: stop |
|
|
image: appleboy/drone-ssh |
|
|
image: appleboy/drone-ssh |
|
@ -24,10 +43,10 @@ steps: |
|
|
password: Microsoft@2022 |
|
|
password: Microsoft@2022 |
|
|
command_timeout: 10m |
|
|
command_timeout: 10m |
|
|
script: |
|
|
script: |
|
|
- mkdir -p /d/FIS/fu-wei |
|
|
- mkdir -p /d/publish/${PRODUCT}/${PROJECT} |
|
|
- cd /d/FIS/fu-wei |
|
|
- cd /d/publish//${PRODUCT}/${PROJECT} |
|
|
- ./stop.cmd |
|
|
- ./stop.cmd |
|
|
- sleep 3 |
|
|
- sleep 3 |
|
|
- cd .. |
|
|
- cd .. |
|
|
- rm -rf fu-wei |
|
|
- rm -rf publish |
|
|
- mkdir -p fu-wei |
|
|
- mkdir -p publish |
|
|