[SEBA-195]

Also update FROM line in synchronizers using `master` as their parent,
when performing syncronizer-update job

Change-Id: I2d10f38d2ac3c2b63e22e287775d372e64cc0a42
diff --git a/jjb/pipeline/xos-synchronizer-update.groovy b/jjb/pipeline/xos-synchronizer-update.groovy
index 783df49..af154c9 100644
--- a/jjb/pipeline/xos-synchronizer-update.groovy
+++ b/jjb/pipeline/xos-synchronizer-update.groovy
@@ -117,8 +117,13 @@
 
            for df in cord/orchestration/xos_services/*/Dockerfile.synchronizer cord/orchestration/profiles/*/Dockerfile.synchronizer
            do
-             sed -i "s/^FROM\\(.*\\):\${XOS_MAJOR}.*\$/FROM\\1:candidate/" "\$df"
-             echo "\${WORKSPACE}/\$df" >> \${WORKSPACE}/updated_dockerfiles
+             df_contents=$(cat "\$df")
+             if [[ "\$df_contents" =~ "FROM xosproject/xos-synchronizer-base:\${XOS_MAJOR}" ||
+                   "\$df_contents" =~ "FROM xosproject/xos-synchronizer-base:master" ]]
+             then
+               sed -i "s/^FROM\\(.*\\):.*\$/FROM\\1:candidate/" "\$df"
+               echo "\${WORKSPACE}/\$df" >> \${WORKSPACE}/updated_dockerfiles
+             fi
            done
            """
       }