Merge "Move dlux Sonar scan to Sonarcloud"
[releng/builder.git] / jjb / packaging / packaging-macros.yaml
1 # Integration/Packaging macros
2 ---
3 - builder:
4     name: install-rpm
5     builders:
6       - shell: !include-raw: install-rpm.sh
7
8 - builder:
9     name: install-repo-cfg-rpm
10     builders:
11       - shell: |
12           # shellcheck disable=SC2154
13           repo_file="${REPO_CFG_FILE_URL##*/}"
14           sudo curl -s -o /etc/yum.repos.d/"$repo_file" "$REPO_CFG_FILE_URL"
15
16 - builder:
17     name: start-odl
18     builders:
19       - shell: !include-raw: start-odl.sh
20
21 - builder:
22     name: test-odl
23     builders:
24       - shell: |
25           # Install expect to interact with Karaf shell
26           # Install nmap to check status of ODL's SSH port
27           sudo yum install -y expect nmap
28       - shell: !include-raw: test-ports-nofeature.sh
29       - shell: !include-raw: test-karaf-oxygensafe.expect
30       # Disable this test until ODLPARENT-139 is fixed
31       # - shell: !include-raw: test-rest-ok.sh
32
33 - builder:
34     name: stop-odl
35     builders:
36       - shell: !include-raw: stop-odl.sh
37
38 - builder:
39     name: uninstall-rpm
40     builders:
41       - shell: !include-raw: uninstall-rpm.sh
42
43 - builder:
44     name: upgrade-odl
45     builders:
46       - shell: |
47           sudo yum upgrade -y opendaylight
48
49 - builder:
50     name: install-start-test-stop-rpm
51     builders:
52       - install-rpm
53       - start-odl
54       - test-odl
55       - stop-odl
56
57 - builder:
58     name: install-start-test-stop-uninstall-rpm
59     builders:
60       - install-start-test-stop-rpm
61       - uninstall-rpm
62
63 - builder:
64     name: installrepcfg-upgrade-start-test-stop-rpm
65     builders:
66       - install-repo-cfg-rpm
67       - upgrade-odl
68       - start-odl
69       - test-odl
70       - stop-odl
71
72 - builder:
73     name: install-test-uninstall-rpm
74     builders:
75       - inject:
76           properties-content: 'URL=/home/$USER/rpmbuild/RPMS/noarch/*.rpm'
77       # Install deps needed interactive Karaf shell tests
78       - shell: |
79           # Install expect to interact with Karaf shell
80           # Install nmap to check status of ODL's SSH port
81           sudo yum install -y expect nmap
82       - shell: !include-raw: test-rpm-deps.sh
83       - shell: !include-raw: install-rpm.sh
84       - shell: !include-raw: start-odl.sh
85       - shell: !include-raw: test-ports-nofeature.sh
86       - shell: !include-raw: test-karaf-oxygensafe.expect
87       # Disable this test until ODLPARENT-139 is fixed
88       # - shell: !include-raw: test-rest-ok.sh
89       - shell: !include-raw: stop-odl.sh
90       - shell: !include-raw: uninstall-rpm.sh
91       - shell: |
92           # Remove old host key (if exists) so future installs don't fail SSH
93           rm /home/jenkins/.ssh/known_hosts || \
94             echo "No known_hosts file to clean up, which is fine"
95
96 - builder:
97     name: install-test-uninstall-deb
98     builders:
99       - inject:
100           properties-content: 'PACKAGE=$WORKSPACE/packaging/packages/deb/opendaylight/*.deb'
101       # Install deps needed interactive Karaf shell tests
102       - shell: |
103           # Install expect to interact with Karaf shell
104           # Install nmap to check status of ODL's SSH port
105           sudo apt-get install -y expect nmap
106       - shell: !include-raw: test-deb-deps.sh
107       - shell: !include-raw: install-deb.sh
108       - shell: !include-raw: start-odl.sh
109       - shell: !include-raw: test-ports-nofeature.sh
110       - shell: !include-raw: test-karaf-oxygensafe.expect
111       # Disable this test until ODLPARENT-139 is fixed
112       # - shell: !include-raw: test-rest-ok.sh
113       - shell: !include-raw: stop-odl.sh
114       - shell: !include-raw: uninstall-deb.sh
115       - shell: |
116           # Remove old host key (if exists) so future installs don't fail SSH
117           rm /home/jenkins/.ssh/known_hosts || \
118             echo "No known_hosts file to clean up, which is fine"