-
Notifications
You must be signed in to change notification settings - Fork 79
/
run.yml
29 lines (27 loc) · 1.67 KB
/
run.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
# ========================================================
# Python 构建参考流水线样例
# 功能:实现在构建中输出当前 Python 构建环境的环境信息
# ========================================================
name: gitee-go-python-example # 定义一个唯一 ID 标识为 gitee-go-python-example,名称为 “Python-流水线示例” 的流水线
displayName: '每日疫情打卡'
triggers: # 流水线触发器配置
push: # 设置 master 分支 在产生代码 push 时精确触发(PRECISE)构建
- matchType: PRECISE
branch: main
schedule:
- cron: '20 0,4 * * *'
stages: # 构建阶段配置
- stage: # 定义一个 ID 标识为 python-build-stage ,名为 “Python Stage” 的阶段
name: python-build-stage
displayName: 'Python Stage'
failFast: false # 允许快速失败,即当 Stage 中有任务失败时,直接结束整个 Stage
steps: # 构建步骤配置
- step: pythonbuild@1 # 采用 Maven 编译环境
name: python-build # 定义一个 ID 标识为 python-build ,名为 “Python Step” 的阶段
displayName: 'Python Step'
inputs: # 构建输入参数设定
pythonVersion: 3.7 # 指定 Python 环境版本为 2.7
goals: |
pip3 install -r requirements.txt
/usr/bin/python -m pip install --upgrade pip
python main.py -U $USERNAME -P $PASSWORD