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.

56 lines
1.6 KiB

1 year ago
kind: pipeline
type: docker
1 year ago
name: default
1 year ago
1 year ago
environment:
1 year ago
V_PRODUCT: product-name
V_PROJECT: project-name
1 year ago
1 year ago
platform:
arch: amd64
os: linux
1 year ago
steps:
- name: build
image: mcr.microsoft.com/dotnet/sdk:6.0
1 year ago
privileged: true
1 year ago
commands:
1 year ago
- mkdir -p ./build/publish
- 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
1 year ago
- name: stop
image: appleboy/drone-ssh
settings:
host: dev.ccwin-in.com
port: 16085
username: Administrator
password: Microsoft@2022
command_timeout: 10m
script:
1 year ago
- echo $V_PRODUCT
- echo ${V_PRODUCT}
- echo "${V_PRODUCT}"
- echo "$${V_PRODUCT}"
1 year ago
- mkdir -p /d/publish/${V_PRODUCT}/${V_PROJECT}
- cd /d/publish/${V_PRODUCT}/${V_PROJECT}
1 year ago
- ./stop.cmd
- sleep 3
- cd ..
1 year ago
- rm -rf publish
- mkdir -p publish
1 year ago
- 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: /$V_PRODUCT/${V_PROJECT}/${DRONE_BUILD_NUMBER}-${DRONE_COMMIT_AUTHOR}-${DRONE_REPO_BRANCH}-${DRONE_COMMIT_SHA:0:8}