Merge "Update modules/(test-)requirements"
authorMorgan Richomme <morgan.richomme@orange.com>
Wed, 14 Jun 2017 01:48:38 +0000 (01:48 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Wed, 14 Jun 2017 01:48:38 +0000 (01:48 +0000)
jjb/apex/apex.yml
jjb/apex/apex.yml.j2
jjb/ci_gate_security/anteater-security-audit.sh [new file with mode: 0644]
jjb/ci_gate_security/opnfv-ci-gate-security.yml

index 5974383..a395cf2 100644 (file)
                   kill-phase-on: FAILURE
                   abort-all-job: true
                   git-revision: true
-#        - multijob:
-#            name: functest-smoke
-#            condition: SUCCESSFUL
-#            projects:
-#              - name: 'functest-apex-virtual-suite-{stream}'
-#                current-parameters: false
-#                predefined-parameters: |
-#                  DEPLOY_SCENARIO={verify-scenario}
-#                  FUNCTEST_SUITE_NAME=healthcheck
-#                  GERRIT_BRANCH=$GERRIT_BRANCH
-#                  GERRIT_REFSPEC=$GERRIT_REFSPEC
-#                  GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
-#                  GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
-#                node-parameters: true
-#                kill-phase-on: FAILURE
-#                abort-all-job: true
-#                git-revision: false
+        - multijob:
+            name: functest-smoke
+            condition: SUCCESSFUL
+            projects:
+              - name: 'functest-apex-virtual-suite-{stream}'
+                current-parameters: false
+                predefined-parameters: |
+                  DEPLOY_SCENARIO={verify-scenario}
+                  FUNCTEST_SUITE_NAME=healthcheck
+                  GERRIT_BRANCH=$GERRIT_BRANCH
+                  GERRIT_REFSPEC=$GERRIT_REFSPEC
+                  GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+                  GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+                node-parameters: true
+                kill-phase-on: NEVER
+                abort-all-job: true
+                git-revision: false
 
 # Verify Scenario Gate
 - job-template:
                   kill-phase-on: FAILURE
                   abort-all-job: true
                   git-revision: true
-#        - multijob:
-#            name: functest-smoke
-#            condition: SUCCESSFUL
-#            projects:
-#              - name: 'functest-apex-virtual-suite-{stream}'
-#                current-parameters: false
-#                predefined-parameters: |
-#                  DEPLOY_SCENARIO={verify-scenario}
-#                  FUNCTEST_SUITE_NAME=healthcheck
-#                  GERRIT_BRANCH=$GERRIT_BRANCH
-#                  GERRIT_REFSPEC=$GERRIT_REFSPEC
-#                  GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
-#                  GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
-#                node-parameters: true
-#                kill-phase-on: FAILURE
-#                abort-all-job: true
-#                git-revision: false
+        - multijob:
+            name: functest-smoke
+            condition: SUCCESSFUL
+            projects:
+              - name: 'functest-apex-virtual-suite-{stream}'
+                current-parameters: false
+                predefined-parameters: |
+                  DEPLOY_SCENARIO={verify-scenario}
+                  FUNCTEST_SUITE_NAME=healthcheck
+                  GERRIT_BRANCH=$GERRIT_BRANCH
+                  GERRIT_REFSPEC=$GERRIT_REFSPEC
+                  GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+                  GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+                node-parameters: true
+                kill-phase-on: NEVER
+                abort-all-job: true
+                git-revision: false
 
 - job-template:
     name: 'apex-runner-cperf-{stream}'
index 41a4ee7..752cf28 100644 (file)
                   kill-phase-on: FAILURE
                   abort-all-job: true
                   git-revision: true
-#        - multijob:
-#            name: functest-smoke
-#            condition: SUCCESSFUL
-#            projects:
-#              - name: 'functest-apex-virtual-suite-{stream}'
-#                current-parameters: false
-#                predefined-parameters: |
-#                  DEPLOY_SCENARIO={verify-scenario}
-#                  FUNCTEST_SUITE_NAME=healthcheck
-#                  GERRIT_BRANCH=$GERRIT_BRANCH
-#                  GERRIT_REFSPEC=$GERRIT_REFSPEC
-#                  GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
-#                  GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
-#                node-parameters: true
-#                kill-phase-on: FAILURE
-#                abort-all-job: true
-#                git-revision: false
+        - multijob:
+            name: functest-smoke
+            condition: SUCCESSFUL
+            projects:
+              - name: 'functest-apex-virtual-suite-{stream}'
+                current-parameters: false
+                predefined-parameters: |
+                  DEPLOY_SCENARIO={verify-scenario}
+                  FUNCTEST_SUITE_NAME=healthcheck
+                  GERRIT_BRANCH=$GERRIT_BRANCH
+                  GERRIT_REFSPEC=$GERRIT_REFSPEC
+                  GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+                  GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+                node-parameters: true
+                kill-phase-on: NEVER
+                abort-all-job: true
+                git-revision: false
 
 # Verify Scenario Gate
 - job-template:
                   kill-phase-on: FAILURE
                   abort-all-job: true
                   git-revision: true
-#        - multijob:
-#            name: functest-smoke
-#            condition: SUCCESSFUL
-#            projects:
-#              - name: 'functest-apex-virtual-suite-{stream}'
-#                current-parameters: false
-#                predefined-parameters: |
-#                  DEPLOY_SCENARIO={verify-scenario}
-#                  FUNCTEST_SUITE_NAME=healthcheck
-#                  GERRIT_BRANCH=$GERRIT_BRANCH
-#                  GERRIT_REFSPEC=$GERRIT_REFSPEC
-#                  GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
-#                  GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
-#                node-parameters: true
-#                kill-phase-on: FAILURE
-#                abort-all-job: true
-#                git-revision: false
+        - multijob:
+            name: functest-smoke
+            condition: SUCCESSFUL
+            projects:
+              - name: 'functest-apex-virtual-suite-{stream}'
+                current-parameters: false
+                predefined-parameters: |
+                  DEPLOY_SCENARIO={verify-scenario}
+                  FUNCTEST_SUITE_NAME=healthcheck
+                  GERRIT_BRANCH=$GERRIT_BRANCH
+                  GERRIT_REFSPEC=$GERRIT_REFSPEC
+                  GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+                  GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+                node-parameters: true
+                kill-phase-on: NEVER
+                abort-all-job: true
+                git-revision: false
 
 - job-template:
     name: 'apex-runner-cperf-{stream}'
diff --git a/jjb/ci_gate_security/anteater-security-audit.sh b/jjb/ci_gate_security/anteater-security-audit.sh
new file mode 100644 (file)
index 0000000..9192b1b
--- /dev/null
@@ -0,0 +1,33 @@
+#!/bin/bash
+set -o pipefail
+
+cd $WORKSPACE
+echo "Generating patchset file to list changed files"
+git diff HEAD^1 --name-only | sed "s#^#/home/opnfv/anteater/$PROJECT/#" > $WORKSPACE/patchset
+echo "Changed files are"
+echo "--------------------------------------------------------"
+cat $WORKSPACE/patchset
+echo "--------------------------------------------------------"
+
+vols="-v $WORKSPACE:/home/opnfv/anteater/$PROJECT"
+envs="-e PROJECT=$PROJECT"
+
+echo "Pulling releng-anteater docker image"
+echo "--------------------------------------------------------"
+docker pull opnfv/releng-anteater
+echo "--------------------------------------------------------"
+
+cmd="sudo docker run --privileged=true -id $envs $vols opnfv/releng-anteater /bin/bash"
+echo "Running docker command $cmd"
+container_id=$($cmd)
+echo "Container ID is $container_id"
+cmd="anteater --project $PROJECT --patchset /home/opnfv/anteater/$PROJECT/patchset"
+echo "Executing command inside container"
+echo "$cmd"
+echo "--------------------------------------------------------"
+docker exec $container_id $cmd | tee securityaudit.log
+exit_code=$?
+echo "--------------------------------------------------------"
+echo "Stopping docker container with ID $container_id"
+docker stop $container_id
+exit $exit_code
index 732df89..84e9dd1 100644 (file)
     disabled: '{obj:disabled}'
 
     parameters:
+        - label:
+            name: SLAVE_LABEL
+            default: 'ericsson-build3'
+            description: 'Slave label on Jenkins'
         - project-parameter:
             project: $GERRIT_PROJECT
             branch: '{branch}'
+        - string:
+            name: GIT_BASE
+            default: https://gerrit.opnfv.org/gerrit/$PROJECT
+            description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
 
     scm:
         - git-scm-gerrit
                     branch-pattern: '**/{branch}'
                 file-paths:
                   - compare-type: ANT
-                    pattern: '**/*.py'
-          skip-vote:
-            successful: true
-            failed: true
-            unstable: true
-            notbuilt: true
+                    pattern: '**'
+            skip-vote:
+                successful: true
+                failed: true
+                unstable: true
+                notbuilt: true
 
     builders:
-        - security-audit-python-code
+        - anteater-security-audit
         - report-security-audit-result-to-gerrit
 ########################
 # builder macros
 ########################
 - builder:
-    name: security-audit-python-code
+    name: anteater-security-audit
     builders:
-        - shell: |
-            #!/bin/bash
-            set -o errexit
-            set -o pipefail
-            set -o xtrace
-            export PATH=$PATH:/usr/local/bin/
+        - shell:
+            !include-raw: ./anteater-security-audit.sh
 
-            # this is where the security/license audit script will be executed
-            echo "Hello World!"
 - builder:
     name: report-security-audit-result-to-gerrit
     builders: