Commit a3fa3909 authored by carignani's avatar carignani
Browse files

Simple validation script for playground

parent 45400338
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@ pipeline{
		stage('Validate') {
    		steps{
    			sh 'echo Validate stage'
			sh 'bash ./validate-all.sh'
			}
		}
		stage('Deploy to FTP') {

validate-all.sh

0 → 100644
+16 −0
Original line number Diff line number Diff line
#!/bin/bash
# Copyright ETSI 2019
# See: https://forge.etsi.org/etsi-forge-copyright-statement.txt

fres=0

for i in ./*.yaml ;  do
    echo "-- Will validate: $i --"
    swagger-cli validate "$i"
    res=$?
    fres=$(($fres||$res))
done

# Exit code needed for jenkins to know the verdict of the build
echo "-- Final validator returns $fres."
exit $fres