Fixing OSC Verify Jobs
Change-Id: I73e54e777663ee0d9c27a946ae6e5f3682d93a4c
diff --git a/jjb/oransc/global-templates-oran-go.yaml b/jjb/oransc/global-templates-oran-go.yaml
index 2015c39..0f201d4 100644
--- a/jjb/oransc/global-templates-oran-go.yaml
+++ b/jjb/oransc/global-templates-oran-go.yaml
@@ -3,7 +3,9 @@
node: oransc-ubuntu2004
disabled: false
concurrent: true
- directory:
+ directory: ' '
+ trigger_branch_pattern: '**'
+ trigger_files_path_pattern: '**'
properties:
- logrotate
diff --git a/jjb/oransc/nonrtric-plt-ranpm/nonrtric-plt-ranpm-verify-jobs.yaml b/jjb/oransc/nonrtric-plt-ranpm/nonrtric-plt-ranpm-verify-jobs.yaml
index 98fdfb4..4c437b6 100644
--- a/jjb/oransc/nonrtric-plt-ranpm/nonrtric-plt-ranpm-verify-jobs.yaml
+++ b/jjb/oransc/nonrtric-plt-ranpm/nonrtric-plt-ranpm-verify-jobs.yaml
@@ -75,7 +75,7 @@
- project:
<<: *nonrtric_plt_ranpm_jdk_common
name: nonrtric-plt-ranpm-pm-file-converter
- project-name: nonrtric-plt-ranpm-pm-file-converter"
+ project-name: nonrtric-plt-ranpm-pm-file-converter
subdirectory: pm-file-converter
trigger_branch_pattern: '**'
trigger_files_path_pattern: "**/pm-file-converter/**"
diff --git a/jjb/oransc/nonrtric-rapp-ransliceassurance/nonrtric-rapp-ransliceassurance-verify-jobs.yaml b/jjb/oransc/nonrtric-rapp-ransliceassurance/nonrtric-rapp-ransliceassurance-verify-jobs.yaml
index 1d14081..66f2924 100644
--- a/jjb/oransc/nonrtric-rapp-ransliceassurance/nonrtric-rapp-ransliceassurance-verify-jobs.yaml
+++ b/jjb/oransc/nonrtric-rapp-ransliceassurance/nonrtric-rapp-ransliceassurance-verify-jobs.yaml
@@ -1,6 +1,6 @@
---
# ============LICENSE_START=======================================================
-# Copyright (C) 2022 Nordix Foundation.
+# Copyright (C) 2023 Nordix Foundation.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -25,14 +25,20 @@
project: nonrtric/rapp/ransliceassurance
project-name: nonrtric-rapp-ransliceassurance-ics
directory: icsversion
+ trigger_files_path_pattern: "**/icsversion/**"
+ trigger_branch_pattern: '**'
jobs:
- 'oransc-{project-name}-verify-go'
+
- project:
name: nonrtric-rapp-ransliceassurance-smo-verify-go
project: nonrtric/rapp/ransliceassurance
project-name: nonrtric-rapp-ransliceassurance-smo
directory: smoversion
+ trigger_files_path_pattern: "**/smoversion/**"
+ trigger_branch_pattern: '**'
+
jobs:
- 'oransc-{project-name}-verify-go'
\ No newline at end of file
diff --git a/jjb/oransc/verify-jobs-go.sh b/jjb/oransc/verify-jobs-go.sh
index 1e0224b..84b3f5a 100644
--- a/jjb/oransc/verify-jobs-go.sh
+++ b/jjb/oransc/verify-jobs-go.sh
@@ -8,23 +8,13 @@
# Read desired Go version from go.mod file
desired_version=$(grep '^go' go.mod | grep -Eo '[0-9]\.[0-9]+')
-# Check installed Go version
-installed_version=$(go version | awk '{print $3}' | sed 's/go//')
+# Remove existing Go installation
+sudo rm -fr /usr/local/go
-if [ "$desired_version" != "$installed_version" ]; then
- echo "Desired Go version: $desired_version"
- echo "Installed Go version: $installed_version"
+echo "Download go $desired_version"
+curl -L "https://go.dev/dl/go$desired_version.linux-amd64.tar.gz" | sudo tar -C /usr/local -zxf -
- # Remove existing Go installation
- sudo rm -fr /usr/local/go
-
- echo "Download go $desired_version"
- curl -L "https://go.dev/dl/go$desired_version.linux-amd64.tar.gz" | sudo tar -C /usr/local -zxf -
-
- export PATH=$PATH:/usr/local/go/bin
-else
- echo "Go version is up to date: $desired_version"
-fi
+export PATH=$PATH:/usr/local/go/bin
echo "Download project deps"
go mod tidy