forked from dataelement/bisheng
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
42 lines (39 loc) · 1.84 KB
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
kind: pipeline # 定义对象类型,还有secret和signature两种类型
type: docker # 定义流水线类型,还有kubernetes、exec、ssh等类型
name: cicd # 定义流水线名称
steps: # 定义流水线执行步骤,这些步骤将顺序执行
- name: package # 流水线名称
image: python:3.10-slim # 定义创建容器的Docker镜像
volumes: # 将容器内目录挂载到宿主机,仓库需要开启Trusted设置
- name: maven-cache
path: /root/.m2 # 将maven下载依赖的目录挂载出来,防止重复下载
- name: maven-build
path: /app/build # 将应用打包好的Jar和执行脚本挂载出来
commands: # 定义在Docker容器中执行的shell命令
- pip install Cython
- pip install wheel
- pip install twine
- cd ./src/bisheng-langchain
- python setup.py bdist_wheel
- cp dist.* /app/build/
- name: build_backend
image: python:3.10-slim # 定义创建容器的Docker镜像
volumes: # 将容器内目录挂载到宿主机,仓库需要开启Trusted设置
- name: maven-cache
path: /root/.m2 # 将maven下载依赖的目录挂载出来,防止重复下载
- name: maven-build
path: /app/build # 将应用打包好的Jar和执行脚本挂载出来
commands:
- cd ./src/backend
- pip install bisheng_langchain==$RELEASE_VERSION
- sed -i 's/^bisheng_langchain.*/bisheng_langchain = "'$RELEASE_VERSION'"/g' pyproject.toml
- poetry lock
- name: build-image # 步骤名称
image: plugins/docker # 使用镜像
settings: # 当前设置
username: # 账号名称
from_secret: docker_username
password: # 账号密码
from_secret: docker_password
dockerfile: deploy/Dockerfile # Dockerfile地址, 注意是相对地址
repo: yxs970707/deploy-web-demo # 镜像名称