Build and Verify job for ICS sample producer and consumer 26/12726/4
authorJohnKeeney <john.keeney@est.tech>
Tue, 16 Apr 2024 19:35:32 +0000 (20:35 +0100)
committerJohnKeeney <john.keeney@est.tech>
Tue, 16 Apr 2024 19:35:32 +0000 (20:35 +0100)
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 <john.keeney@est.tech>
jjb/nonrtric/ics-producer-consumer-tests.sh [new file with mode: 0755]
jjb/nonrtric/nonrtric.yaml

diff --git a/jjb/nonrtric/ics-producer-consumer-tests.sh b/jjb/nonrtric/ics-producer-consumer-tests.sh
new file mode 100755 (executable)
index 0000000..51c93c8
--- /dev/null
@@ -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
index febd57b..5c424b8 100644 (file)
       - 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