blob: 042adc35932ddcc30b92cfb0d1430c0301e399cc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#!/bin/bash
set -e
project=$1
results=$2
ref=$3
url="https://gitlab.com/gitlab-org/security-products/tests/$project.git"
# Clone the test repository.
echo "Cloning the test project $project from $url"
git clone "$url" "/code/$project"
# Run license management on it.
echo "Running license management on the $project with ref $ref"
cd "/code/$project"
git checkout "$ref" 1> /dev/null
/run.sh analyze .
# In order to upload the artifact to check it manually
mkdir -p /results/
cp "/code/$project/gl-license-management-report.json" "/results/$project-gl-license-management-report.json"
# Compare results with expected results.
diff -u "/code/$project/gl-license-management-report.json" "/test/results/$results.json"
|