gitlab-cid示例2

stages:
- build
- test
- deploy

build-job:
stage: build
script:
- echo "Compiling the code..."
- echo "Compile complete."

unit-test-job:
stage: test
script:
- echo "Running unit tests... This will take about 1 seconds."
- sleep 1
- echo "Code coverage is 90%"

lint-test-job:
stage: test
script:
- echo "Linting code... This will take about 1 seconds."
- sleep 1
- echo "No lint issues found."

deploy-job:
stage: deploy
environment: production
script:
- echo "Deploying application..."
- rsync -avz --delete --exclude ".git/" ./ rsync://192.168.56.106:873/html/
- echo "Application successfully deployed."

posted @ 2024-12-14 15:18  河北大学-徐小波  阅读(260)  评论(0)    收藏  举报