From: JohnKeeney Date: Tue, 16 Apr 2024 19:35:32 +0000 (+0100) Subject: Build and Verify job for ICS sample producer and consumer X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=5437ead824ceb8d94e948c31ec25d597f22e18f7;p=ci-management.git Build and Verify job for ICS sample producer and consumer The start.sh script will return exit 1 if there are some errors and exit 0 if success. Issue-ID: NONRTRIC-965 Change-Id: I6d7225f16ed07cd0fc35ef8aa2474e2207463b13 Signed-off-by: JohnKeeney --- diff --git a/jjb/nonrtric/ics-producer-consumer-tests.sh b/jjb/nonrtric/ics-producer-consumer-tests.sh new file mode 100755 index 00000000..51c93c80 --- /dev/null +++ b/jjb/nonrtric/ics-producer-consumer-tests.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# Clone the repository +git clone https://gerrit.o-ran-sc.org/r/nonrtric +cd nonrtric/sample-services/ics-producer-consumer || exit + +# Run the start.sh script and capture its exit status +./start.sh +start_status=$? + +# Check the exit status of the start.sh script +if [ $start_status -eq 0 ]; then + echo "start.sh exited successfully (exit code 0)" +else + echo "start.sh exited with an error (exit code $start_status)" +fi diff --git a/jjb/nonrtric/nonrtric.yaml b/jjb/nonrtric/nonrtric.yaml index febd57b4..5c424b8f 100644 --- a/jjb/nonrtric/nonrtric.yaml +++ b/jjb/nonrtric/nonrtric.yaml @@ -118,6 +118,64 @@ - master: branch: master +- project: + <<: *nonrtric_docker_common + name: nonrtric-sample-icsproducer + project-name: "{name}" + # image name + docker-name: "o-ran-sc/nonrtric-sample-icsproducer" + # Directory with Dockerfile + docker-root: "sample-services/ics-producer-consumer/producer" + # Limit build trigger to appropriate files + gerrit_trigger_file_paths: + - compare-type: REG_EXP + pattern: "sample-services/ics-producer-consumer/producer/.*" + build-node: ubuntu1804-docker-4c-4g + # Includes verify and merge jobs + jobs: + - "{project-name}-gerrit-docker-jobs" + stream: + - master: + branch: master + +- project: + <<: *nonrtric_docker_common + name: nonrtric-sample-icsconsumer + project-name: "{name}" + # image name + docker-name: "o-ran-sc/nonrtric-sample-icsconsumer" + # Directory with Dockerfile + docker-root: "sample-services/ics-producer-consumer/consumer" + # Limit build trigger to appropriate files + gerrit_trigger_file_paths: + - compare-type: REG_EXP + pattern: "sample-services/ics-producer-consumer/consumer/.*" + build-node: ubuntu1804-docker-4c-4g + # Includes verify and merge jobs + jobs: + - "{project-name}-gerrit-docker-jobs" + stream: + - master: + branch: master + +- project: + <<: *nonrtric_docker_common + name: nonrtric-sample-icsproducerconsumer + project-name: "{name}" + project: "nonrtric" # repo + build-timeout: 20 # min + build-node: ubuntu2204-devstack-4c-16g + gerrit_trigger_file_paths: + - compare-type: REG_EXP + pattern: "sample-services/ics-producer-consumer/.*" + script: !include-raw-escape: + - ics-producer-consumer-tests.sh + jobs: + - oran-shell-verify + stream: + - master: + branch: master + # Jobs to verify / build images for testing - project: <<: *nonrtric_docker_common