aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan-Simon Möller <dl9pf@gmx.de>2017-06-07 17:48:30 +0200
committerJan-Simon Möller <dl9pf@gmx.de>2017-06-07 17:48:51 +0200
commit32a13c265f1a1f6dba19ac9b264772accda222e0 (patch)
tree7b0fe04b3d38fafb4da54867bfd3d71f084f00e9
parent593c41aa28a9c8944e92e94fcec64545aaf9aacf (diff)
Initial import for ci-management-sandbox
Change-Id: I5cf7e9dd37f78cd06038c3bf37233ee1dbc8a7de Signed-off-by: Jan-Simon Möller <dl9pf@gmx.de>
-rw-r--r--.gitignore22
-rw-r--r--.gitreview4
-rw-r--r--README.md1
-rw-r--r--jenkins-scripts/README8
-rwxr-xr-xjenkins-scripts/basic_settings.sh61
-rwxr-xr-xjenkins-scripts/create_jenkins_user.sh41
-rwxr-xr-xjenkins-scripts/jenkins-init-script.sh27
-rwxr-xr-xjenkins-scripts/system_type.sh31
-rw-r--r--jenkins.ini.example12
-rw-r--r--jjb/.gitignore1
-rw-r--r--jjb/ci-management/ci-management.yaml78
-rw-r--r--jjb/ci-management/include-raw-jjb-update.sh10
-rw-r--r--jjb/common/.gitignore4
-rw-r--r--jjb/common/OLD/include-agl-test-nbd-short.sh129
-rw-r--r--jjb/common/include-agl-auto-conf-cvscheck.sh15
-rw-r--r--jjb/common/include-agl-auto-conf.sh35
-rw-r--r--jjb/common/include-agl-bitbake-image-fake.sh37
-rw-r--r--jjb/common/include-agl-bitbake-image.sh12
-rw-r--r--jjb/common/include-agl-bitbake-sdk.sh12
-rw-r--r--jjb/common/include-agl-cat-auto-conf.sh3
-rw-r--r--jjb/common/include-agl-cd-repoclone-output.sh3
-rw-r--r--jjb/common/include-agl-header.sh154
-rw-r--r--jjb/common/include-agl-lava-labs-prepare.sh59
-rw-r--r--jjb/common/include-agl-limit-parallelism.sh9
-rw-r--r--jjb/common/include-agl-local-conf-archiver.sh11
-rw-r--r--jjb/common/include-agl-local-conf-cvscheck.sh16
-rw-r--r--jjb/common/include-agl-local-conf-fstypes.sh14
-rw-r--r--jjb/common/include-agl-local-conf-isafw.sh10
-rw-r--r--jjb/common/include-agl-local-conf-vmdk.sh10
-rw-r--r--jjb/common/include-agl-repo.sh30
-rw-r--r--jjb/common/include-agl-run-test-prepare.sh78
-rw-r--r--jjb/common/include-agl-run-test-rsync-changeid.sh38
-rw-r--r--jjb/common/include-agl-run-test-rsync-release.sh38
-rw-r--r--jjb/common/include-agl-run-test-short-release.sh115
-rw-r--r--jjb/common/include-agl-run-test-short.sh115
-rw-r--r--jjb/common/include-agl-select.sh87
-rw-r--r--jjb/common/include-agl-source-aglsetup.sh17
-rw-r--r--jjb/common/include-apps-build-app.sh67
-rw-r--r--jjb/common/include-apps-fetch-install-sdk.sh49
-rw-r--r--jjb/common/include-apps-header.sh128
-rw-r--r--jjb/global-defaults.yaml13
-rw-r--r--jjb/global-macros.yaml397
-rw-r--r--scripts/.gitkeep0
-rwxr-xr-xscripts/check-unicode.sh29
44 files changed, 2030 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..b574f48
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,22 @@
+# Ignore Vim temporary files
+.*.sw?
+
+# Ignore changes to the JJB Configuration File
+jenkins.ini
+
+# We don't want .netrc files since they're credential files
+.netrc
+
+# Maven
+target/
+
+# Vagrant
+.vagrant
+
+# IntelliJ
+.idea/
+*.iml
+
+# packer local run
+packer/output_ubuntu
+packer/packer_cache
diff --git a/.gitreview b/.gitreview
new file mode 100644
index 0000000..0a5e558
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,4 @@
+[gerrit]
+host=gerrit.automotivelinux.org
+port=29418
+project=ci-management-sandbox.git
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..c84a70b
--- /dev/null
+++ b/README.md
@@ -0,0 +1 @@
+AGL CI-MANAGEMENT SANDBOX
diff --git a/jenkins-scripts/README b/jenkins-scripts/README
new file mode 100644
index 0000000..91485ef
--- /dev/null
+++ b/jenkins-scripts/README
@@ -0,0 +1,8 @@
+The scripts in this directory are used by the Jenkins spin-up component
+for dynamic minions.
+
+The spinup script will be as follows (${system_type} will be replaced
+with the appropriate system_type script)
+
+git clone https://gerrit.zephyrproject.org/r/p/ci-management.git /ci-management
+/ci-management/jenkins-scripts/jenkins-init-script.sh
diff --git a/jenkins-scripts/basic_settings.sh b/jenkins-scripts/basic_settings.sh
new file mode 100755
index 0000000..3aefc9e
--- /dev/null
+++ b/jenkins-scripts/basic_settings.sh
@@ -0,0 +1,61 @@
+#!/bin/bash
+# @License EPL-1.0 <http://spdx.org/licenses/EPL-1.0>
+##############################################################################
+# Copyright (c) 2016 The Linux Foundation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+##############################################################################
+
+case "$(facter operatingsystem)" in
+ Ubuntu)
+ apt-get update
+ ;;
+ *)
+ # Do nothing on other distros for now
+ ;;
+esac
+
+IPADDR=$(facter ipaddress)
+HOSTNAME=$(facter hostname)
+FQDN=$(facter fqdn)
+
+echo "${IPADDR} ${HOSTNAME} ${FQDN}" >> /etc/hosts
+
+cat <<EOFHOSTS >> /etc/hosts
+# workaround for download
+199.19.213.77 download.automotivelinux.org
+EOFHOSTS
+
+
+#Increase limits
+cat <<EOF > /etc/security/limits.d/jenkins.conf
+jenkins soft nofile 64000
+jenkins hard nofile 64000
+jenkins soft nproc 30654
+jenkins hard nproc 30654
+EOF
+
+cat <<EOSSH >> /etc/ssh/ssh_config
+Host *
+ ServerAliveInterval 60
+
+# we don't want to do SSH host key checking on spin-up systems
+Host 10.30.72.*
+ StrictHostKeyChecking no
+ UserKnownHostsFile /dev/null
+
+Host vex-yul-agl-download.ci.codeaurora.org
+ StrictHostKeyChecking no
+ UserKnownHostsFile /dev/null
+
+EOSSH
+
+cat <<EOKNOWN > /etc/ssh/ssh_known_hosts
+[gerrit.automotivelinux.org]:29418,[198.145.29.87]:29418 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQC7mx+OxVdwr6s5M/JJn5DxxVu9n7dfIZrB+mS88m51oJmHCWDBGEncpUskrzAwI5uXYTeG4FamcxtrHumVL3oZ6F4m93DG486/LM/4ff8qbEjYNoYYqY004wW2kbg1ivZ/DWmIyAyw0JCOv+Ia39krT5Zv6LI68skimCE/6pRbsw==
+vex-yul-agl-download.ci,10.30.72.8 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNaxEOWbShvqQWqS17c123Ct8tBLBVVOPTNYpZSmwd1UKVQi9cF0QMOU7Rc479bHwzuLscvmohpGh2kP0CmHvAo=
+EOKNOWN
+
+# vim: sw=2 ts=2 sts=2 et :
diff --git a/jenkins-scripts/create_jenkins_user.sh b/jenkins-scripts/create_jenkins_user.sh
new file mode 100755
index 0000000..86a5c92
--- /dev/null
+++ b/jenkins-scripts/create_jenkins_user.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+# @License EPL-1.0 <http://spdx.org/licenses/EPL-1.0>
+##############################################################################
+# Copyright (c) 2016 The Linux Foundation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+##############################################################################
+
+#######################
+# Create Jenkins User #
+#######################
+
+OS=$(facter operatingsystem | tr '[:upper:]' '[:lower:]')
+
+useradd -m -s /bin/bash jenkins
+
+# Check if docker group exists
+grep -q docker /etc/group
+if [ "$?" == '0' ]
+then
+ # Add jenkins user to docker group
+ usermod -a -G docker jenkins
+fi
+
+# Check if mock group exists
+grep -q mock /etc/group
+if [ "$?" == '0' ]
+then
+ # Add jenkins user to mock group so they can build Int/Pack's RPMs
+ usermod -a -G mock jenkins
+fi
+
+mkdir /home/jenkins/.ssh
+mkdir /w
+cp -r /home/${OS}/.ssh/authorized_keys /home/jenkins/.ssh/authorized_keys
+# Generate ssh key for use by Robot jobs
+echo -e 'y\n' | ssh-keygen -N "" -f /home/jenkins/.ssh/id_rsa -t rsa
+chown -R jenkins:jenkins /home/jenkins/.ssh /w
diff --git a/jenkins-scripts/jenkins-init-script.sh b/jenkins-scripts/jenkins-init-script.sh
new file mode 100755
index 0000000..67987b5
--- /dev/null
+++ b/jenkins-scripts/jenkins-init-script.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+# @License EPL-1.0 <http://spdx.org/licenses/EPL-1.0>
+##############################################################################
+# Copyright (c) 2016 The Linux Foundation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+##############################################################################
+
+# vim: ts=4 sw=4 sts=4 et :
+
+cd /ci-management/jenkins-scripts
+chmod +x ./*.sh
+./system_type.sh
+
+source /tmp/system_type.sh
+./basic_settings.sh
+if [ -f "${SYSTEM_TYPE}.sh" ]
+then
+ ./"${SYSTEM_TYPE}.sh"
+fi
+
+# Create the jenkins user last so that hopefully we don't have to deal with
+# guard files
+./create_jenkins_user.sh
diff --git a/jenkins-scripts/system_type.sh b/jenkins-scripts/system_type.sh
new file mode 100755
index 0000000..9aeea20
--- /dev/null
+++ b/jenkins-scripts/system_type.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+# @License EPL-1.0 <http://spdx.org/licenses/EPL-1.0>
+##############################################################################
+# Copyright (c) 2016 The Linux Foundation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+##############################################################################
+
+HOST=$(/bin/hostname)
+SYSTEM_TYPE=''
+
+IFS=','
+for i in "basebuild,basebuild" \
+ "centos,centos" \
+ "trusty,trusty" \
+ "xenial,xenial"
+do set -- $i
+ if [[ $HOST == *"$1"* ]]; then
+ SYSTEM_TYPE="$2"
+ break
+ fi
+done
+
+# Write out the system type to an environment file to then be sourced
+echo "SYSTEM_TYPE=${SYSTEM_TYPE}" > /tmp/system_type.sh
+
+# vim: sw=4 ts=4 sts=4 et :
diff --git a/jenkins.ini.example b/jenkins.ini.example
new file mode 100644
index 0000000..c8486f8
--- /dev/null
+++ b/jenkins.ini.example
@@ -0,0 +1,12 @@
+[job_builder]
+ignore_cache=True
+keep_descriptions=False
+include_path=.:scripts:~/git/
+recursive=True
+
+[jenkins]
+#user=jenkins
+#password=1234567890abcdef1234567890abcdef
+url=http://localhost:8080
+##### This is deprecated, use job_builder section instead
+#ignore_cache=True
diff --git a/jjb/.gitignore b/jjb/.gitignore
new file mode 100644
index 0000000..b2e5509
--- /dev/null
+++ b/jjb/.gitignore
@@ -0,0 +1 @@
+ci-apps-verify/poky-agl-glibc-x86_64-*.sh \ No newline at end of file
diff --git a/jjb/ci-management/ci-management.yaml b/jjb/ci-management/ci-management.yaml
new file mode 100644
index 0000000..664746f
--- /dev/null
+++ b/jjb/ci-management/ci-management.yaml
@@ -0,0 +1,78 @@
+---
+- project:
+ name: ci-management-sandbox-jobs
+ jobs:
+ - 'ci-management-sandbox-verify-jjb'
+ - 'ci-management-sandbox-merge'
+
+ project: 'ci-management-sandbox'
+ branch: master
+
+- job-template:
+ name: ci-management-sandbox-verify-jjb
+
+ project-type: freestyle
+ node: master
+ concurrent: true
+
+ parameters:
+ - agl-infra-parameters:
+ project: '{project}'
+ branch: 'master'
+ refspec: 'refs/heads/master'
+
+ scm:
+ - gerrit-trigger-scm:
+ refspec: '$GERRIT_REFSPEC'
+ choosing-strategy: 'gerrit'
+
+ wrappers:
+ - ssh-agent-credentials:
+ users:
+ - '{ssh-credentials}'
+
+ triggers:
+ - gerrit-trigger-patch-submitted:
+ name: '{project}'
+ branch: '{branch}'
+
+ builders:
+ - shell: |
+ ls -alh ; jenkins-jobs test --recursive jjb/
+ - ci-management-sandbox-check-unicode
+
+- job-template:
+ name: 'ci-management-sandbox-merge'
+
+ project-type: freestyle
+ node: master
+
+ build-discarder:
+ days-to-keep: 30
+ num-to-keep: 40
+ artifact-days-to-keep: -1
+ artifact-num-to-keep: 5
+
+ parameters:
+ - agl-infra-parameters:
+ project: '{project}'
+ branch: 'master'
+ refspec: 'refs/heads/master'
+
+ scm:
+ - gerrit-trigger-scm:
+ refspec: ''
+ choosing-strategy: 'default'
+
+ wrappers:
+ - agl-infra-wrappers:
+ build-timeout: '{build-timeout}'
+
+ triggers:
+ - gerrit-trigger-patch-merged:
+ name: '{project}'
+ branch: '{branch}'
+
+ builders:
+ - shell:
+ !include-raw-escape: include-raw-jjb-update.sh
diff --git a/jjb/ci-management/include-raw-jjb-update.sh b/jjb/ci-management/include-raw-jjb-update.sh
new file mode 100644
index 0000000..de2ec5e
--- /dev/null
+++ b/jjb/ci-management/include-raw-jjb-update.sh
@@ -0,0 +1,10 @@
+jenkins-jobs update --delete-old --recursive jjb/
+
+# Submit patches for any jobs that can be auto updated
+function submitJJB {
+ git commit -asm "Update automated project templates"
+ git push origin HEAD:refs/for/master
+}
+
+gitdir=$(git rev-parse --git-dir); scp -p -P 29418 agl-jobbuilder@gerrit.automotivelinux.org:hooks/commit-msg ${gitdir}/hooks/
+git diff --exit-code || submitJJB
diff --git a/jjb/common/.gitignore b/jjb/common/.gitignore
new file mode 100644
index 0000000..67b3066
--- /dev/null
+++ b/jjb/common/.gitignore
@@ -0,0 +1,4 @@
+downloads
+sstate-cache
+repoclone*
+current_* \ No newline at end of file
diff --git a/jjb/common/OLD/include-agl-test-nbd-short.sh b/jjb/common/OLD/include-agl-test-nbd-short.sh
new file mode 100644
index 0000000..ed50503
--- /dev/null
+++ b/jjb/common/OLD/include-agl-test-nbd-short.sh
@@ -0,0 +1,129 @@
+# (c) 2016 Jan-Simon Moeller dl9pf(at)gmx.de
+# License GPLv2
+
+################################################################################
+## Run SHORT CI test
+################################################################################
+
+# test currently only for porter, rest WIP
+TESTRUN=false
+echo "## ${MACHINE} ##"
+
+case ${MACHINE} in
+ porter-nogfx)
+
+ TESTRUN=true
+ TARGETMACHINE="porter"
+ ;;
+ porter)
+ TESTRUN=true
+ TARGETMACHINE="porter"
+ ;;
+ *)
+ TESTRUN=false
+ ;;
+esac
+
+
+TESTRUN=false
+
+if ${TESTRUN}; then
+
+echo "#################################"
+echo "TEST ENABLED for ${TARGETMACHINE}"
+echo "#################################"
+
+pushd tmp/deploy/images/${TARGETMACHINE}/
+
+ROOTFSTOBOOT="none"
+KERNELIMAGE="none"
+NETBOOTIMAGE="none"
+ls
+
+function checkrootfs(){
+ if test -f ./"$1" ; then
+ eval ROOTFSTOBOOT="$1"
+ fi
+}
+
+
+checkrootfs core-image-minimal-${TARGETMACHINE}.ext4
+checkrootfs agl-image-ivi-${TARGETMACHINE}.ext4
+checkrootfs agl-image-ivi-qa-${TARGETMACHINE}.ext4
+checkrootfs agl-demo-platform-qa-${TARGETMACHINE}.ext4
+
+if test x"none" = x"${ROOTFSTOBOOT}"; then
+ echo "No rootfs to boot. Aborting"
+ exit 1
+fi
+
+
+
+if test x"porter" = x"${TARGETMACHINE}"; then
+KERNELIMAGE="zImage+dtb"
+NETBOOTIMAGE="initramfs-netboot-image-porter.ext4.gz.u-boot"
+fi
+
+if test x"none" = x"${KERNELIMAGE}"; then
+ echo "No kernelimage to boot. Aborting"
+ exit 1
+fi
+if test x"none" = x"${NETBOOTIMAGE}"; then
+ echo "No netbootimage to boot. Aborting"
+ exit 1
+fi
+
+function maketmpfile() {
+ DFILE=`mktemp -u -p ./ | sed -e "s#./##g"`
+ eval cp -L \$$1 $DFILE
+ export $1="$DFILE"
+}
+
+maketmpfile ROOTFSTOBOOT
+maketmpfile KERNELIMAGE
+maketmpfile NETBOOTIMAGE
+
+set | grep ROOTFSTOBOOT
+set | grep KERNELIMAGE
+set | grep NETBOOTIMAGE
+
+bash /opt/AGL/lava-agl/upload4lava.sh ${ROOTFSTOBOOT}
+bash /opt/AGL/lava-agl/upload4lava.sh ${KERNELIMAGE}
+bash /opt/AGL/lava-agl/upload4lava.sh ${NETBOOTIMAGE}
+
+cat <<EOF > porterboot_nbd.yaml
+actions:
+ - command: deploy_linaro_kernel
+ parameters:
+ kernel: 'http://localhost/porter/upload/\${KERNELIMAGE}'
+ nbdroot: 'http://localhost/porter/upload/\${ROOTFSTOBOOT}'
+ ramdisk: 'http://localhost/porter/upload/\${NETBOOTIMAGE}'
+ login_prompt: 'porter login:'
+ username: 'root'
+ - command: boot_linaro_image
+ parameters:
+ test_image_prompt: 'root@porter:~#'
+ - command: lava_command_run
+ parameters:
+ commands:
+ - "echo '#### START TEST ####'"
+ - "echo '#### END TEST ####'"
+ timeout: 3600
+device_type: 'renesas-porter'
+logging_level: INFO
+job_name: '${JOB_NAME}'
+timeout: 1800
+
+EOF
+
+cat /opt/AGL/lava-boot/lava-boot | sed -e 's#"~/.lava.yaml"#"/opt/AGL/lava-agl/lava.yaml"#' > ~/lava-boot
+chmod a+x ~/lava-boot
+
+logfile=$(mktemp)
+~/lava-boot porter.automotivelinux.org -j ./porterboot_nbd.yaml -v ROOTFSTOBOOT="${ROOTFSTOBOOT}" -v KERNELIMAGE=${KERNELIMAGE} -v NETBOOTIMAGE=${NETBOOTIMAGE} 2>&1 | tee $logfile
+
+
+popd
+
+
+fi \ No newline at end of file
diff --git a/jjb/common/include-agl-auto-conf-cvscheck.sh b/jjb/common/include-agl-auto-conf-cvscheck.sh
new file mode 100644
index 0000000..a5dc135
--- /dev/null
+++ b/jjb/common/include-agl-auto-conf-cvscheck.sh
@@ -0,0 +1,15 @@
+# (c) 2017 Jan-Simon Moeller dl9pf(at)gmx.de
+# License GPLv2
+
+################################################################################
+## Add archiver
+################################################################################
+
+# only morty and newer support the cve-check, so check for master branch
+
+if [ x"master" = x"$GERRIT_BRANCH" ] ; then
+
+# archive sources within tmp/deploy/
+echo '' >> conf/auto.conf
+echo 'INHERIT += "cve-check"' >> conf/auto.conf
+fi \ No newline at end of file
diff --git a/jjb/common/include-agl-auto-conf.sh b/jjb/common/include-agl-auto-conf.sh
new file mode 100644
index 0000000..8811d3f
--- /dev/null
+++ b/jjb/common/include-agl-auto-conf.sh
@@ -0,0 +1,35 @@
+# (c) 2016 Jan-Simon Moeller dl9pf(at)gmx.de
+# License GPLv2
+
+################################################################################
+## auto.conf inclusion of mirrors
+################################################################################
+
+export DLHOST="http://download.automotivelinux.org/"
+if test x"" = x"${GERRIT_BRANCH}"; then
+ export DISTROBRANCH="master"
+else
+ export DISTROBRANCH="${GERRIT_BRANCH}"
+fi
+#if test ! x"" = x"${RELEASE_BRANCH}"; then
+# export DISTROBRANCH="$RELEASE_BRANCH"
+#fi
+#limit parallel number of bitbake jobs and parallel jobs in make
+cat << EOF >> conf/auto.conf
+PREMIRRORS = "\
+git://.*/.* ${DLHOST}/AGL/mirror/ \n \
+ftp://.*/.* ${DLHOST}/AGL/mirror/ \n \
+http://.*/.* ${DLHOST}/AGL/mirror/ \n \
+https://.*/.* ${DLHOST}/AGL/mirror/ \n \
+ "
+
+SSTATE_MIRRORS = " \
+ file://.* ${DLHOST}/sstate-mirror/${DISTROBRANCH}/\${DEFAULTTUNE}/PATH \n \
+ "
+#
+#file://.* file:///opt/AGL/sstate-mirror/\${MACHINE}/PATH \n
+#
+
+IMAGE_FSTYPES_remove = "ext3"
+SSTATE_DIR = "\${TOPDIR}/sstate-cache/\${MACHINE}/"
+EOF
diff --git a/jjb/common/include-agl-bitbake-image-fake.sh b/jjb/common/include-agl-bitbake-image-fake.sh
new file mode 100644
index 0000000..7cd81c1
--- /dev/null
+++ b/jjb/common/include-agl-bitbake-image-fake.sh
@@ -0,0 +1,37 @@
+# (c) 2016 Jan-Simon Moeller dl9pf(at)gmx.de
+# License GPLv2
+
+################################################################################
+## bitbake the image
+################################################################################
+
+# finally, build the agl-demo-platform (we retry to catch the tar-native bug)
+#( ( bitbake $TARGETIMAGE ) || ( echo '## Failed once, retry .. ##' ; sync ; sleep 2 ; bitbake $TARGETIMAGE ) ) || ( echo '## Failed again, bail out ...' ; exit 1 )
+
+if [ x"${MACHINE}" = x"raspberrypi3" ] ; then
+export DEVICE_TYPE=raspberrypi3-uboot
+export DEVICE_NAME=raspberrypi3
+export DEVICE_DTB=uImage-bcm2710-rpi-3-b.dtb
+export DEVICE_KERNEL=uImage
+export DEVICE_INITRAMFS=initramfs-netboot-image-raspberrypi3.ext4.gz.u-boot
+export DEVICE_NBDROOT=agl-demo-platform-raspberrypi3.ext4
+else
+ echo "This fake build script is for raspberrypi3 only."
+ exit 1
+fi
+
+
+mkdir -p tmp/deploy/images/${MACHINE}/
+
+pushd tmp/deploy/images/${MACHINE}/
+
+for i in DEVICE_DTB DEVICE_KERNEL DEVICE_INITRAMFS DEVICE_NBDROOT ; do
+ eval curl -o "$(echo "$"${i})" "http://download.automotivelinux.org/AGL/snapshots/master/2017-01-08-b241/${MACHINE}/deploy/images/${MACHINE}/$(echo "$"${i})"
+ ls -alh
+done
+
+ls -alh
+
+popd
+
+du -hs tmp/deploy/*
diff --git a/jjb/common/include-agl-bitbake-image.sh b/jjb/common/include-agl-bitbake-image.sh
new file mode 100644
index 0000000..aa4b208
--- /dev/null
+++ b/jjb/common/include-agl-bitbake-image.sh
@@ -0,0 +1,12 @@
+# (c) 2016 Jan-Simon Moeller dl9pf(at)gmx.de
+# License GPLv2
+
+################################################################################
+## bitbake the image
+################################################################################
+
+# finally, build the agl-demo-platform (we retry to catch the tar-native bug)
+( ( bitbake $TARGETIMAGE ) || ( echo '## Failed once, retry .. ##' ; sync ; sleep 2 ; bitbake -v -v $TARGETIMAGE ) ) || ( echo '## Failed again, bail out ...' ; exit 1 )
+
+
+du -hs tmp/deploy/*
diff --git a/jjb/common/include-agl-bitbake-sdk.sh b/jjb/common/include-agl-bitbake-sdk.sh
new file mode 100644
index 0000000..591ea6b
--- /dev/null
+++ b/jjb/common/include-agl-bitbake-sdk.sh
@@ -0,0 +1,12 @@
+# (c) 2016 Jan-Simon Moeller dl9pf(at)gmx.de
+# License GPLv2
+
+################################################################################
+## bitbake the sdk
+################################################################################
+
+# finally, build the agl-demo-platform (we retry to catch the tar-native bug)
+#( ( bitbake -c $TARGETSDK $TARGETIMAGE ) || ( echo '## Failed once, retry .. ##' ; sync ; sleep 2 ; bitbake -c $TARGETSDK $TARGETIMAGE ) ) || ( echo '## Failed again, bail out ... ##' ; exit 1 )
+( ( bitbake $TARGETSDKIMAGE ) || ( echo '## Failed once, retry .. ##' ; sync ; sleep 2 ; bitbake $TARGETSDKIMAGE ) ) || ( echo '## Failed again, bail out ... ##' ; exit 1 )
+
+du -hs tmp/deploy/*
diff --git a/jjb/common/include-agl-cat-auto-conf.sh b/jjb/common/include-agl-cat-auto-conf.sh
new file mode 100644
index 0000000..9a53f6d
--- /dev/null
+++ b/jjb/common/include-agl-cat-auto-conf.sh
@@ -0,0 +1,3 @@
+echo "########## auto.conf ############"
+cat conf/auto.conf
+echo "########## auto.conf ############"
diff --git a/jjb/common/include-agl-cd-repoclone-output.sh b/jjb/common/include-agl-cd-repoclone-output.sh
new file mode 100644
index 0000000..56e8b53
--- /dev/null
+++ b/jjb/common/include-agl-cd-repoclone-output.sh
@@ -0,0 +1,3 @@
+cd repoclone
+export REPODIR=`pwd`
+cd output
diff --git a/jjb/common/include-agl-header.sh b/jjb/common/include-agl-header.sh
new file mode 100644
index 0000000..fab036d
--- /dev/null
+++ b/jjb/common/include-agl-header.sh
@@ -0,0 +1,154 @@
+#!/bin/bash
+# (c) 2016 Jan-Simon Moeller dl9pf(at)gmx.de
+# License GPLv2
+#
+# debugging purposes
+set -e
+
+################################################################################
+## Header
+################################################################################
+
+
+# VARIABLES
+OPTIND=1
+#export DLHOST="http://download.automotivelinux.org/"
+# DLHOST in auto.conf
+export NOGFX=false
+export VERBOSE=false
+export DEBUG=false
+function vprint() {
+ :
+}
+function dprint() {
+ :
+}
+
+# defaults for project, branch, refspec
+export TARGETPROJECT="AGL/AGL-repo"
+export TARGETBRANCH="master"
+export TARGETREFSPEC="refs/heads/master"
+
+export TARGETFEATURESnogfx="agl-appfw-smack agl-netboot agl-devel"
+export TARGETFEATURES="agl-demo ${TARGETFEATURESnogfx}"
+
+export TARGETQA=""
+export TARGETIMAGE="agl-demo-platform\${TARGETQA}"
+export TARGETIMAGEnogfx="core-image-minimal"
+
+export TARGETSDKIMAGE="agl-demo-platform-crosssdk"
+
+
+# apply GERRIT_*
+if test -n "${GERRIT_PROJECT}"; then
+ export TARGETPROJECT="${GERRIT_PROJECT}"
+fi
+if test -n "${GERRIT_BRANCH}"; then
+ export TARGETBRANCH="${GERRIT_BRANCH}"
+fi
+if test -n "${GERRIT_REFSPEC}"; then
+ export TARGETREFSPEC="${GERRIT_REFSPEC}"
+fi
+
+if test x"" = x"${MACHINE}"; then
+ export MACHINE="qemux86-64"
+fi
+
+# finally cmdline arguments
+while getopts ":b:i:p:r:dnqvx" opt; do
+ case "$opt" in
+ b)
+ export TARGETBRANCH="$OPTARG"
+ ;;
+ d)
+ DEBUG=true
+ function dprint() {
+ echo "DEBUG: $@"
+ }
+ ;;
+ i)
+ export TARGETIMAGE="$OPTARG"
+ ;;
+ n)
+ export NOGFX=true
+ ;;
+ p)
+ export TARGETPROJECT="$OPTARG"
+ ;;
+ q)
+ export TARGETQA="-qa"
+ ;;
+ r)
+ export TARGETREFSPEC="$OPTARG"
+ ;;
+ v)
+ VERBOSE=true
+ function vprint() {
+ echo "VERBOSE: \"$@\""
+ }
+ ;;
+ x)
+ set -x
+ ;;
+ h|\?)
+ echo "$0 [-h/-?] -bdinpqrvx"
+ echo "--------------------------------------------------------------------------------"
+ echo " -b <branch> - name of the branch to use (default=master)"
+ echo " -d - debug"
+ echo " -i <image> - name of the image to build (default=agl-demo-platform)"
+ echo " -n - no graphics (no wayland, aka no drivers)"
+ echo " -p <project> - project to use (default=AGL/AGL-repo)"
+ echo " -q - build '*-qa' images (default='')"
+ echo " -r <refspec> - refspec to use (default=refs/heads/master)"
+ echo " -v - verbose"
+ echo " -x - set -x"
+ echo "--------------------------------------------------------------------------------"
+ echo " GERRIT_PROJECT, GERRIT_BRANCH, GERRIT_REFSPEC are used if present,"
+ echo " but cmdline arguments take precedence."
+ echo "--------------------------------------------------------------------------------"
+ exit 1
+ ;;
+ :)
+ echo "Option -$OPTARG required an argument."
+ exit 1
+ ;;
+ esac
+done
+
+# expand
+eval TARGETIMAGE="$TARGETIMAGE"
+eval TARGETIMAGEnogfx="$TARGETIMAGEnogfx"
+
+# The 'real' machine name
+export TARGETMACHINE=${MACHINE}
+
+# The exceptions
+if $NOGFX; then
+ export TARGETIMAGE=${TARGETIMAGEnogfx}
+ export TARGETFEATURES="${TARGETFEATURESnogfx}"
+fi
+# porter-nogfx means no graphic drivers
+if test x"porter-nogfx" = x"$MACHINE"; then
+ export TARGETIMAGE=${TARGETIMAGEnogfx}
+ export TARGETFEATURES="${TARGETFEATURESnogfx}"
+ export TARGETMACHINE="porter"
+ export TARGETSDKIMAGE="agl-image-ivi-crosssdk"
+fi
+# m3ulcb-nogfx means no graphic drivers
+if test x"m3ulcb-nogfx" = x"$MACHINE"; then
+ export TARGETIMAGE=${TARGETIMAGEnogfx}
+ export TARGETFEATURES="${TARGETFEATURESnogfx}"
+ export TARGETMACHINE="m3ulcb"
+ export TARGETSDKIMAGE="agl-image-ivi-crosssdk"
+fi
+
+#if $DEBUG; then
+set | grep ^TARGET || true
+set | grep ^GERRIT || true
+set | grep ^MACHINE || true
+#fi
+
+if test ! -f ~/.gitconfig ; then
+ git config --global user.email "jenkins-dontreply@build.automotivelinux.org"
+ git config --global user.name "jenkins-dontreply@build.automotivelinux.org"
+fi
diff --git a/jjb/common/include-agl-lava-labs-prepare.sh b/jjb/common/include-agl-lava-labs-prepare.sh
new file mode 100644
index 0000000..c7ca9f1
--- /dev/null
+++ b/jjb/common/include-agl-lava-labs-prepare.sh
@@ -0,0 +1,59 @@
+# (c) 2017 Kevin Hilman <khilman@baylibre.com>
+# License GPLv2
+
+#
+# Setup LAVA API authentication tokens for various LAVA labs
+#
+# Uses user/token pairs from Jenkins secrets
+#
+declare -A labs
+labs=(
+ [agl]="https://lava.automotivelinux.org/;$LAB_AGL_USER;$LAB_AGL_TOKEN"
+ [baylibre]="http://lava.baylibre.com:10080/;$LAB_BAYLIBRE_USER;$LAB_BAYLIBRE_TOKEN"
+ [baylibre_seattle]="http://lava.ished.com/;$LAB_BAYLIBRE_SEATTLE_USER;$LAB_BAYLIBRE_SEATTLE_TOKEN"
+ )
+
+#
+# Ensure python_keyring is set to plaintext. Required for
+# non-interactive use
+#
+echo "default keyring config"
+mkdir -p ~/.local/share/python_keyring/
+cat <<EOF > ~/.local/share/python_keyring/keyringrc.cfg
+[backend]
+default-keyring=keyring.backends.file.PlaintextKeyring
+EOF
+
+for lab in "${!labs[@]}"; do
+ val=${labs[$lab]}
+ OFS=${IFS}
+ IFS=';'
+ arr=(${labs[$lab]})
+ IFS=${OFS}
+
+ url=${arr[0]}
+ user=${arr[1]}
+ token=${arr[2]}
+ token_file=$HOME/.local/lab-$lab-token
+
+ if [ -z ${user} ]; then
+ echo "WARNING: Lab ${lab}: missing user. Ignoring."
+ continue
+ fi
+ if [ -z ${token} ]; then
+ echo "WARNING: Lab ${lab}: missing token. Ignoring."
+ continue
+ fi
+
+ # LAVA URL with username
+ full_url=${url/:\/\//:\/\/${user}\@}
+ echo "LAVA auth-add for lab: $lab, URL: $full_url"
+
+ # LAVA auth using token
+ echo ${token} > $token_file
+ lava-tool auth-add --token $token_file $full_url
+ if [ $? != 0 ]; then
+ echo "ERROR: Lab ${lab}: lava-tool auth-add failed."
+ fi
+ rm -f $token_file
+done
diff --git a/jjb/common/include-agl-limit-parallelism.sh b/jjb/common/include-agl-limit-parallelism.sh
new file mode 100644
index 0000000..d717ac3
--- /dev/null
+++ b/jjb/common/include-agl-limit-parallelism.sh
@@ -0,0 +1,9 @@
+
+# Throttle threads to 6
+cat << EOF >> conf/auto.conf
+
+BB_NUMBER_THREADS = "5"
+BB_NUMBER_PARSE_THREADS = "8"
+PARALLEL_MAKE = "-j5"
+
+EOF
diff --git a/jjb/common/include-agl-local-conf-archiver.sh b/jjb/common/include-agl-local-conf-archiver.sh
new file mode 100644
index 0000000..9a0adba
--- /dev/null
+++ b/jjb/common/include-agl-local-conf-archiver.sh
@@ -0,0 +1,11 @@
+# (c) 2016 Jan-Simon Moeller dl9pf(at)gmx.de
+# License GPLv2
+
+################################################################################
+## Add archiver
+################################################################################
+
+# archive sources within tmp/deploy/
+echo '' >> conf/local.conf
+echo 'INHERIT += "archiver"' >> conf/local.conf
+echo 'ARCHIVER_MODE[src] = "original"' >> conf/local.conf
diff --git a/jjb/common/include-agl-local-conf-cvscheck.sh b/jjb/common/include-agl-local-conf-cvscheck.sh
new file mode 100644
index 0000000..d574171
--- /dev/null
+++ b/jjb/common/include-agl-local-conf-cvscheck.sh
@@ -0,0 +1,16 @@
+# (c) 2017 Jan-Simon Moeller dl9pf(at)gmx.de
+# License GPLv2
+
+################################################################################
+## Add archiver
+################################################################################
+
+# only morty and newer support the cve-check, so check for master branch
+
+if [ x"master" = x"$GERRIT_BRANCH" ] ; then
+
+# archive sources within tmp/deploy/
+echo '' >> conf/local.conf
+echo 'INHERIT += "cve-check"' >> conf/local.conf
+
+fi \ No newline at end of file
diff --git a/jjb/common/include-agl-local-conf-fstypes.sh b/jjb/common/include-agl-local-conf-fstypes.sh
new file mode 100644
index 0000000..d22d8bf
--- /dev/null
+++ b/jjb/common/include-agl-local-conf-fstypes.sh
@@ -0,0 +1,14 @@
+# (c) 2016 Jan-Simon Moeller dl9pf(at)gmx.de
+# License GPLv2
+
+################################################################################
+## Change FSTYPES to sane values
+################################################################################
+
+echo 'IMAGE_FSTYPES_remove = "ext4"' >> conf/local.conf
+echo 'IMAGE_FSTYPES_remove = "ext3"' >> conf/local.conf
+echo 'IMAGE_FSTYPES_remove = "tar.bz2"' >> conf/local.conf
+echo 'IMAGE_FSTYPES_remove = "tar.gz"' >> conf/local.conf
+echo 'IMAGE_FSTYPES_remove = "iso"' >> conf/local.conf
+echo 'IMAGE_FSTYPES_remove = "hddimg"' >> conf/local.conf
+echo 'IMAGE_FSTYPES += "tar.xz ext4.xz "' >> conf/local.conf
diff --git a/jjb/common/include-agl-local-conf-isafw.sh b/jjb/common/include-agl-local-conf-isafw.sh
new file mode 100644
index 0000000..5da94cd
--- /dev/null
+++ b/jjb/common/include-agl-local-conf-isafw.sh
@@ -0,0 +1,10 @@
+# (c) 2016 Jan-Simon Moeller dl9pf(at)gmx.de
+# License GPLv2
+
+################################################################################
+## Add isafw report and enable
+################################################################################
+
+# meta-security-isafw
+echo "BBLAYERS += \" $(pwd)/../meta-security-isafw \" " >> conf/bblayers.conf
+echo "INHERIT += \"isafw\" " >> conf/local.conf
diff --git a/jjb/common/include-agl-local-conf-vmdk.sh b/jjb/common/include-agl-local-conf-vmdk.sh
new file mode 100644
index 0000000..30378a9
--- /dev/null
+++ b/jjb/common/include-agl-local-conf-vmdk.sh
@@ -0,0 +1,10 @@
+# (c) 2016 Jan-Simon Moeller dl9pf(at)gmx.de
+# License GPLv2
+
+################################################################################
+## Build vmdk file for qemux86*
+################################################################################
+
+if test x"qemux86" == x"$MACHINE" -o x"qemux86-64" == x"$MACHINE" ; then
+ echo 'IMAGE_FSTYPES += "vmdk"' >> conf/local.conf
+fi
diff --git a/jjb/common/include-agl-repo.sh b/jjb/common/include-agl-repo.sh
new file mode 100644
index 0000000..fee5213
--- /dev/null
+++ b/jjb/common/include-agl-repo.sh
@@ -0,0 +1,30 @@
+# (c) 2016 Jan-Simon Moeller, dl9pf(at)gmx.de
+# License: GPLv2
+
+################################################################################
+## Repo init/sync
+################################################################################
+
+# create shared downloads and sstate-cache directory
+mkdir -p downloads
+mkdir -p sstate-cache
+
+# remove old files, we want to test a fresh clone
+export XTMP="$$"
+mv repoclone repoclone$XTMP || true
+( rm -rf repoclone$XTMP & ) || true
+mkdir -p repoclone
+cd repoclone
+
+export REPODIR=`pwd`
+
+if test x"" = x"${RELEASE_VERSION}" -a x"" = x"${RELEASE_BRANCH}" ; then
+ repo init --reference=/opt/AGL/preclone -q -b $TARGETBRANCH -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo
+else
+ repo init --reference=/opt/AGL/preclone -q -b $TARGETBRANCH -m ${RELEASE_BRANCH}_${RELEASE_VERSION}.xml -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo
+fi
+
+
+# next: repo sync and dump manifest
+repo sync --force-sync --detach --no-clone-bundle
+
diff --git a/jjb/common/include-agl-run-test-prepare.sh b/jjb/common/include-agl-run-test-prepare.sh
new file mode 100644
index 0000000..bf765c7
--- /dev/null
+++ b/jjb/common/include-agl-run-test-prepare.sh
@@ -0,0 +1,78 @@
+# (c) 2016 Jan-Simon Moeller dl9pf(at)gmx.de
+# License GPLv2
+
+################################################################################
+## Run SHORT CI test
+################################################################################
+set -x
+
+#ls -alh
+#pwd
+#set
+
+cd $REPODIR
+
+ls -alhR meta-agl/templates/machine/${MACHINE}
+
+#### Find out if machine can be tested.
+#### We keep a stamp file in meta-agl/templates/machine/$MACHINE/test
+if [ ! -d meta-agl/templates/machine/${MACHINE}/test ]; then
+ echo "No HW test templates for ${MACHINE} configured."
+ echo "Add meta-agl/templates/machine/${MACHINE}/test/ and its contents to enable"
+ exit 0
+fi
+
+if [ ! -f meta-agl/templates/machine/${MACHINE}/test/hwtest.enable ] ; then
+ echo "No HW test for ${MACHINE} configured."
+ echo "Add meta-agl/templates/machine/${MACHINE}/test/hwtest.enable to enable"
+ exit 0
+fi
+
+if [ ! -f meta-agl/templates/machine/${MACHINE}/test/hwtest.short.enable ] ; then
+ echo "No short HW test for ${MACHINE} configured."
+ echo "Add meta-agl/templates/machine/${MACHINE}/test/hwtest.enable.short to enable"
+else
+ eval export ENVFILE=meta-agl/templates/machine/${MACHINE}/test/hwtest.short.environment
+ eval export TESTJOBFILE=meta-agl/templates/machine/${MACHINE}/test/testjob_short.yaml
+fi
+
+if [ ! -f $ENVFILE ] ; then
+ echo "No short HW test environment file available for ${MACHINE}."
+ echo "Add ${ENVFILE} to enable."
+ exit 1
+fi
+
+if [ ! -e $TESTJOBFILE ] ; then
+ echo "No short HW test environment file available for ${MACHINE}."
+ echo "Add ${TESTJOBFILE} to enable."
+ exit 1
+fi
+
+# some defaults
+export DEVICE_TYPE=raspberrypi3-uboot
+export DEVICE_NAME=raspberrypi3
+export DEVICE_DTB=uImage-bcm2710-rpi-3-b.dtb
+export DEVICE_KERNEL=uImage
+export DEVICE_INITRAMFS=initramfs-netboot-image-raspberrypi3.ext4
+export DEVICE_NBDROOT=agl-demo-platform-raspberrypi3.ext4
+export DEVICE_NBDROOT_COMPRESSION=none
+export DEVICE_BOOT_METHOD=u-boot
+export DEVICE_BOOT_TYPE=bootm
+export DEVICE_URL_PREFIX='https://download.automotivelinux.org/AGL/upload/ci/'
+
+
+# import device defaults. Format 'a=b'
+for i in DEVICE_TYPE DEVICE_NAME DEVICE_DTB DEVICE_KERNEL DEVICE_INITRAMFS DEVICE_NBDROOT DEVICE_NBDROOT_COMPRESSION DEVICE_BOOT_METHOD DEVICE_BOOT_TYPE; do
+ if grep -q $i $ENVFILE ; then
+ X=$(grep $i $ENVFILE | sed -e "s#${i}=##g" -e "s#;.*##g")
+ eval export ${i}=${X}
+ fi
+done
+
+echo "Resulting values:"
+set | grep DEVICE_
+
+
+# echo NEXT is rsync
+#exit 0
+
diff --git a/jjb/common/include-agl-run-test-rsync-changeid.sh b/jjb/common/include-agl-run-test-rsync-changeid.sh
new file mode 100644
index 0000000..6416555
--- /dev/null
+++ b/jjb/common/include-agl-run-test-rsync-changeid.sh
@@ -0,0 +1,38 @@
+#!/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 UPLOAD2 || true
+mkdir -p UPLOAD/${MACHINE}
+export DEST=$(pwd)/UPLOAD/${MACHINE}
+
+
+cd $REPODIR
+
+cd output
+
+pwd
+ls -alhR tmp/deploy/images
+
+# copy files to $DEST
+for i in DEVICE_DTB DEVICE_KERNEL DEVICE_INITRAMFS DEVICE_NBDROOT; do
+ eval cp -avL tmp/deploy/images/${TARGETMACHINE}/$(echo "$"${i}) ${DEST}/
+done
+
+tree $DEST
+ls -alhR $DEST
+
+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/common/include-agl-run-test-rsync-release.sh b/jjb/common/include-agl-run-test-rsync-release.sh
new file mode 100644
index 0000000..8560549
--- /dev/null
+++ b/jjb/common/include-agl-run-test-rsync-release.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+#set -x
+set -e
+
+echo "\n\n\n"
+echo "#########################################"
+echo "\n\n\n"
+
+
+export RSYNCDST="/srv/download/AGL/upload/ci/${RELEASE_BRANCH}/${RELEASE_VERSION}"
+export RSYNCSRC=$(pwd)/UPLOAD/
+
+# construct upload folder
+mv UPLOAD UPLOAD2 || true
+rm -rf UPLOAD2 || true
+mkdir -p UPLOAD/${MACHINE}
+export DEST=$(pwd)/UPLOAD/${MACHINE}
+
+
+cd $REPODIR
+
+cd output
+
+pwd
+ls -alhR tmp/deploy/images
+
+# copy files to $DEST
+for i in DEVICE_DTB DEVICE_KERNEL DEVICE_INITRAMFS DEVICE_NBDROOT; do
+ eval cp -avL tmp/deploy/images/${TARGETMACHINE}/$(echo "$"${i}) ${DEST}/
+done
+
+tree $DEST
+ls -alhR $DEST
+
+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/common/include-agl-run-test-short-release.sh b/jjb/common/include-agl-run-test-short-release.sh
new file mode 100644
index 0000000..02a7fc1
--- /dev/null
+++ b/jjb/common/include-agl-run-test-short-release.sh
@@ -0,0 +1,115 @@
+# (c) 2016 Jan-Simon Moeller dl9pf(at)gmx.de
+# License GPLv2
+
+################################################################################
+## Run SHORT CI test
+################################################################################
+
+
+set -x
+
+echo "## ${MACHINE} ##"
+cd $REPODIR
+
+echo "## $TESTJOBFILE ##"
+
+if [ -e $TESTJOBFILE ] ; then
+ echo "Using $TESTJOBFILE ..."
+ cp $TESTJOBFILE testjob.yaml
+else
+ echo "!! NO TESTJOBFILE - trying to continue with a default !!"
+fi
+
+cat <<EOF > testjob.yaml
+# Your first LAVA JOB definition for a $MACHINE board
+device_type: @REPLACE_DEVICE_TYPE@
+job_name: AGL-short-smoke
+
+protocols:
+ lava-xnbd:
+ port: auto
+
+timeouts:
+ job:
+ minutes: 30
+ action:
+ minutes: 15
+ connection:
+ minutes: 5
+priority: medium
+visibility: public
+
+# ACTION_BLOCK
+actions:
+- deploy:
+ timeout:
+ minutes: 10
+ to: nbd
+ dtb:
+ url: '@REPLACE_URL_PREFIX@/@REPLACE_DTB@'
+ kernel:
+ url: '@REPLACE_URL_PREFIX@/@REPLACE_KERNEL@'
+ initrd:
+ url: '@REPLACE_URL_PREFIX@/@REPLACE_INITRAMFS@'
+ allow_modify: false
+ nbdroot:
+ url: '@REPLACE_URL_PREFIX@/@REPLACE_NBDROOT@'
+ compression: @REPLACE_NBDROOT_COMPRESSION@
+ os: debian
+ failure_retry: 2
+
+# BOOT_BLOCK
+- boot:
+ method: @REPLACE_BOOT_METHOD@
+ commands: nbd
+ type: @REPLACE_BOOT_TYPE@
+ prompts: ["root@@REPLACE_MACHINE@:~"]
+ auto_login:
+ login_prompt: "login:"
+ username: root
+
+EOF
+
+CHID=${RELEASE_BRANCH}/${RELEASE_VERSION}/${MACHINE}
+# REPLACE_DEVICE_TYPE
+sed -i -e "s#@REPLACE_DEVICE_TYPE@#${DEVICE_TYPE}#g" testjob.yaml
+sed -i -e "s#@REPLACE_DTB@#${CHID}/${DEVICE_DTB}#g" testjob.yaml
+sed -i -e "s#@REPLACE_KERNEL@#${CHID}/${DEVICE_KERNEL}#g" testjob.yaml
+sed -i -e "s#@REPLACE_INITRAMFS@#${CHID}/${DEVICE_INITRAMFS}#g" testjob.yaml
+sed -i -e "s#@REPLACE_NBDROOT@#${CHID}/${DEVICE_NBDROOT}#g" testjob.yaml
+sed -i -e "s#@REPLACE_NBDROOT_COMPRESSION@#${DEVICE_NBDROOT_COMPRESSION}#g" testjob.yaml
+sed -i -e "s#@REPLACE_BOOT_METHOD@#${DEVICE_BOOT_METHOD}#g" testjob.yaml
+sed -i -e "s#@REPLACE_BOOT_TYPE@#${DEVICE_BOOT_TYPE}#g" testjob.yaml
+sed -i -e "s#@REPLACE_MACHINE@#${DEVICE_NAME}#g" testjob.yaml
+sed -i -e "s#@REPLACE_URL_PREFIX@#${DEVICE_URL_PREFIX}#g" testjob.yaml
+
+cat testjob.yaml
+
+lava-tool submit-job --block https://agl-jenkins-user@lava.automotivelinux.org testjob.yaml | tee .myjob
+
+MYJOB=`cat .myjob | grep "submitted as job" | sed -e "s#submitted as job id: ##g"`
+
+echo "#### JOBID: $MYJOB #####"
+
+( lava-tool job-status https://agl-jenkins-user@lava.automotivelinux.org $MYJOB | tee .status ) || true
+STATUS=`grep "Job Status:" .status | sed -e "s#Job Status: ##g"`
+
+if [ x"Complete" = x"$STATUS" ] ; then
+ echo "YAY! $STATUS"
+ curl -o plain_output.yaml https://lava.automotivelinux.org/scheduler/job/$MYJOB/log_file/plain
+ cat plain_output.yaml | grep '"target",' | sed -e 's#- {"dt".*"lvl".*"msg":."##g' -e 's#"}$##g'
+
+ # cleanup
+ #ssh -o StrictHostKeyChecking=no jenkins-slave@10.30.72.8 rm -rf /srv/download/AGL/upload/ci/${CHID}/
+
+ exit 0
+else
+ echo "Nooooooooo! $STATUS"
+ curl -o plain_output.yaml https://lava.automotivelinux.org/scheduler/job/$MYJOB/log_file/plain
+ cat plain_output.yaml | grep '"target",' | sed -e 's#- {"dt".*"lvl".*"msg":."##g' -e 's#"}$##g'
+
+ # cleanup
+ #ssh -o StrictHostKeyChecking=no jenkins-slave@10.30.72.8 rm -rf /srv/download/AGL/upload/ci/${CHID}/
+
+ exit 1
+fi
diff --git a/jjb/common/include-agl-run-test-short.sh b/jjb/common/include-agl-run-test-short.sh
new file mode 100644
index 0000000..6897fde
--- /dev/null
+++ b/jjb/common/include-agl-run-test-short.sh
@@ -0,0 +1,115 @@
+# (c) 2016 Jan-Simon Moeller dl9pf(at)gmx.de
+# License GPLv2
+
+################################################################################
+## Run SHORT CI test
+################################################################################
+
+
+set -x
+
+echo "## ${MACHINE} ##"
+cd $REPODIR
+
+echo "## $TESTJOBFILE ##"
+
+if [ -e $TESTJOBFILE ] ; then
+ echo "Using $TESTJOBFILE ..."
+ cp $TESTJOBFILE testjob.yaml
+else
+ echo "!! NO TESTJOBFILE - trying to continue with a default !!"
+fi
+
+cat <<EOF > testjob.yaml
+# Your first LAVA JOB definition for a $MACHINE board
+device_type: @REPLACE_DEVICE_TYPE@
+job_name: AGL-short-smoke
+
+protocols:
+ lava-xnbd:
+ port: auto
+
+timeouts:
+ job:
+ minutes: 30
+ action:
+ minutes: 15
+ connection:
+ minutes: 5
+priority: medium
+visibility: public
+
+# ACTION_BLOCK
+actions:
+- deploy:
+ timeout:
+ minutes: 10
+ to: nbd
+ dtb:
+ url: '@REPLACE_URL_PREFIX@/@REPLACE_DTB@'
+ kernel:
+ url: '@REPLACE_URL_PREFIX@/@REPLACE_KERNEL@'
+ initrd:
+ url: '@REPLACE_URL_PREFIX@/@REPLACE_INITRAMFS@'
+ allow_modify: false
+ nbdroot:
+ url: '@REPLACE_URL_PREFIX@/@REPLACE_NBDROOT@'
+ compression: @REPLACE_NBDROOT_COMPRESSION@
+ os: debian
+ failure_retry: 2
+
+# BOOT_BLOCK
+- boot:
+ method: @REPLACE_BOOT_METHOD@
+ commands: nbd
+ type: @REPLACE_BOOT_TYPE@
+ prompts: ["root@@REPLACE_MACHINE@:~"]
+ auto_login:
+ login_prompt: "login:"
+ username: root
+
+EOF
+
+CHID=${GERRIT_CHANGE_NUMBER}/${GERRIT_PATCHSET_NUMBER}/${MACHINE}
+# REPLACE_DEVICE_TYPE
+sed -i -e "s#@REPLACE_DEVICE_TYPE@#${DEVICE_TYPE}#g" testjob.yaml
+sed -i -e "s#@REPLACE_DTB@#${CHID}/${DEVICE_DTB}#g" testjob.yaml
+sed -i -e "s#@REPLACE_KERNEL@#${CHID}/${DEVICE_KERNEL}#g" testjob.yaml
+sed -i -e "s#@REPLACE_INITRAMFS@#${CHID}/${DEVICE_INITRAMFS}#g" testjob.yaml
+sed -i -e "s#@REPLACE_NBDROOT@#${CHID}/${DEVICE_NBDROOT}#g" testjob.yaml
+sed -i -e "s#@REPLACE_NBDROOT_COMPRESSION@#${DEVICE_NBDROOT_COMPRESSION}#g" testjob.yaml
+sed -i -e "s#@REPLACE_BOOT_METHOD@#${DEVICE_BOOT_METHOD}#g" testjob.yaml
+sed -i -e "s#@REPLACE_BOOT_TYPE@#${DEVICE_BOOT_TYPE}#g" testjob.yaml
+sed -i -e "s#@REPLACE_MACHINE@#${DEVICE_NAME}#g" testjob.yaml
+sed -i -e "s#@REPLACE_URL_PREFIX@#${DEVICE_URL_PREFIX}#g" testjob.yaml
+
+cat testjob.yaml
+
+lava-tool submit-job --block https://agl-jenkins-user@lava.automotivelinux.org testjob.yaml | tee .myjob
+
+MYJOB=`cat .myjob | grep "submitted as job" | sed -e "s#submitted as job id: ##g"`
+
+echo "#### JOBID: $MYJOB #####"
+
+( lava-tool job-status https://agl-jenkins-user@lava.automotivelinux.org $MYJOB | tee .status ) || true
+STATUS=`grep "Job Status:" .status | sed -e "s#Job Status: ##g"`
+
+if [ x"Complete" = x"$STATUS" ] ; then
+ echo "YAY! $STATUS"
+ curl -o plain_output.yaml https://lava.automotivelinux.org/scheduler/job/$MYJOB/log_file/plain
+ cat plain_output.yaml | grep '"target",' | sed -e 's#- {"dt".*"lvl".*"msg":."##g' -e 's#"}$##g'
+
+ # cleanup
+ #ssh -o StrictHostKeyChecking=no jenkins-slave@10.30.72.8 rm -rf /srv/download/AGL/upload/ci/${CHID}/
+
+ exit 0
+else
+ echo "Nooooooooo! $STATUS"
+ curl -o plain_output.yaml https://lava.automotivelinux.org/scheduler/job/$MYJOB/log_file/plain
+ cat plain_output.yaml | grep '"target",' | sed -e 's#- {"dt".*"lvl".*"msg":."##g' -e 's#"}$##g'
+
+ # cleanup
+ #ssh -o StrictHostKeyChecking=no jenkins-slave@10.30.72.8 rm -rf /srv/download/AGL/upload/ci/${CHID}/
+
+ exit 1
+fi
diff --git a/jjb/common/include-agl-select.sh b/jjb/common/include-agl-select.sh
new file mode 100644
index 0000000..0ba1684
--- /dev/null
+++ b/jjb/common/include-agl-select.sh
@@ -0,0 +1,87 @@
+# (c) 2016 Jan-Simon Moeller dl9pf(at)gmx.de
+# License GPLv2
+
+################################################################################
+## Select what to build / inject the rev from the gerrit env variable
+################################################################################
+
+HANDLED="no"
+
+# Projects in AGL/*
+###################
+if [[ ! x"yes" = x"$HANDLED" ]] && $(echo "$TARGETPROJECT" | grep -q "^AGL/"); then
+
+ MYPROJECT=`echo $TARGETPROJECT | sed -e "s#AGL/##g"`
+
+ if test x"AGL-repo" = x"$MYPROJECT" ; then
+ cd .repo/manifests
+ MYREMOTE=`git remote | head -1`
+ git fetch ${MYREMOTE} ${TARGETREFSPEC}
+ git reset --hard FETCH_HEAD
+ cd ../../
+ repo sync --force-sync -d
+ else
+ if test -n "${GERRIT_CHANGE_NUMBER}" -a -n "${GERRIT_PATCHSET_NUMBER}" ; then
+ repo download $MYPROJECT ${GERRIT_CHANGE_NUMBER}/${GERRIT_PATCHSET_NUMBER}
+ else
+ cd $MYPROJECT
+ MYREMOTE=`git remote | head -1`
+ git fetch ${MYREMOTE} ${TARGETREFSPEC}
+ git reset --hard FETCH_HEAD
+ cd ..
+ fi
+ fi
+ HANDLED="yes"
+fi
+
+
+# Projects in src/*
+###################
+if [[ ! x"yes" = x"$HANDLED" ]] && $(echo "$TARGETPROJECT" | grep -q "^src/"); then
+
+MYPROJECT=`echo $TARGETPROJECT | sed -e "s#src/##g"`
+
+# We need to set the refspec in the recipe.
+# Therefore each src/* must have a .aglrecipe file with the location
+# relative to a repo clone
+# e.g. ./meta-agl/meta-agl/recipes-graphics/wayland/foo.bb
+#
+# Also there must be a SRCREV tag which we can manipulate.
+#
+#
+echo "Not implemented"
+exit 0
+
+fi
+
+
+# Projects in staging/*
+#######################
+if [[ ! x"yes" = x"$HANDLED" ]] && $(echo "$TARGETPROJECT" | grep -q "^staging/"); then
+
+MYPROJECT=`echo $TARGETPROJECT | sed -e "s#staging/##g"`
+
+# We need to set the refspec in the recipe.
+# Therefore each src/* must have a .aglrecipe file with the location
+# relative to a repo clone
+# e.g. ./meta-agl/meta-agl/recipes-graphics/wayland/foo.bb
+#
+# Also there must be a SRCREV tag which we can manipulate.
+#
+#
+echo "Not implemented"
+exit 0
+
+
+fi
+
+if [[ ! x"yes" = x"$HANDLED" ]] ; then
+ echo "COULD NOT SELECT PROJECT, something is wrong!"
+ echo "$TARGETPROJECT"
+ echo ""
+ set
+ exit 1
+fi
+
+repo manifest -r
+repo manifest -r > ../current_default.xml
diff --git a/jjb/common/include-agl-source-aglsetup.sh b/jjb/common/include-agl-source-aglsetup.sh
new file mode 100644
index 0000000..bb76f10
--- /dev/null
+++ b/jjb/common/include-agl-source-aglsetup.sh
@@ -0,0 +1,17 @@
+# (c) 2016 Jan-Simon Moeller dl9pf(at)gmx.de
+# License GPLv2
+
+################################################################################
+## Source the aglsetup script
+################################################################################
+
+# source the env
+source meta-agl/scripts/aglsetup.sh -m ${MACHINE} -b output ${TARGETFEATURES}
+
+# link the shared downloads and sstate-cache
+ln -sf ../../downloads
+ln -sf ../../sstate-cache
+
+echo "" >> conf/local.conf
+echo "### ADDED BY AUTOBUILDER ###" >> conf/local.conf
+echo "" >> conf/local.conf
diff --git a/jjb/common/include-apps-build-app.sh b/jjb/common/include-apps-build-app.sh
new file mode 100644
index 0000000..01d765d
--- /dev/null
+++ b/jjb/common/include-apps-build-app.sh
@@ -0,0 +1,67 @@
+#!/bin/bash
+# (c) 2016 Jan-Simon Moeller dl9pf(at)gmx.de
+# License GPLv2
+#
+# debugging purposes
+set -e
+
+################################################################################
+# build the app
+################################################################################
+
+# fallback
+if test -z "${GERRIT_PROJECT}"; then
+ export GERRIT_PROJECT="apps/controls"
+fi
+if test -z "${GERRIT_BRANCH}"; then
+ export GERRIT_BRANCH="master"
+fi
+if test -z "${GERRIT_REFSPEC}"; then
+ export GERRIT_REFSPEC="refs/tags/dab_3.99.1"
+fi
+if test -z "${GERRIT_HOST}"; then
+ export GERRIT_HOST="gerrit.automotivelinux.org"
+fi
+
+# apply GERRIT_*
+if test -n "${GERRIT_PROJECT}"; then
+ export TARGETPROJECT="${GERRIT_PROJECT}"
+fi
+if test -n "${GERRIT_BRANCH}"; then
+ export TARGETBRANCH="${GERRIT_BRANCH}"
+fi
+if test -n "${GERRIT_REFSPEC}"; then
+ export TARGETREFSPEC="${GERRIT_REFSPEC}"
+fi
+
+
+
+HANDLED="no"
+
+# Projects in apps/*
+###################
+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
+ if test -f Makefile ; then
+ make
+ make package
+ fi
+ if test -f ${MYPROJECT}.pro; then
+ qmake
+ make
+ make package
+ fi
+ popd
+
+ HANDLED="yes"
+fi
diff --git a/jjb/common/include-apps-fetch-install-sdk.sh b/jjb/common/include-apps-fetch-install-sdk.sh
new file mode 100644
index 0000000..436c384
--- /dev/null
+++ b/jjb/common/include-apps-fetch-install-sdk.sh
@@ -0,0 +1,49 @@
+#!/bin/bash
+# (c) 2017 Jan-Simon Moeller dl9pf(at)gmx.de
+# License GPLv2
+#
+# debugging purposes
+set -e
+
+SDKHOSTDIR="~/agl-sdk"
+
+################################################################################
+## apps-fetch-install-sdk.sh
+################################################################################
+
+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")
+
+if test x"" = x"${TARGETSDKNAME}" ; then
+ echo "Could not retrieve TARGETSDKNAME from download.automotivelinux.org"
+ echo "Abort."
+ exit 1
+fi
+
+if test ! -f ${TARGETSDKNAME} ; then
+ echo "Downloading $TARGETSDKNAME for $MACHINE"
+ wget -nd -c "${SDKBASEURL}/${TARGETSDKNAME}"
+fi
+
+chmod a+x ${TARGETSDKNAME}
+
+eval export TARGETSDKENVSCRIPT="${SDKHOSTDIR}/environment-setup-${TARGETSDKARCH}-agl-linux-gnueabi"
+
+if test ! -f ${TARGETSDKENVSCRIPT} ; then
+ bash ${TARGETSDKNAME} -d ${SDKHOSTDIR}/ -y
+fi
+if test ! -f ${TARGETSDKENVSCRIPT} ; then
+ echo "Script not there after extracting sdk ?!"
+ echo "Abort."
+ exit 1
+fi
+
+source "${TARGETSDKENVSCRIPT}"
+
+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
new file mode 100644
index 0000000..7c60b1a
--- /dev/null
+++ b/jjb/common/include-apps-header.sh
@@ -0,0 +1,128 @@
+#!/bin/bash
+# (c) 2017 Jan-Simon Moeller dl9pf(at)gmx.de
+# License GPLv2
+#
+# debugging purposes
+set -e
+
+################################################################################
+## Header
+################################################################################
+
+
+# VARIABLES
+OPTIND=1
+#export DLHOST="http://download.automotivelinux.org/"
+# DLHOST in auto.conf
+export NOGFX=false
+export VERBOSE=false
+export DEBUG=false
+function vprint() {
+ :
+}
+function dprint() {
+ :
+}
+
+#export TARGETARCHALL="arm aarch64 x86-64"
+
+if test x"" = x"${architecture}"; then
+ export TARGETARCH="arm"
+else
+ export TARGETARCH="${architecture}"
+fi
+
+# finally cmdline arguments
+while getopts ":b:a:p:r:dvx" opt; do
+ case "$opt" in
+ b)
+ export TARGETBRANCH="$OPTARG"
+ ;;
+ d)
+ DEBUG=true
+ function dprint() {
+ echo "DEBUG: $@"
+ }
+ ;;
+ p)
+ export TARGETPROJECT="$OPTARG"
+ ;;
+ a)
+ export TARGETARCH="arm"
+ ;;
+ r)
+ export TARGETREFSPEC="$OPTARG"
+ ;;
+ v)
+ VERBOSE=true
+ function vprint() {
+ echo "VERBOSE: \"$@\""
+ }
+ ;;
+ x)
+ set -x
+ ;;
+ h|\?)
+ echo "$0 [-h/-?] -bdinpqrvx"
+ echo "--------------------------------------------------------------------------------"
+ echo " -b <branch> - name of the branch to use (default=master)"
+ echo " -d - debug"
+ echo " -a - arch"
+ echo " one of:"
+ echo " -- arm"
+ echo " -- x86-64"
+ echo " -- aarch64"
+ echo " -p <project> - project to use (default=AGL/AGL-repo)"
+ echo " -r <refspec> - refspec to use (default=refs/heads/master)"
+ echo " -v - verbose"
+ echo " -x - set -x"
+ echo "--------------------------------------------------------------------------------"
+ echo " GERRIT_PROJECT, GERRIT_BRANCH, GERRIT_REFSPEC are used if present,"
+ echo " but cmdline arguments take precedence."
+ echo "--------------------------------------------------------------------------------"
+ exit 1
+ ;;
+ :)
+ echo "Option -$OPTARG required an argument."
+ exit 1
+ ;;
+ esac
+done
+
+if test ! -f ~/.gitconfig ; then
+ git config --global user.email "jenkins-dontreply@build.automotivelinux.org"
+ git config --global user.name "jenkins-dontreply@build.automotivelinux.org"
+fi
+
+##### map architecture to a machine SDK (until we have generic SDKs) #########
+
+if test x"" = x"$TARGETARCH" ; then
+ echo "No TARGETARCH variable. Exiting."
+ exit 1
+fi
+
+case "$TARGETARCH" in
+ arm)
+ export TARGETSDKARCH="armv7vehf-neon-vfpv4"
+ export TARGETSDKMACHINE="raspberrypi3"
+ ;;
+ x86-64)
+ export TARGETSDKARCH="corei7-64"
+ export TARGETSDKMACHINE="intel-corei7-64"
+ ;;
+ aarch64)
+ export TARGETSDKARCH="aarch64"
+ export TARGETSDKMACHINE="dragonboard-410c"
+ ;;
+esac
+
+# failsafe
+if test x"" = x"$TARGETSDKARCH" ; then
+ echo "No TARGETSDKARCH variable. Exiting."
+ exit 1
+fi
+# failsafe
+if test x"" = x"$TARGETSDKMACHINE" ; then
+ echo "No TARGETSDKMACHINE variable. Exiting."
+ exit 1
+fi
diff --git a/jjb/global-defaults.yaml b/jjb/global-defaults.yaml
new file mode 100644
index 0000000..4e25be0
--- /dev/null
+++ b/jjb/global-defaults.yaml
@@ -0,0 +1,13 @@
+---
+# GLOBAL jenkins defaults
+
+- defaults:
+ name: global
+
+ build-days-to-keep: 30
+ build-num-to-keep: 40
+ build-artifact-days-to-keep: -1
+ build-artifact-num-to-keep: 10
+ # Timeout in minutes
+ build-timeout: 420
+ ssh-credentials: 'agl-jobbuilder'
diff --git a/jjb/global-macros.yaml b/jjb/global-macros.yaml
new file mode 100644
index 0000000..6d7cc06
--- /dev/null
+++ b/jjb/global-macros.yaml
@@ -0,0 +1,397 @@
+---
+# Global macros
+
+# PARAMETERS
+- parameter:
+ name: agl-infra-parameters
+ parameters:
+ - string:
+ name: PROJECT
+ default: '{project}'
+ # yamllint disable rule:line-length
+ description: "JJB configured PROJECT parameter to identify a Gerrit project"
+ # yamllint enable
+ - string:
+ name: GERRIT_BRANCH
+ default: '{branch}'
+ description: "JJB configured GERRIT_BRANCH parameter"
+ - string:
+ name: GERRIT_PROJECT
+ default: '{project}'
+ description: "GERRIT_PROJECT parameter if not given by trigger"
+ - string:
+ name: GERRIT_REFSPEC
+ default: '{refspec}'
+ description: "GERRIT_REFSPEC parameter if not given by trigger"
+
+# SCMS
+- scm:
+ name: git-scm
+ scm:
+ - git:
+ credentials-id: 'd28b1f3b-3603-49bc-b837-bb0a2e85d4b8'
+ url: '$GIT_BASE'
+ refspec: ''
+ branches:
+ - 'origin/${branch}'
+ skip-tag: true
+ wipe-workspace: true
+
+- scm:
+ name: gerrit-trigger-scm
+ scm:
+ - git:
+ credentials-id: 'd28b1f3b-3603-49bc-b837-bb0a2e85d4b8'
+ url: '$GIT_BASE'
+ refspec: '{refspec}'
+ branches:
+ - 'origin/$GERRIT_BRANCH'
+ skip-tag: true
+ choosing-strategy: '{choosing-strategy}'
+
+- scm:
+ name: gerrit-trigger-scm-basedir
+ scm:
+ - git:
+ credentials-id: 'd28b1f3b-3603-49bc-b837-bb0a2e85d4b8'
+ url: '$GIT_BASE'
+ refspec: '{refspec}'
+ branches:
+ - 'origin/$GERRIT_BRANCH'
+ skip-tag: true
+ choosing-strategy: '{choosing-strategy}'
+ basedir: '{basedir}'
+
+- scm:
+ name: git-branch-scm
+ scm:
+ - git:
+ credentials-id: 'd28b1f3b-3603-49bc-b837-bb0a2e85d4b8'
+ url: '$GIT_BASE'
+ refspec: ''
+ branches:
+ - 'origin/{branch}'
+ skip-tag: true
+ wipe-workspace: true
+
+# TRIGGERS
+- trigger:
+ name: gerrit-trigger-patch-submitted
+ triggers:
+ - gerrit:
+ server-name: 'gerrit.automotivelinux.org'
+ trigger-on:
+ - patchset-created-event:
+ exclude-drafts: 'false'
+ exclude-trivial-rebase: 'false'
+ exclude-no-code-change: 'true'
+ - draft-published-event
+ - comment-added-contains-event:
+ comment-contains-value: 'recheck'
+ - comment-added-contains-event:
+ comment-contains-value: 'rebuild'
+ - comment-added-contains-event:
+ comment-contains-value: 'reverify'
+ - comment-added-contains-event:
+ comment-contains-value: 'RECHECK'
+ - comment-added-contains-event:
+ comment-contains-value: 'REBUILD'
+ - comment-added-contains-event:
+ comment-contains-value: 'REVERIFY'
+ projects:
+ - project-compare-type: 'ANT'
+ project-pattern: '{name}'
+ branches:
+ - branch-compare-type: 'ANT'
+ branch-pattern: '**/{branch}'
+
+- trigger:
+ name: gerrit-trigger-patch-submitted-manual-verified-silent
+ triggers:
+ - gerrit:
+ server-name: 'gerrit.automotivelinux.org'
+ trigger-on:
+ - patchset-created-event:
+ exclude-drafts: 'false'
+ exclude-trivial-rebase: 'false'
+ exclude-no-code-change: 'true'
+ - draft-published-event
+ - comment-added-contains-event:
+ comment-contains-value: 'recheck'
+ - comment-added-contains-event:
+ comment-contains-value: 'rebuild'
+ - comment-added-contains-event:
+ comment-contains-value: 'reverify'
+ - comment-added-contains-event:
+ comment-contains-value: 'RECHECK'
+ - comment-added-contains-event:
+ comment-contains-value: 'REBUILD'
+ - comment-added-contains-event:
+ comment-contains-value: 'REVERIFY'
+ projects:
+ - project-compare-type: 'ANT'
+ project-pattern: '{name}'
+ branches:
+ - branch-compare-type: 'ANT'
+ branch-pattern: '**/{branch}'
+ gerrit-build-started-verified-value: 0
+ gerrit-build-successful-verified-value: 1
+ gerrit-build-failed-verified-value: 0
+ skip-vote:
+ successful: true
+ failed: true
+ unstable: true
+ notbuilt: true
+ silent: 'true'
+
+- trigger:
+ name: gerrit-trigger-patch-submitted-manual-verified
+ triggers:
+ - gerrit:
+ server-name: 'gerrit.automotivelinux.org'
+ trigger-on:
+ - patchset-created-event:
+ exclude-drafts: 'false'
+ exclude-trivial-rebase: 'false'
+ exclude-no-code-change: 'true'
+ - draft-published-event
+ - comment-added-contains-event:
+ comment-contains-value: 'recheck'
+ - comment-added-contains-event:
+ comment-contains-value: 'rebuild'
+ - comment-added-contains-event:
+ comment-contains-value: 'reverify'
+ - comment-added-contains-event:
+ comment-contains-value: 'RECHECK'
+ - comment-added-contains-event:
+ comment-contains-value: 'REBUILD'
+ - comment-added-contains-event:
+ comment-contains-value: 'REVERIFY'
+ projects:
+ - project-compare-type: 'ANT'
+ project-pattern: '{name}'
+ branches:
+ - branch-compare-type: 'ANT'
+ branch-pattern: '**/{branch}'
+ gerrit-build-started-verified-value: 0
+ gerrit-build-successful-verified-value: 1
+ gerrit-build-failed-verified-value: 0
+ skip-vote:
+ successful: true
+ failed: true
+ unstable: true
+ notbuilt: true
+ silent: 'true'
+
+- trigger:
+ name: gerrit-trigger-patch-submitted-silent
+ triggers:
+ - gerrit:
+ server-name: 'gerrit.automotivelinux.org'
+ trigger-on:
+ - patchset-created-event:
+ exclude-drafts: 'false'
+ exclude-trivial-rebase: 'false'
+ exclude-no-code-change: 'true'
+ - draft-published-event
+ - comment-added-contains-event:
+ comment-contains-value: 'recheck'
+ - comment-added-contains-event:
+ comment-contains-value: 'rebuild'
+ - comment-added-contains-event:
+ comment-contains-value: 'reverify'
+ - comment-added-contains-event:
+ comment-contains-value: 'RECHECK'
+ - comment-added-contains-event:
+ comment-contains-value: 'REBUILD'
+ - comment-added-contains-event:
+ comment-contains-value: 'REVERIFY'
+ projects:
+ - project-compare-type: 'ANT'
+ project-pattern: '{name}'
+ branches:
+ - branch-compare-type: 'ANT'
+ branch-pattern: '**/{branch}'
+ silent: 'true'
+
+- trigger:
+ name: gerrit-trigger-patch-submitted-silent-start
+ triggers:
+ - gerrit:
+ server-name: 'gerrit.automotivelinux.org'
+ trigger-on:
+ - patchset-created-event:
+ exclude-drafts: 'false'
+ exclude-trivial-rebase: 'false'
+ exclude-no-code-change: 'true'
+ - draft-published-event
+ - comment-added-contains-event:
+ comment-contains-value: 'recheck'
+ - comment-added-contains-event:
+ comment-contains-value: 'rebuild'
+ - comment-added-contains-event:
+ comment-contains-value: 'reverify'
+ - comment-added-contains-event:
+ comment-contains-value: 'RECHECK'
+ - comment-added-contains-event:
+ comment-contains-value: 'REBUILD'
+ - comment-added-contains-event:
+ comment-contains-value: 'REVERIFY'
+ projects:
+ - project-compare-type: 'ANT'
+ project-pattern: '{name}'
+ branches:
+ - branch-compare-type: 'ANT'
+ branch-pattern: '**/{branch}'
+ silent-start: 'true'
+
+
+- trigger:
+ name: gerrit-trigger-patch-merged
+ triggers:
+ - gerrit:
+ server-name: 'gerrit.automotivelinux.org'
+ trigger-on:
+ - change-merged-event
+ - comment-added-contains-event:
+ comment-contains-value: 'remerge'
+ projects:
+ - project-compare-type: 'ANT'
+ project-pattern: '{name}'
+ branches:
+ - branch-compare-type: 'ANT'
+ branch-pattern: '**/{branch}'
+
+- trigger:
+ name: gerrit-trigger-silent-patch-submitted
+ triggers:
+ - gerrit:
+ server-name: 'gerrit.automotivelinux.org'
+ trigger-on:
+ - patchset-created-event:
+ exclude-drafts: 'false'
+ exclude-trivial-rebase: 'false'
+ exclude-no-code-change: 'false'
+ - draft-published-event
+ - comment-added-contains-event:
+ comment-contains-value: 'recheck'
+ - comment-added-contains-event:
+ comment-contains-value: 'reverify'
+ projects:
+ - project-compare-type: 'ANT'
+ project-pattern: '{name}'
+ branches:
+ - branch-compare-type: 'ANT'
+ branch-pattern: '**/{branch}'
+ silent-start: 'true'
+
+- trigger:
+ name: gerrit-trigger-silent-full-check
+ triggers:
+ - gerrit:
+ server-name: 'gerrit.automotivelinux.org'
+ trigger-on:
+ - comment-added-contains-event:
+ comment-contains-value: 'fullcheck'
+ projects:
+ - project-compare-type: 'ANT'
+ project-pattern: '{name}'
+ branches:
+ - branch-compare-type: 'ANT'
+ branch-pattern: '**/{branch}'
+ silent-start: 'true'
+
+- trigger:
+ name: gerrit-trigger-silent-patch-merged
+ triggers:
+ - gerrit:
+ server-name: 'gerrit.automotivelinux.org'
+ trigger-on:
+ - change-merged-event
+ - 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'
+
+- trigger:
+ name: gerrit-trigger-tag
+ triggers:
+ - gerrit:
+ server-name: 'gerrit.automotivelinux.org'
+ trigger-on:
+ - ref-updated-event
+ projects:
+ - project-compare-type: 'ANT'
+ project-pattern: '{name}'
+ branches:
+ - branch-compare-type: 'ANT'
+ branch-pattern: 'refs/tags/**'
+
+# Publishers
+- publisher:
+ name: archive-artifacts
+ publishers:
+ - archive:
+ artifacts: '{artifacts}'
+ allow-empty: true
+ fingerprint: true
+ latest-only: true
+
+- publisher:
+ name: email-notification
+ publishers:
+ - email-ext:
+ recipients: 'jsmoeller@linuxfoundation.org'
+ reply-to:
+ content-type: default
+ # yamllint disable rule:line-length
+ subject: '{email-prefix} $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!'
+ # yamllint enable
+ body: |
+ $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:
+
+ Check console output at $BUILD_URL to view the results.
+ unstable: true
+ fixed: true
+ send-to:
+ - developers
+ - recipients
+
+# BUILDERS
+- builder:
+ name: ci-management-sandbox-check-unicode
+ builders:
+ - shell: |
+ $WORKSPACE/scripts/check-unicode.sh jjb/
+
+# WRAPPERS
+- wrapper:
+ name: build-timeout
+ wrappers:
+ - timeout:
+ type: absolute
+ timeout: 420
+ fail: true
+
+- wrapper:
+ # This wrapper is required for all jobs as it configures the wrappers
+ # needed by the automotivelinux.org infra.
+ name: agl-infra-wrappers
+ wrappers:
+ - timeout:
+ type: absolute
+ timeout: '{build-timeout}'
+ timeout-var: 'BUILD_TIMEOUT'
+ fail: true
+ - ssh-agent-credentials:
+ users:
+ - 'd28b1f3b-3603-49bc-b837-bb0a2e85d4b8'
+ - '2d097b8f-bc4a-4222-b496-4ac6332015d7'
+ - ansicolor
+ - openstack:
+ single-use: false
diff --git a/scripts/.gitkeep b/scripts/.gitkeep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/scripts/.gitkeep
diff --git a/scripts/check-unicode.sh b/scripts/check-unicode.sh
new file mode 100755
index 0000000..db45f6a
--- /dev/null
+++ b/scripts/check-unicode.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+# @License EPL-1.0 <http://spdx.org/licenses/EPL-1.0>
+##############################################################################
+# Copyright (c) 2015 The Linux Foundation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Thanh Ha (The Linux Foundation) - Initial implementation
+##############################################################################
+
+directory="."
+if [ ! -z "$1" ]; then
+ directory="$1"
+fi
+
+echo "Scanning $directory"
+for x in $(find $directory -type f); do
+ if LC_ALL=C grep -q '[^[:print:][:space:]]' "$x"; then
+ echo "file "$x" contains non-ascii characters"
+ exit 1
+ fi
+done
+
+echo "All files are ASCII only"