forked from natuka/web.puabadge.com
add drone
This commit is contained in:
1 parent
84061c9a18
commit
e6a821edfc
1 file changed
-125
-125
@@ -69,57 +69,7 @@ steps:
|
||||
- promote
|
||||
target:
|
||||
- test
|
||||
- sruidtest
|
||||
- name: yarn build oversea
|
||||
image: node:20.11.1
|
||||
volumes:
|
||||
- name: web
|
||||
pull: if-not-exsits
|
||||
environment:
|
||||
HTTP_PROXY:
|
||||
from_secret: http_proxy
|
||||
HTTPS_PROXY:
|
||||
from_secret: https_proxy
|
||||
volumes:
|
||||
- name: data
|
||||
path: /data
|
||||
commands:
|
||||
- cd /data
|
||||
- env | grep -i http
|
||||
- npm config set registry https://registry.npmmirror.com
|
||||
- yarn
|
||||
- yarn build:oversea
|
||||
- chmod -R 777 dist
|
||||
when:
|
||||
event:
|
||||
- promote
|
||||
target:
|
||||
- oversea
|
||||
- testoversea
|
||||
- oem
|
||||
|
||||
- name: yarn build gray
|
||||
image: node:20.11.1
|
||||
environment:
|
||||
HTTP_PROXY:
|
||||
from_secret: http_proxy
|
||||
HTTPS_PROXY:
|
||||
from_secret: https_proxy
|
||||
volumes:
|
||||
- name: data
|
||||
path: /data
|
||||
commands:
|
||||
- cd /data
|
||||
- env | grep -i http
|
||||
- npm config set registry https://registry.npmmirror.com
|
||||
- yarn
|
||||
- yarn run gray
|
||||
- chmod -R 777 dist
|
||||
when:
|
||||
event:
|
||||
- promote
|
||||
target:
|
||||
- gray
|
||||
volumes:
|
||||
- name: web
|
||||
host:
|
||||
@@ -134,7 +84,6 @@ depends_on:
|
||||
- git
|
||||
|
||||
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: exec
|
||||
@@ -152,9 +101,6 @@ steps:
|
||||
- promote
|
||||
target:
|
||||
- prod
|
||||
- sruid
|
||||
- oversea
|
||||
- oem
|
||||
- name: scp to dev
|
||||
commands:
|
||||
- cd /data/projects/${drone_repo_name}/dist
|
||||
@@ -164,26 +110,6 @@ steps:
|
||||
- promote
|
||||
target:
|
||||
- test
|
||||
- name: scp to web dev
|
||||
commands:
|
||||
- cd /data/projects/${drone_repo_name}/dist
|
||||
- scp -r ./* api@172.31.1.254:/usr/share/nginx/web
|
||||
when:
|
||||
event:
|
||||
- promote
|
||||
target:
|
||||
- test
|
||||
- sruidtest
|
||||
- name: scp to gray
|
||||
commands:
|
||||
- cd /data/projects/${DRONE_REPO_NAME}/dist
|
||||
- scp -r ./* ecs-user@mark.api.suwa3d.com:~/deploy/web.gray.api.suwa3d.com_8799/static
|
||||
when:
|
||||
event:
|
||||
- promote
|
||||
target:
|
||||
- gray
|
||||
|
||||
|
||||
depends_on:
|
||||
- build
|
||||
@@ -303,57 +229,6 @@ steps:
|
||||
|
||||
|
||||
#================================= sharewow3d ==========================
|
||||
- name: upload to oversea oss
|
||||
commands:
|
||||
- python3 /home/devops/python_script/aliyun/upload.py
|
||||
pull: never
|
||||
image: oss2:latest
|
||||
volumes:
|
||||
- name: files
|
||||
path: /files
|
||||
- name: scripts
|
||||
path: /scripts
|
||||
commands:
|
||||
- python3 /scripts/oss.py oversea-${DRONE_REPO_NAME} backup
|
||||
- python3 /scripts/oss.py oversea-${DRONE_REPO_NAME} upload
|
||||
when:
|
||||
event:
|
||||
- promote
|
||||
target:
|
||||
- oversea
|
||||
- name: restore to oversea oss
|
||||
pull: never
|
||||
image: oss2:latest
|
||||
volumes:
|
||||
- name: files
|
||||
path: /files
|
||||
- name: scripts
|
||||
path: /scripts
|
||||
commands:
|
||||
- python3 /scripts/oss.py oversea-${DRONE_REPO_NAME} restore
|
||||
when:
|
||||
event:
|
||||
- rollback
|
||||
target:
|
||||
- oversea
|
||||
- name: flush oversea cdn
|
||||
pull: never
|
||||
image: oss2:latest
|
||||
volumes:
|
||||
- name: files
|
||||
path: /files
|
||||
- name: scripts
|
||||
path: /scripts
|
||||
commands:
|
||||
- sleep 3
|
||||
- echo https://web.sharewow3d.com/ > /scripts/web.sharewow3d.com
|
||||
- cd /scripts && python3 /scripts/refresh.py -r web.sharewow3d.com -t clear
|
||||
when:
|
||||
event:
|
||||
- promote
|
||||
target:
|
||||
- oversea
|
||||
|
||||
volumes:
|
||||
- name: files
|
||||
host:
|
||||
|
||||
Reference in new issue
Block a user