-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pipeline.yml
69 lines (65 loc) · 2.42 KB
/
.pipeline.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Hello World Rust CI/CD Pipeline
stages:
- name: Build
jobs:
- name: Compile
repository: https://github.com/ViaductCI/hello-world-rust.git
branch: main
commands:
- cargo build --release
outputs:
- name: hello_world_binary
path: target/release/hello-world-rust
- name: Test
jobs:
- name: Unit Tests
repository: https://github.com/ViaductCI/hello-world-rust.git
branch: main
commands:
- cargo test --lib
- echo "Unit tests passed successfully" > unit_test_results.txt
outputs:
- name: unit_test_results
path: unit_test_results.txt
- name: Integration Tests
repository: https://github.com/ViaductCI/hello-world-rust.git
branch: main
commands:
- cargo test --test integration_test
- echo "Integration tests passed successfully" > integration_test_results.txt
outputs:
- name: integration_test_results
path: integration_test_results.txt
- name: Deploy
jobs:
- name: Create Deployment Package
repository: https://github.com/ViaductCI/hello-world-rust.git
branch: main
commands:
- "./deploy.sh"
inputs:
- name: hello_world_binary
value: ${{Build.Compile.outputs.hello_world_binary}}
outputs:
- name: deployment_package
path: hello_world_deployment.tar.gz
- name: Notify
jobs:
- name: Send Notification
repository: https://github.com/ViaductCI/hello-world-rust.git
branch: main
commands:
- 'echo "Deployment package: $DEPLOYMENT_PACKAGE" > notification.txt'
- 'echo "Unit test results: $UNIT_TEST_RESULTS" >> notification.txt'
- 'echo "Integration test results: $INTEGRATION_TEST_RESULTS" >> notification.txt'
- 'echo "Notification sent: Hello World Rust pipeline completed successfully!" >> notification.txt'
inputs:
- name: deployment_package
value: ${{Deploy.Create Deployment Package.outputs.deployment_package}}
- name: unit_test_results
value: ${{Test.Unit Tests.outputs.unit_test_results}}
- name: integration_test_results
value: ${{Test.Integration Tests.outputs.integration_test_results}}
outputs:
- name: notification
path: notification.txt