diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 24173a6d1ea169a6511f1b32a3373c31497f70d5..f122953c7bf4232520af2508e8acf77d1b1e76b5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -35,14 +35,13 @@ build-job-Z2:       # This job runs in the build stage, which runs first.
     - tar -xf PL230-r0p0-02rel2-1.tar.gz
     # move to fpga_imp directory and run the fpga build script for pynq z2
     - cd ../../nanosoc/Cortex-M0/nanosoc/systems/mcu/fpga_imp/
-    - if source ./build_fpga_pynq_z2.scr; then
-    -   FILE=./pynq_export/pz2/pynq/overlays/soclabs/design_1.bit 
-    -   if test -f "$FILE"; then
-    -     echo "Build successful"
-    -   else
-    -     echo "Build failed"
-    -     exit 1
-    -   fi
+    - source ./build_fpga_pynq_z2.scr
+    - FILE=./pynq_export/pz2/pynq/overlays/soclabs/design_1.bit 
+    - if test -f "$FILE"; then
+    -   echo "Build successful"
+    - else
+    -   echo "Build failed"
+    -   exit 1
     - fi
     # cleanup arm-AAA-ip directory
     - cd ../../../../../../
@@ -69,14 +68,13 @@ build-job-ZCU104:       # This job runs in the build stage, which runs first.
     - tar -xf PL230-r0p0-02rel2-1.tar.gz
    # move to fpga_imp directory and run the fpga build script for pynq z2 
     - cd ../../nanosoc/Cortex-M0/nanosoc/systems/mcu/fpga_imp/
-    - if source ./build_fpga_pynq_zcu104.scr; then
-    -   FILE=./pynq_export/pz104/pynq/overlays/soclabs/design_1.bit 
-    -   if test -f "$FILE"; then
-    -     echo "Build successful"
-    -   else
-    -     echo "Build failed"
-          exit 1
-    -   fi
+    - source ./build_fpga_pynq_zcu104.scr
+    - FILE=./pynq_export/pz104/pynq/overlays/soclabs/design_1.bit 
+    - if test -f "$FILE"; then
+    -   echo "Build successful"
+    - else
+    -   echo "Build failed"
+    -   exit 1
     - fi
     # cleanup arm-AAA-ip directory
     - cd ../../../../../../