Sorry Ash, it's been quite a while and I've forgotten what we discussed earlier.
What I understood now is that I can basically go ahead and do the build at once on build server(s) manually to prepare stuff so we don't need to rebuild it until you want it to be updated.
I then tried running it again after cloning the repo in WORKSPACE/repos and I have progress.
(Actually I have more than progress as I got some stuff reported.)
I quickly/messily put this on Jenkins and ran against releng repo to show how it would look like. Here are the links.
Jenkins job log: https://build.opnfv.org/ci/view/All/job/securityscan-prototype/4/console
HTML report: https://build.opnfv.org/ci/view/All/job/securityscan-prototype/HTML_Report/utils_report.html
Some more comments/findings;
- Depending on if we want these checks to be blocker or not, we need run_tests.sh script to exit with non-zero if it finds something. In the beginning we can use this exit code to post WARNING to Gerrit which can then be turned into blocker.
- I don't seem to be able to put WORKSPACE/repos outside of anteaterfw. Some stuff seem to be expecting things relative to where I execute the script run_tests.sh.
- And the y/n confirmation as I mentioned earlier.
jenkins@ci-jenkins-build-3:~/opnfv$ pwd
/home/jenkins/opnfv
jenkins@ci-jenkins-build-3:~/opnfv$ mkdir WORKSPACE
jenkins@ci-jenkins-build-3:~/opnfv$ export WORKSPACE=/home/jenkins/opnfv/WORKSPACE
jenkins@ci-jenkins-build-3:~/opnfv$ git clone https://gerrit.opnfv.org/gerrit/p/releng.git $WORKSPACE/repos
Cloning into '/home/jenkins/opnfv/WORKSPACE/repos'...
remote: Counting objects: 739, done
remote: Finding sources: 100% (40/40)
remote: Total 18295 (delta 10), reused 18277 (delta 10)
Receiving objects: 100% (18295/18295), 8.69 MiB | 590.00 KiB/s, done.
Resolving deltas: 100% (7490/7490), done.
Checking connectivity... done.
jenkins@ci-jenkins-build-3:~/opnfv$ /home/jenkins/opnfv/anteaterfw/run_scan.sh
You are running run_scan.sh script Version: 0.3
Last modified on January 31, 2017, by Ashlee Young.
Checking build environment dependencies...
cat: /home/jenkins/opnfv/build/anteater/anteater.conf: No such file or directory
Your WORKSPACE variable is set, but not reflected in your anteater.conf file
Would you like us to change it? [y/n] n
/home/jenkins/opnfv/anteaterfw/run_scan.sh: line 116: cd: /home/jenkins/opnfv/build/anteater: No such file or directory
mkdir: cannot create directory ‘/home/jenkins/opnfv/build/anteater/repos’: No such file or directory
/home/jenkins/opnfv/anteaterfw/run_scan.sh: line 120: cd: /home/jenkins/opnfv/build/anteater: No such file or directory
/home/jenkins/opnfv/anteaterfw/run_scan.sh: line 121: env/bin/activate: No such file or directory
/home/jenkins/opnfv/anteaterfw/run_scan.sh: line 122: anteater: command not found
And with y to the confirmation this time.
jenkins@ci-jenkins-build-3:~/opnfv$ /home/jenkins/opnfv/anteaterfw/run_scan.sh
You are running run_scan.sh script Version: 0.3
Last modified on January 31, 2017, by Ashlee Young.
Checking build environment dependencies...
cat: /home/jenkins/opnfv/build/anteater/anteater.conf: No such file or directory
Your WORKSPACE variable is set, but not reflected in your anteater.conf file
Would you like us to change it? [y/n] y
cp: cannot stat '/home/jenkins/opnfv/configs/anteater.conf': No such file or directory
sed: can't read /home/jenkins/opnfv/build/anteater/anteater.conf: No such file or directory
/home/jenkins/opnfv/anteaterfw/run_scan.sh: line 116: cd: /home/jenkins/opnfv/build/anteater: No such file or directory
mkdir: cannot create directory ‘/home/jenkins/opnfv/build/anteater/repos’: No such file or directory
/home/jenkins/opnfv/anteaterfw/run_scan.sh: line 120: cd: /home/jenkins/opnfv/build/anteater: No such file or directory
/home/jenkins/opnfv/anteaterfw/run_scan.sh: line 121: env/bin/activate: No such file or directory
/home/jenkins/opnfv/anteaterfw/run_scan.sh: line 122: anteater: command not found