wangxiaodong
3 months ago
7 changed files with 123 additions and 22 deletions
@ -1,19 +1,92 @@ |
|||
# Phytium Iot gitlab-ci.yml file |
|||
|
|||
workflow: |
|||
rules: |
|||
- if: $CI_PIPELINE_SOURCE == "merge_request_event" |
|||
|
|||
stages: |
|||
- basic_stage |
|||
|
|||
risk_controller: |
|||
stage: basic_stage |
|||
tags: |
|||
- normal_runner |
|||
script: |
|||
- pwd |
|||
- echo "Phytium Changsha Iot Gitlab Runner is at work." |
|||
- echo "This job only run manually to prevent merge request from not being reviewed by Jenkins pipeline." |
|||
- echo "Approve merge request to start Jenkins auto compile item." |
|||
- sleep 10 # 这个延时是为了让操作者明确知道自己已经开启了这项操作; |
|||
- exit 1 # 这个任务一定会失败,目的是保护被合入的分支 |
|||
rules: |
|||
- if: $CI_PIPELINE_SOURCE == "merge_request_event" |
|||
when: manual |
|||
- pre_stage # 准备阶段 |
|||
- compile_stage # 编译阶段 |
|||
- test_stage # 测试阶段 |
|||
- post_stage # 收尾阶段 |
|||
|
|||
start_compile: |
|||
stage: pre_stage |
|||
script: |
|||
- echo "Compile is about to start..." |
|||
tags: |
|||
- compile |
|||
when: manual |
|||
|
|||
# 各模块编译 |
|||
ai: |
|||
stage: compile_stage |
|||
script: |
|||
- cd /home/gitlab-runner/auto_compile_tool/phytium-test-tools/test_tool |
|||
- echo "python3 gitlab_pipeline_compile.py $CI_MERGE_REQUEST_PROJECT_PATH $CI_PROJECT_DIR $CI_PROJECT_DIR/example/ai" |
|||
- python3 gitlab_pipeline_compile.py $CI_MERGE_REQUEST_PROJECT_PATH $CI_PROJECT_DIR $CI_PROJECT_DIR/example/ai |
|||
tags: |
|||
- compile |
|||
needs: ["start_compile"] |
|||
|
|||
media: |
|||
stage: compile_stage |
|||
script: |
|||
- cd /home/gitlab-runner/auto_compile_tool/phytium-test-tools/test_tool |
|||
- python3 gitlab_pipeline_compile.py $CI_MERGE_REQUEST_PROJECT_PATH $CI_PROJECT_DIR $CI_PROJECT_DIR/example/media |
|||
tags: |
|||
- compile |
|||
needs: ["start_compile"] |
|||
|
|||
network: |
|||
stage: compile_stage |
|||
script: |
|||
- cd /home/gitlab-runner/auto_compile_tool/phytium-test-tools/test_tool |
|||
- python3 gitlab_pipeline_compile.py $CI_MERGE_REQUEST_PROJECT_PATH $CI_PROJECT_DIR $CI_PROJECT_DIR/example/network |
|||
tags: |
|||
- compile |
|||
needs: ["start_compile"] |
|||
|
|||
peripherals: |
|||
stage: compile_stage |
|||
script: |
|||
- cd /home/gitlab-runner/auto_compile_tool/phytium-test-tools/test_tool |
|||
- python3 gitlab_pipeline_compile.py $CI_MERGE_REQUEST_PROJECT_PATH $CI_PROJECT_DIR $CI_PROJECT_DIR/example/peripherals |
|||
tags: |
|||
- compile |
|||
needs: ["start_compile"] |
|||
|
|||
python: |
|||
stage: compile_stage |
|||
script: |
|||
- cd /home/gitlab-runner/auto_compile_tool/phytium-test-tools/test_tool |
|||
- python3 gitlab_pipeline_compile.py $CI_MERGE_REQUEST_PROJECT_PATH $CI_PROJECT_DIR $CI_PROJECT_DIR/example/python |
|||
tags: |
|||
- compile |
|||
needs: ["start_compile"] |
|||
|
|||
storage: |
|||
stage: compile_stage |
|||
script: |
|||
- cd /home/gitlab-runner/auto_compile_tool/phytium-test-tools/test_tool |
|||
- python3 gitlab_pipeline_compile.py $CI_MERGE_REQUEST_PROJECT_PATH $CI_PROJECT_DIR $CI_PROJECT_DIR/example/storage |
|||
tags: |
|||
- compile |
|||
needs: ["start_compile"] |
|||
|
|||
system: |
|||
stage: compile_stage |
|||
script: |
|||
- cd /home/gitlab-runner/auto_compile_tool/phytium-test-tools/test_tool |
|||
- python3 gitlab_pipeline_compile.py $CI_MERGE_REQUEST_PROJECT_PATH $CI_PROJECT_DIR $CI_PROJECT_DIR/example/system |
|||
tags: |
|||
- compile |
|||
needs: ["start_compile"] |
|||
|
|||
test: |
|||
stage: test_stage |
|||
script: |
|||
- echo "This auto test..." |
|||
tags: |
|||
- compile |
|||
when: manual |
Loading…
Reference in new issue