Merge "Move iec jenkins job in jjb/akraino-templates"
authorEric Ball <eball@linuxfoundation.org>
Tue, 25 Feb 2020 15:25:37 +0000 (15:25 +0000)
committerGerrit Code Review <gerrit@akraino.org>
Tue, 25 Feb 2020 15:25:37 +0000 (15:25 +0000)
jjb/akraino-templates/akraino-jjb-templates.yaml
jjb/akraino-templates/akraino-ta-common-macros.yaml
jjb/ci-management/static-slaves-ci-jobs.yaml [new file with mode: 0644]
jjb/iec/iec-compass-build.sh
jjb/iec/iec-compass-deploy.sh
jjb/iec/iec-compass-destroy.sh
jjb/iec/iec-fdn-install.sh
jjb/shell/ta-iso-deploy.sh
jjb/shell/ta-rpm-deploy.sh

index 55d9c69..82d34dd 100644 (file)
 
     publishers:
       - lf-infra-publish
+
+- job-template:
+    id: akraino-project-build-node-init
+    name: '{project-name}-{build-node}-init'
+    disabled: '{obj:disabled}'
+    concurrent: true
+
+    parameters:
+      - lf-infra-parameters:
+          project: '{project}'
+          stream: '{stream}'
+          branch: '{branch}'
+      - label:
+          name: '{build-node}'
+          default: '{build-node}'
+          node-eligibility: 'all'
+          all-nodes: true
+
+    gerrit_merge_triggers:
+      - change-merged-event
+      - comment-added-contains-event:
+          comment-contains-value: remerge$
+
+    gerrit_trigger_file_paths:
+      - compare-type: REG_EXP
+        pattern: 'global-jjb'
+
+    scm:
+      - lf-infra-gerrit-scm:
+          jenkins-ssh-credential: '{jenkins-ssh-credential}'
+          git-url: '{git-url}/{project}.git'
+          refspec: ''
+          branch: '{branch}'
+          submodule-recursive: true
+          submodule-timeout: '{submodule-timeout}'
+          submodule-disable: false
+          choosing-strategy: default
+
+    triggers:
+      - gerrit:
+          server-name: '{gerrit-server-name}'
+          trigger-on: '{obj:gerrit_merge_triggers}'
+          projects:
+            - project-compare-type: ANT
+              project-pattern: '{project}'
+              branches:
+                - branch-compare-type: ANT
+                  branch-pattern: '**/{branch}'
+              file-paths: '{obj:gerrit_trigger_file_paths}'
+
+    builders:
+      - description-setter:
+          description: "POD: $NODE_NAME"
+      - shell: |
+          #!/bin/bash -ex
+          export SWAP_SIZE=0
+          sudo -E ./global-jjb/jenkins-init-scripts/init.sh
+          sudo chown jenkins:jenkins -R archives
index 782e6b8..1f6bcb3 100644 (file)
           # Ensure python-tools are installed in case job template does not
           # call the lf-infra-pre-build macro.
           - ../../global-jjb/shell/python-tools-install.sh
+      - shell: !include-raw:
           - ../shell/ta-rpm-deploy.sh
       - shell: !include-raw:
           - ../../global-jjb/shell/logs-clear-credentials.sh
           # Ensure python-tools are installed in case job template does not
           # call the lf-infra-pre-build macro.
           - ../../global-jjb/shell/python-tools-install.sh
+      - shell: !include-raw:
           - ../shell/ta-iso-deploy.sh
       - shell: !include-raw:
           - ../../global-jjb/shell/logs-clear-credentials.sh
diff --git a/jjb/ci-management/static-slaves-ci-jobs.yaml b/jjb/ci-management/static-slaves-ci-jobs.yaml
new file mode 100644 (file)
index 0000000..c07b550
--- /dev/null
@@ -0,0 +1,16 @@
+---
+- project:
+    name: static-slaves-ci-jobs
+
+    project: ci-management
+    project-name: ci-management
+    branch: master
+    stream: '{branch}'
+
+    build-node:
+      - aarch64_dev
+      - aarch64_build
+      - aarch64_baremetal
+
+    jobs:
+      - akraino-project-build-node-init
index b403230..e604dfc 100755 (executable)
@@ -36,8 +36,11 @@ ln -s $COMPASS_WORK_DIR work
 
 sudo docker rm -f `sudo docker ps | grep compass | cut -f1 -d' '` || true
 
-curl -s http://people.linaro.org/~yibo.cai/compass/compass4nfv-arm64-fixup.sh | bash || true
+curl -sL http://people.linaro.org/~yibo.cai/compass/compass4nfv-arm64-fixup.sh | bash || true
 
 ./build.sh
 
+# Fix permissions so we can archive log files before pushing to Nexus
+sudo chown $(id -u):$(id -g) -R "${WORKSPACE}"
+
 exit 0
index 9db4c0b..443c115 100755 (executable)
@@ -46,4 +46,6 @@ echo "Compass Deploy successful"
 
 rm -rf "$COMPASS_WORK_DIR"
 rm -rf work
+# Fix permissions so we can archive log files before pushing to Nexus
+sudo chown $(id -u):$(id -g) -R "${WORKSPACE}"
 exit 0
index fbd448b..3c1993d 100755 (executable)
@@ -1,5 +1,7 @@
 #!/bin/bash
-set -e
+
+# Do not exit this script if one of the cleanup steps fails
+set +e
 
 rm -rf compass4nfv
 sudo virsh destroy host1
index 40852df..e1a74fa 100755 (executable)
@@ -18,5 +18,7 @@ HOST_USER=root
 export HOST_USER
 ./startup.sh
 
+# Fix permissions so we can archive log files before pushing to Nexus
+sudo chown $(id -u):$(id -g) -R "${WORKSPACE}"
 
 exit 0
index 1ec4731..705ac3c 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -l
 # SPDX-License-Identifier: EPL-1.0
 ##############################################################################
 # Copyright (c) 2017 The Linux Foundation and others.
@@ -16,6 +16,8 @@ set -eu -o pipefail
 
 set -x  # Trace commands for this script to make debugging easier.
 
+set +f  # Ensure filename expansion (globbing) is enabled
+
 NEXUS_REPO=images-snapshots
 release_path=TA/release-1
 
index f0381e8..d742333 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -l
 # SPDX-License-Identifier: EPL-1.0
 ##############################################################################
 # Copyright (c) 2017 The Linux Foundation and others.
@@ -16,6 +16,8 @@ set -eu -o pipefail
 
 set -x  # Trace commands for this script to make debugging easier.
 
+set +f  # Ensure filename expansion (globbing) is enabled
+
 NEXUS_REPO=rpm.snapshots
 release_path=TA/release-1