aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan-Simon Möller <dl9pf@gmx.de>2017-06-12 20:00:16 +0200
committerJan-Simon Möller <dl9pf@gmx.de>2017-06-12 20:01:57 +0200
commit088afa1e0c707dcef25b84b606cb8eb27524330d (patch)
treee8fd8b93d2c62efcbe79054e225d4cf96a4eddbf
parent8039fe319cfdef105f34cc6f103e2b40123041d6 (diff)
Add small ci-AGL-verify and add silent to triggers
Change-Id: Ib35fe86f061c6acc66e89ff42c9cc21a93cc8010 Signed-off-by: Jan-Simon Möller <dl9pf@gmx.de>
-rw-r--r--jjb/ci-AGL-verify/.gitignore1
-rw-r--r--jjb/ci-AGL-verify/ci-platform-jjb.yaml587
-rw-r--r--jjb/common/include-agl-remove-artifacts-changeid.sh12
-rw-r--r--jjb/common/include-agl-run-test-prepare.sh2
-rw-r--r--jjb/common/include-agl-run-test-short-release.sh2
-rw-r--r--jjb/common/include-agl-run-test-short.sh2
-rw-r--r--jjb/common/include-apps-build-app.sh24
-rw-r--r--jjb/common/include-apps-fetch-install-sdk.sh20
-rw-r--r--jjb/common/include-apps-header.sh20
-rw-r--r--jjb/common/include-apps-rsync-download-changeid.sh30
-rw-r--r--jjb/global-macros.yaml29
11 files changed, 706 insertions, 23 deletions
diff --git a/jjb/ci-AGL-verify/.gitignore b/jjb/ci-AGL-verify/.gitignore
new file mode 100644
index 0000000..7856d0a
--- /dev/null
+++ b/jjb/ci-AGL-verify/.gitignore
@@ -0,0 +1 @@
+ATTIC/
diff --git a/jjb/ci-AGL-verify/ci-platform-jjb.yaml b/jjb/ci-AGL-verify/ci-platform-jjb.yaml
new file mode 100644
index 0000000..6c8f35f
--- /dev/null
+++ b/jjb/ci-AGL-verify/ci-platform-jjb.yaml
@@ -0,0 +1,587 @@
+---
+- project:
+ name: ci-platform-AGL
+ machine:
+ - raspberrypi3
+ project:
+ - meta-agl
+ - meta-agl-demo
+ - meta-agl-devel
+ - meta-agl-extra
+ - AGL-repo
+ - meta-renesas
+ - meta-renesas-rcar-gen3
+ jobs:
+ - ci-platform-{project}-verify
+ # - ci-platform-{project}-verify-CIB-start #unused
+ - ci-platform-{project}-verify-CIB-{machine}
+ - ci-platform-{project}-verify-CIB-finish-success
+ - ci-platform-{project}-verify-failure
+ # - ci-platform-{project}-verify-CIBT-start #unused
+ - ci-platform-{project}-verify-CIBT-{machine}
+ - ci-platform-{project}-verify-CIBT-finish-success
+ - ci-platform-{project}-remove-artifacts
+
+
+################################################################################################################################################################
+################################################################################################################################################################
+
+################################################################################
+################################################################################
+# -verify = trigger from gerrit and control job, multijob order
+################################################################################
+- job-template:
+ name: 'ci-platform-{project}-verify'
+ project-type: multijob
+ concurrent: true
+ node: control-slave
+ parameters:
+ - string:
+ name: GERRIT_PROJECT
+ default: 'AGL/{project}'
+ description: "Project to build"
+ - string:
+ name: GERRIT_BRANCH
+ default: master
+ description: "branch to build"
+ - string:
+ name: GERRIT_REFSPEC
+ default: refs/heads/master
+ description: "refspec to build"
+ - string:
+ name: GERRIT_CHANGE_NUMBER
+ default: "8313"
+ description: "change # to build"
+ - string:
+ name: GERRIT_PATCHSET_NUMBER
+ default: "2"
+ description: "patchset # to build"
+ build-discarder:
+ days-to-keep: 30
+ artifact-days-to-keep: -1
+ artifact-num-to-keep: 5
+ triggers:
+ - gerrit-trigger-patch-submitted-manual-verified:
+ name: 'AGL/{project}'
+ branch: '**/**/**'
+ wrappers:
+ - agl-infra-wrappers:
+ build-timeout: '{build-timeout}'
+ builders:
+ - shell: |
+ set
+ export TRIGGERURL=$(echo ${{BUILD_URL}} | sed -e 's,-CIB-start.*,,')
+ echo \$TRIGGERURL
+ #ssh -p 29418 agl-jobbuilder@gerrit.automotivelinux.org gerrit review ${{GERRIT_CHANGE_NUMBER}},${{GERRIT_PATCHSET_NUMBER}} --verified=0 -n NONE --message="CI-cycle\ started.\ URL:\ ${{BUILD_URL}}" || true
+ # - multijob:
+ # name: CIB-{project}-start
+ # condition: SUCCESSFUL
+ # projects:
+ # - name: 'ci-platform-{project}-verify-CIB-start'
+ # current-parameters: true
+ # abort-all-job: true
+ # kill-phase-on: FAILURE
+ - multijob:
+ name: CIB-{project}
+ condition: SUCCESSFUL
+ projects:
+ - name: 'ci-platform-{project}-verify-CIB-porter-nogfx'
+ current-parameters: true
+ abort-all-job: true
+ kill-phase-on: FAILURE
+ - name: 'ci-platform-{project}-verify-CIB-intel-corei7-64'
+ current-parameters: true
+ abort-all-job: true
+ kill-phase-on: FAILURE
+ - name: 'ci-platform-{project}-verify-CIB-raspberrypi3'
+ current-parameters: true
+ abort-all-job: true
+ kill-phase-on: FAILURE
+ - name: 'ci-platform-{project}-verify-CIB-dra7xx-evm'
+ current-parameters: true
+ abort-all-job: true
+ kill-phase-on: FAILURE
+ - name: 'ci-platform-{project}-verify-CIB-qemux86-64'
+ current-parameters: true
+ abort-all-job: true
+ kill-phase-on: FAILURE
+ - multijob:
+ name: CIB-{project}-finish-success
+ condition: SUCCESSFUL
+ projects:
+ - name: 'ci-platform-{project}-verify-CIB-finish-success'
+ current-parameters: true
+ abort-all-job: true
+ kill-phase-on: FAILURE
+ # - multijob:
+ # name: 'CIBT-{project}-start'
+ # condition: SUCCESSFUL
+ # projects:
+ # - name: 'ci-platform-{project}-verify-CIBT-start'
+ # current-parameters: true
+ # abort-all-job: true
+ # kill-phase-on: FAILURE
+ - multijob:
+ name: CIBT-{project}
+ condition: SUCCESSFUL
+ projects:
+ - name: 'ci-platform-{project}-verify-CIBT-porter-nogfx'
+ current-parameters: true
+ abort-all-job: true
+ kill-phase-on: FAILURE
+ - name: 'ci-platform-{project}-verify-CIBT-intel-corei7-64'
+ current-parameters: true
+ abort-all-job: true
+ kill-phase-on: FAILURE
+ - name: 'ci-platform-{project}-verify-CIBT-raspberrypi3'
+ current-parameters: true
+ abort-all-job: true
+ kill-phase-on: FAILURE
+ - name: 'ci-platform-{project}-verify-CIBT-dra7xx-evm'
+ current-parameters: true
+ abort-all-job: true
+ kill-phase-on: FAILURE
+ - name: 'ci-platform-{project}-verify-CIBT-qemux86-64'
+ current-parameters: true
+ abort-all-job: true
+ kill-phase-on: FAILURE
+ - multijob:
+ name: 'CIBT-{project}-finish-success'
+ condition: SUCCESSFUL
+ projects:
+ - name: 'ci-platform-{project}-verify-CIBT-finish-success'
+ current-parameters: true
+ abort-all-job: true
+ kill-phase-on: FAILURE
+# publishers:
+# - trigger-parameterized-builds:
+# - project:
+# - ci-platform-{project}-verify-failure
+# condition: FAILED
+# current-parameters: true
+
+
+################################################################################################################################################################
+################################################################################################################################################################
+
+################################################################################
+################################################################################
+# -verify-CIB-start = start message (message back to gerrit)
+################################################################################
+- job-template:
+ name: 'ci-platform-{project}-verify-CIB-start'
+ project-type: freestyle
+ concurrent: true
+ node: control-slave
+ parameters:
+ - string:
+ name: GERRIT_PROJECT
+ default: 'AGL/{project}'
+ description: "Project to build"
+ - string:
+ name: GERRIT_BRANCH
+ default: master
+ description: "branch to build"
+ - string:
+ name: GERRIT_REFSPEC
+ default: refs/heads/master
+ description: "refspec to build"
+ - string:
+ name: GERRIT_CHANGE_NUMBER
+ default: "8313"
+ description: "change # to build"
+ - string:
+ name: GERRIT_PATCHSET_NUMBER
+ default: "2"
+ description: "patchset # to build"
+ build-discarder:
+ days-to-keep: 30
+ artifact-days-to-keep: -1
+ artifact-num-to-keep: 5
+ wrappers:
+ - agl-infra-wrappers:
+ build-timeout: '{build-timeout}'
+ - openstack:
+ single-use: false
+ builders:
+ - shell: |
+ #set
+ export TRIGGERURL=$(echo ${{BUILD_URL}} | sed -e 's,-CIB-start.*,,')
+ # ssh -p 29418 agl-jobbuilder@gerrit.automotivelinux.org gerrit review ${{GERRIT_CHANGE_NUMBER}},${{GERRIT_PATCHSET_NUMBER}} --verified=0 --label ci-image-build=0 --label ci-image-boot-test=0 -n NONE --message="CI-Image-Build\ started.\ URL:\ ${{BUILD_URL}}" || true
+ #ssh -p 29418 agl-jobbuilder@gerrit.automotivelinux.org gerrit review ${{GERRIT_CHANGE_NUMBER}},${{GERRIT_PATCHSET_NUMBER}} --verified=0 -n NONE --message="CI-Image-Build\ started.\ URL:\ \$TRIGGERURL" || true
+
+
+################################################################################
+################################################################################
+# -verify-CIB-{machine} = build for machine
+################################################################################
+- job-template:
+ name: 'ci-platform-{project}-verify-CIB-{machine}'
+ project-type: freestyle
+ concurrent: true
+ node: agl-test-slave
+ parameters:
+ - string:
+ name: GERRIT_PROJECT
+ default: 'AGL/{project}'
+ description: "Project to build"
+ - string:
+ name: GERRIT_BRANCH
+ default: master
+ description: "branch to build"
+ - string:
+ name: GERRIT_REFSPEC
+ default: refs/heads/master
+ description: "refspec to build"
+ - string:
+ name: GERRIT_CHANGE_NUMBER
+ default: "8313"
+ description: "change # to build"
+ - string:
+ name: GERRIT_PATCHSET_NUMBER
+ default: "2"
+ description: "patchset # to build"
+ - string:
+ name: MACHINE
+ default: '{machine}'
+ description: "Machine to build"
+ build-discarder:
+ days-to-keep: 30
+ artifact-days-to-keep: -1
+ artifact-num-to-keep: 5
+ wrappers:
+ - agl-infra-wrappers:
+ build-timeout: '{build-timeout}'
+ - openstack:
+ single-use: true
+ builders:
+ - shell:
+ !include-raw-escape:
+ - ../common/include-agl-header.sh
+ - ../common/include-agl-repo.sh
+ - ../common/include-agl-select.sh
+ - ../common/include-agl-source-aglsetup.sh
+ - ../common/include-agl-auto-conf.sh
+ - ../common/include-agl-limit-parallelism.sh
+ - ../common/include-agl-local-conf-fstypes.sh
+ - ../common/include-agl-cat-auto-conf.sh
+ - ../common/include-agl-bitbake-image.sh
+ - ../common/include-agl-run-test-prepare.sh
+ - ../common/include-agl-run-test-rsync-changeid.sh
+ publishers:
+ - naginator:
+ rerun-unstable-builds: true
+ progressive-delay-increment: 5
+ progressive-delay-maximum: 15
+ max-failed-builds: 2
+ #regular-expression: "Unexpected termination of the channel"
+
+
+################################################################################
+################################################################################
+# -verify-CIB-finish-success = build succeeded, message to gerrit
+################################################################################
+- job-template:
+ name: 'ci-platform-{project}-verify-CIB-finish-success'
+ project-type: freestyle
+ concurrent: true
+ node: control-slave
+ parameters:
+ - string:
+ name: GERRIT_PROJECT
+ default: 'AGL/{project}'
+ description: "Project to build"
+ - string:
+ name: GERRIT_BRANCH
+ default: master
+ description: "branch to build"
+ - string:
+ name: GERRIT_REFSPEC
+ default: refs/heads/master
+ description: "refspec to build"
+ - string:
+ name: GERRIT_CHANGE_NUMBER
+ default: "8313"
+ description: "change # to build"
+ - string:
+ name: GERRIT_PATCHSET_NUMBER
+ default: "2"
+ description: "patchset # to build"
+ build-discarder:
+ days-to-keep: 30
+ artifact-days-to-keep: -1
+ artifact-num-to-keep: 5
+ wrappers:
+ - agl-infra-wrappers:
+ build-timeout: '{build-timeout}'
+ builders:
+ - shell: |
+ set
+ echo "#### CIB +1 #### Verified +1 ####"
+ #ssh -p 29418 agl-jobbuilder@gerrit.automotivelinux.org gerrit review ${{GERRIT_CHANGE_NUMBER}},${{GERRIT_PATCHSET_NUMBER}} --verified +1 --label ci-image-build=+1 -n NONE --message="CI-Image-Build\ finished,\ CIB+1,\ Verified+1" || true
+
+
+################################################################################
+################################################################################
+# -verify-failure = CI check failed, -1 message to gerrit
+################################################################################
+- job-template:
+ name: 'ci-platform-{project}-verify-failure'
+ project-type: freestyle
+ concurrent: true
+ node: control-slave
+ parameters:
+ - string:
+ name: GERRIT_PROJECT
+ default: 'AGL/{project}'
+ description: "Project to build"
+ - string:
+ name: GERRIT_BRANCH
+ default: master
+ description: "branch to build"
+ - string:
+ name: GERRIT_REFSPEC
+ default: refs/heads/master
+ description: "refspec to build"
+ - string:
+ name: GERRIT_CHANGE_NUMBER
+ default: "8313"
+ description: "change # to build"
+ - string:
+ name: GERRIT_PATCHSET_NUMBER
+ default: "2"
+ description: "patchset # to build"
+ build-discarder:
+ days-to-keep: 30
+ artifact-days-to-keep: -1
+ artifact-num-to-keep: 5
+ wrappers:
+ - agl-infra-wrappers:
+ build-timeout: '{build-timeout}'
+ builders:
+ - shell: |
+ set
+ echo "#### Verified -1 ####"
+ #ssh -p 29418 agl-jobbuilder@gerrit.automotivelinux.org gerrit review ${{GERRIT_CHANGE_NUMBER}},${{GERRIT_PATCHSET_NUMBER}} --verified -1 -n NONE --message="CI-cycle\ failed.\ URL:\ ${{BUILD_URL}}" || true
+ #ssh -p 29418 agl-jobbuilder@gerrit.automotivelinux.org gerrit review ${{GERRIT_CHANGE_NUMBER}},${{GERRIT_PATCHSET_NUMBER}} -n NONE --message="CI-cycle\ failed.\ URL:\ ${{BUILD_URL}}" || true
+
+
+################################################################################################################################################################
+################################################################################################################################################################
+
+################################################################################
+################################################################################
+# -verify-CIBT-start = CI BOOT TEST start
+################################################################################
+- job-template:
+ name: 'ci-platform-{project}-verify-CIBT-start'
+ project-type: freestyle
+ concurrent: true
+ node: control-slave
+ parameters:
+ - string:
+ name: GERRIT_PROJECT
+ default: 'AGL/{project}'
+ description: "Project to build"
+ - string:
+ name: GERRIT_BRANCH
+ default: master
+ description: "branch to build"
+ - string:
+ name: GERRIT_REFSPEC
+ default: refs/heads/master
+ description: "refspec to build"
+ - string:
+ name: GERRIT_CHANGE_NUMBER
+ default: "8313"
+ description: "change # to build"
+ - string:
+ name: GERRIT_PATCHSET_NUMBER
+ default: "2"
+ description: "patchset # to build"
+ build-discarder:
+ days-to-keep: 30
+ artifact-days-to-keep: -1
+ artifact-num-to-keep: 5
+ wrappers:
+ - agl-infra-wrappers:
+ build-timeout: '{build-timeout}'
+ - openstack:
+ single-use: false
+ builders:
+ - shell: |
+ echo "CIBT Started"
+ # set
+ # ssh -p 29418 agl-jobbuilder@gerrit.automotivelinux.org gerrit review ${{GERRIT_CHANGE_NUMBER}},${{GERRIT_PATCHSET_NUMBER}} --label ci-image-boot-test=0 -n NONE --message='CI-Image-Boot-Test\ started' || true
+
+
+################################################################################
+################################################################################
+# -verify-CIBT-{machine} = CI BOOT TEST on machine
+################################################################################
+- job-template:
+ name: 'ci-platform-{project}-verify-CIBT-{machine}'
+ project-type: freestyle
+ concurrent: true
+ node: hwtest-slave
+ parameters:
+ - string:
+ name: GERRIT_PROJECT
+ default: 'AGL/{project}'
+ description: "Project to build"
+ - string:
+ name: GERRIT_BRANCH
+ default: master
+ description: "branch to build"
+ - string:
+ name: GERRIT_REFSPEC
+ default: refs/heads/master
+ description: "refspec to build"
+ - string:
+ name: GERRIT_CHANGE_NUMBER
+ default: "8313"
+ description: "change # to build"
+ - string:
+ name: GERRIT_PATCHSET_NUMBER
+ default: "2"
+ description: "patchset # to build"
+ - string:
+ name: MACHINE
+ default: '{machine}'
+ description: "Machine to build"
+ build-discarder:
+ days-to-keep: 30
+ artifact-days-to-keep: -1
+ artifact-num-to-keep: 5
+ wrappers:
+ - agl-infra-wrappers:
+ build-timeout: '{build-timeout}'
+ - openstack:
+ single-use: false
+ - credentials-binding:
+ - username-password-separated:
+ credential-id: agl_main_lava_instance
+ username: AGLLAVAUSER
+ password: AGLLAVATOKEN
+ - username-password-separated:
+ credential-id: agl_main_lava_instance
+ username: LAB_AGL_USER
+ password: LAB_AGL_TOKEN
+ - username-password-separated:
+ credential-id: lab_baylibre_lava_instance
+ username: LAB_BAYLIBRE_USER
+ password: LAB_BAYLIBRE_TOKEN
+ - username-password-separated:
+ credential-id: lab_baylibre_seattle_lava_instance
+ username: LAB_BAYLIBRE_SEATTLE_USER
+ password: LAB_BAYLIBRE_SEATTLE_TOKEN
+ builders:
+ - shell:
+ !include-raw-escape:
+ - ../common/include-agl-header.sh
+ - ../common/include-agl-repo.sh
+ - ../common/include-agl-select.sh
+ - ../common/include-agl-run-test-prepare.sh
+ - ../common/include-agl-lava-labs-prepare.sh
+ - ../common/include-agl-run-test-short.sh
+ publishers:
+ - naginator:
+ max-failed-builds: 2
+
+################################################################################
+################################################################################
+# -verify-CIBT-finish-success = CI BOOT TEST succeeded, CIBT+1 to gerrit
+################################################################################
+- job-template:
+ name: 'ci-platform-{project}-verify-CIBT-finish-success'
+ project-type: freestyle
+ concurrent: true
+ node: control-slave
+ parameters:
+ - string:
+ name: GERRIT_PROJECT
+ default: 'AGL/{project}'
+ description: "Project to build"
+ - string:
+ name: GERRIT_BRANCH
+ default: master
+ description: "branch to build"
+ - string:
+ name: GERRIT_REFSPEC
+ default: refs/heads/master
+ description: "refspec to build"
+ - string:
+ name: GERRIT_CHANGE_NUMBER
+ default: "8313"
+ description: "change # to build"
+ - string:
+ name: GERRIT_PATCHSET_NUMBER
+ default: "2"
+ description: "patchset # to build"
+ build-discarder:
+ days-to-keep: 30
+ artifact-days-to-keep: -1
+ artifact-num-to-keep: 5
+ wrappers:
+ - agl-infra-wrappers:
+ build-timeout: '{build-timeout}'
+ - openstack:
+ single-use: false
+ builders:
+ - shell: |
+ # set
+ echo "#### CIBT +1 ####"
+ #ssh -p 29418 agl-jobbuilder@gerrit.automotivelinux.org gerrit review ${{GERRIT_CHANGE_NUMBER}},${{GERRIT_PATCHSET_NUMBER}} --verified +1 --label ci-image-build=+1 --label ci-image-boot-test=+1 -n NONE --message='CI-Image-Boot-Test\ finished' || true
+
+
+################################################################################################################################################################
+################################################################################################################################################################
+
+################################################################################
+################################################################################
+# -remove-artifacts = merge/abandon, remove artifacts and later trigger sstate
+################################################################################
+- job-template:
+ name: 'ci-platform-{project}-remove-artifacts'
+ project-type: freestyle
+ concurrent: true
+ node: control-slave
+ parameters:
+ - string:
+ name: GERRIT_PROJECT
+ default: 'AGL/{project}'
+ description: "Project to build"
+ - string:
+ name: GERRIT_BRANCH
+ default: master
+ description: "branch to build"
+ - string:
+ name: GERRIT_REFSPEC
+ default: refs/heads/master
+ description: "refspec to build"
+ - string:
+ name: GERRIT_CHANGE_NUMBER
+ default: "8313"
+ description: "change # to build"
+ - string:
+ name: GERRIT_PATCHSET_NUMBER
+ default: "2"
+ description: "patchset # to build"
+ build-discarder:
+ days-to-keep: 30
+ artifact-days-to-keep: -1
+ artifact-num-to-keep: 5
+ wrappers:
+ - agl-infra-wrappers:
+ build-timeout: '{build-timeout}'
+ - openstack:
+ single-use: false
+ triggers:
+ - gerrit-trigger-silent-patch-merged-abandoned:
+ name: 'AGL/{project}'
+ branch: '**/**/**'
+ builders:
+ - shell:
+ !include-raw-escape:
+ - ../common/include-agl-remove-artifacts-changeid.sh
+
diff --git a/jjb/common/include-agl-remove-artifacts-changeid.sh b/jjb/common/include-agl-remove-artifacts-changeid.sh
new file mode 100644
index 0000000..5cb1829
--- /dev/null
+++ b/jjb/common/include-agl-remove-artifacts-changeid.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+#set -x
+set -e
+
+echo "\n\n\n"
+echo "################REMOVE CHANGEID#########################"
+echo "\n\n\n"
+
+
+export DST="/srv/download/AGL/upload/ci/${GERRIT_CHANGE_NUMBER}"
+ssh -o StrictHostKeyChecking=no jenkins-slave@10.30.72.8 rm -rf ${DST}
diff --git a/jjb/common/include-agl-run-test-prepare.sh b/jjb/common/include-agl-run-test-prepare.sh
index bf765c7..36f5a7a 100644
--- a/jjb/common/include-agl-run-test-prepare.sh
+++ b/jjb/common/include-agl-run-test-prepare.sh
@@ -4,7 +4,7 @@
################################################################################
## Run SHORT CI test
################################################################################
-set -x
+#set -x
#ls -alh
#pwd
diff --git a/jjb/common/include-agl-run-test-short-release.sh b/jjb/common/include-agl-run-test-short-release.sh
index 02a7fc1..f09dca8 100644
--- a/jjb/common/include-agl-run-test-short-release.sh
+++ b/jjb/common/include-agl-run-test-short-release.sh
@@ -6,7 +6,7 @@
################################################################################
-set -x
+#set -x
echo "## ${MACHINE} ##"
cd $REPODIR
diff --git a/jjb/common/include-agl-run-test-short.sh b/jjb/common/include-agl-run-test-short.sh
index 6897fde..1ffc6f4 100644
--- a/jjb/common/include-agl-run-test-short.sh
+++ b/jjb/common/include-agl-run-test-short.sh
@@ -6,7 +6,7 @@
################################################################################
-set -x
+#set -x
echo "## ${MACHINE} ##"
cd $REPODIR
diff --git a/jjb/common/include-apps-build-app.sh b/jjb/common/include-apps-build-app.sh
index 01d765d..f46c7f8 100644
--- a/jjb/common/include-apps-build-app.sh
+++ b/jjb/common/include-apps-build-app.sh
@@ -40,18 +40,32 @@ HANDLED="no"
# Projects in apps/*
###################
-if [[ ! x"yes" = x"$HANDLED" ]] && $(echo "$TARGETPROJECT" | grep -q "^apps/"); then
+if [[ ! x"yes" = x"$HANDLED" ]] && $(echo "$TARGETPROJECT" | grep -q "apps/"); then
MYPROJECT=`echo $TARGETPROJECT | sed -e "s#apps/##g"`
# clone git
rm -rf ${MYPROJECT}
-
git clone https://${GERRIT_HOST}/gerrit/${GERRIT_PROJECT}.git
pushd ${MYPROJECT}
- git log -1
- git reset --hard ${GERRIT_REFSPEC}
- git log -1
+ git log -1 --pretty=oneline
+ if test x"" != x"${TARGETREFSPEC}" ; then
+ git fetch origin ${TARGETREFSPEC}
+ git reset --hard FETCH_HEAD
+ else
+ # try
+ # GERRIT_CHANGE_NUMBER="9551"
+ # GERRIT_PATCHSET_NUMBER="2"
+ if ( test x"" != x"${GERRIT_CHANGE_NUMBER}" -a x"" != x"${GERRIT_PATCHSET_NUMBER}" ) ; then
+ pip install --user git-review
+ git review -d ${GERRIT_CHANGE_NUMBER},${GERRIT_PATCHSET_NUMBER}
+ fi
+ sleep 2
+ # if not reset, we leave it to master
+ fi
+ git log -1 --pretty=oneline
+
+ # Fixme: use aglbuild script
if test -f Makefile ; then
make
make package
diff --git a/jjb/common/include-apps-fetch-install-sdk.sh b/jjb/common/include-apps-fetch-install-sdk.sh
index 436c384..b099d9a 100644
--- a/jjb/common/include-apps-fetch-install-sdk.sh
+++ b/jjb/common/include-apps-fetch-install-sdk.sh
@@ -11,6 +11,7 @@ SDKHOSTDIR="~/agl-sdk"
## apps-fetch-install-sdk.sh
################################################################################
+# should probably switch to release ... or multiple (release/snapshot) fwiw
SDKBASEURL="https://download.automotivelinux.org/AGL/snapshots/master/latest/${TARGETSDKMACHINE}/deploy/sdk/"
export TARGETSDKNAME=$(curl -s "$SDKBASEURL" | grep -e "crosssdk.*\.sh<" | sed -e "s#.*<a href=\"##g" -e "s#\">poky-agl.*##g")
@@ -27,23 +28,22 @@ fi
chmod a+x ${TARGETSDKNAME}
-eval export TARGETSDKENVSCRIPT="${SDKHOSTDIR}/environment-setup-${TARGETSDKARCH}-agl-linux-gnueabi"
-
-if test ! -f ${TARGETSDKENVSCRIPT} ; then
+if test x"" = x"$(eval ls ${SDKHOSTDIR}/environment-setup* | grep "agl-" | grep ${TARGETSDKARCH} 2>/dev/null)" ; then
bash ${TARGETSDKNAME} -d ${SDKHOSTDIR}/ -y
fi
+#set -x
+
+# find out the env setup script
+export TARGETSDKENVSCRIPT="$(eval ls ${SDKHOSTDIR}/environment-setup* | grep "agl-" | grep ${TARGETSDKARCH} 2>/dev/null)"
+
if test ! -f ${TARGETSDKENVSCRIPT} ; then
echo "Script not there after extracting sdk ?!"
echo "Abort."
exit 1
fi
+echo "About to source ${TARGETSDKENVSCRIPT}"
source "${TARGETSDKENVSCRIPT}"
+#set | grep -i sysroots || true
+#set +x
-ls -alh ~/
-
-ls
-
-ls -alh
-
-set \ No newline at end of file
diff --git a/jjb/common/include-apps-header.sh b/jjb/common/include-apps-header.sh
index 7c60b1a..eb57c92 100644
--- a/jjb/common/include-apps-header.sh
+++ b/jjb/common/include-apps-header.sh
@@ -25,12 +25,17 @@ function dprint() {
}
#export TARGETARCHALL="arm aarch64 x86-64"
+#set | grep arm
+#set | grep aarch64
+#set | grep x86-64
-if test x"" = x"${architecture}"; then
- export TARGETARCH="arm"
-else
- export TARGETARCH="${architecture}"
-fi
+echo "################################################################################"
+set | grep TARGETARCH
+echo "################################################################################"
+#if test x"" = x"${TARGETARCH}"; then
+# export TARGETARCH="arm"
+#fi
+#set +x
# finally cmdline arguments
while getopts ":b:a:p:r:dvx" opt; do
@@ -126,3 +131,8 @@ if test x"" = x"$TARGETSDKMACHINE" ; then
echo "No TARGETSDKMACHINE variable. Exiting."
exit 1
fi
+
+
+echo "################################################################################"
+set | grep ^TARGET
+echo "################################################################################"
diff --git a/jjb/common/include-apps-rsync-download-changeid.sh b/jjb/common/include-apps-rsync-download-changeid.sh
new file mode 100644
index 0000000..d6e9f8a
--- /dev/null
+++ b/jjb/common/include-apps-rsync-download-changeid.sh
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+#set -x
+set -e
+
+echo "\n\n\n"
+echo "#########################################"
+echo "\n\n\n"
+
+
+export RSYNCDST="/srv/download/AGL/upload/ci/${GERRIT_CHANGE_NUMBER}/${GERRIT_PATCHSET_NUMBER}"
+export RSYNCSRC=$(pwd)/UPLOAD/
+
+# construct upload folder
+#mv UPLOAD UPLOAD2 || true
+rm -rf UPLOAD/${TARGETARCH} || true
+mkdir -p UPLOAD/${TARGETARCH}
+export DEST=$(pwd)/UPLOAD/${TARGETARCH}
+
+pushd ${MYPROJECT}
+ls
+ls package
+
+cp package/*.wgt $DEST
+ls -alh $DEST
+LANG=C tree $RSYNCSRC
+
+popd
+ssh -o StrictHostKeyChecking=no jenkins-slave@10.30.72.8 mkdir -p ${RSYNCDST}
+rsync -avr -L -e "ssh -o StrictHostKeyChecking=no" $RSYNCSRC jenkins-slave@10.30.72.8:$RSYNCDST
diff --git a/jjb/global-macros.yaml b/jjb/global-macros.yaml
index 9631be0..7b619a5 100644
--- a/jjb/global-macros.yaml
+++ b/jjb/global-macros.yaml
@@ -104,6 +104,7 @@
branches:
- branch-compare-type: 'ANT'
branch-pattern: '**/{branch}'
+ silent: 'true'
- trigger:
name: gerrit-trigger-patch-submitted-manual-verified-silent
@@ -244,6 +245,7 @@
- branch-compare-type: 'ANT'
branch-pattern: '**/{branch}'
silent-start: 'true'
+ silent: 'true'
- trigger:
@@ -261,6 +263,8 @@
branches:
- branch-compare-type: 'ANT'
branch-pattern: '**/{branch}'
+ silent: 'true'
+
- trigger:
name: gerrit-trigger-silent-patch-submitted
@@ -284,6 +288,7 @@
- branch-compare-type: 'ANT'
branch-pattern: '**/{branch}'
silent-start: 'true'
+ silent: 'true'
- trigger:
name: gerrit-trigger-silent-full-check
@@ -300,6 +305,7 @@
- branch-compare-type: 'ANT'
branch-pattern: '**/{branch}'
silent-start: 'true'
+ silent: 'true'
- trigger:
name: gerrit-trigger-silent-patch-merged
@@ -317,6 +323,7 @@
- branch-compare-type: 'ANT'
branch-pattern: '**/{branch}'
silent-start: 'true'
+ silent: 'true'
- trigger:
name: gerrit-trigger-tag
@@ -331,6 +338,28 @@
branches:
- branch-compare-type: 'ANT'
branch-pattern: 'refs/tags/**'
+ silent: 'true'
+
+- trigger:
+ name: gerrit-trigger-silent-patch-merged-abandoned
+ triggers:
+ - gerrit:
+ server-name: 'gerrit.automotivelinux.org'
+ trigger-on:
+ - change-merged-event
+ - change-abandoned-event
+ - comment-added-contains-event:
+ comment-contains-value: 'remove-artifacts'
+ - comment-added-contains-event:
+ comment-contains-value: 'remerge'
+ projects:
+ - project-compare-type: 'ANT'
+ project-pattern: '{name}'
+ branches:
+ - branch-compare-type: 'ANT'
+ branch-pattern: '**/{branch}'
+ silent-start: 'true'
+ silent: 'true'
# Publishers
- publisher: