Add weekly mirror job. 11/6811/1
authorJan-Simon Möller <jsmoeller@linuxfoundation.org>
Wed, 19 Oct 2016 16:50:44 +0000 (18:50 +0200)
committerJan-Simon Möller <jsmoeller@linuxfoundation.org>
Wed, 19 Oct 2016 16:50:44 +0000 (18:50 +0200)
Change-Id: Ia1a9e0e3d7d5bbb152f8ed461e96e5260e8e0ff1
Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
jjb/pre-fetch/.gitignore [new file with mode: 0644]
jjb/pre-fetch/include-prefetch.sh [new file with mode: 0644]
jjb/pre-fetch/include-rsync-prefetch.sh [new file with mode: 0644]
jjb/pre-fetch/pre-fetch.yaml [new file with mode: 0644]

diff --git a/jjb/pre-fetch/.gitignore b/jjb/pre-fetch/.gitignore
new file mode 100644 (file)
index 0000000..f3b16d5
--- /dev/null
@@ -0,0 +1,3 @@
+repoclone
+mirror
+sstate
diff --git a/jjb/pre-fetch/include-prefetch.sh b/jjb/pre-fetch/include-prefetch.sh
new file mode 100644 (file)
index 0000000..fd87548
--- /dev/null
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+set -x
+set -e
+# 
+export BOARDS="qemux86-64 qemux86 raspberrypi3 dra7xx-evm dragonboard-410c intel-corei7-64 wandboard"
+export FEATURES="agl-demo agl-appfw-smack agl-netboot agl-sota agl-devel"
+export FEATURES_nogfx="agl-appfw-smack agl-netboot agl-sota agl-devel"
+export TARGETIMAGE="agl-demo-platform"
+export TARGETIMAGE_nogfx="agl-image-ivi-qa"
+
+mkdir -p mirror
+mkdir -p sstate
+
+mv repoclone repoclone2 > /dev/null 2>&1 || true
+rm -rf repoclone2 || true
+mkdir -p repoclone
+cd repoclone
+
+repo init -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo.git
+repo sync -j8
+
+for i in $BOARDS ; do
+    pushd .
+
+    if test x"porter-nogfx" = x"$i" ; then
+       FEATURES="${FEATURES_nogfx}"
+       TARGETIMAGE="${TARGETIMAGE_nogfx}"
+    fi
+    source meta-agl/scripts/aglsetup.sh -m ${i} -b build-${i} ${FEATURES}
+    ln -sf ../../mirror downloads
+    ln -sf ../../sstate sstate-cache
+    echo 'BB_GENERATE_MIRROR_TARBALLS = "1"' >> conf/local.conf
+    #recipe tar-native-1.28-r0: task do_populate_sysroot_setscene
+    bitbake -k tar-native
+    bitbake -c fetchall ${TARGETIMAGE}
+    popd
+done
+
+ls mirror
diff --git a/jjb/pre-fetch/include-rsync-prefetch.sh b/jjb/pre-fetch/include-rsync-prefetch.sh
new file mode 100644 (file)
index 0000000..848571d
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+set -x
+set -e
+
+ls -alh
+
+
+
+export RSYNCSRC="$(pwd)/mirror/"
+export RSYNCDST="jenkins-slave@10.30.72.8:/srv/download/AGL/mirror/"
+
+echo " rsync -avr -e \"ssh -o StrictHostKeyChecking=no\" $RSYNCSRC $RSYNCDST "
+
+
+
+exit 0
\ No newline at end of file
diff --git a/jjb/pre-fetch/pre-fetch.yaml b/jjb/pre-fetch/pre-fetch.yaml
new file mode 100644 (file)
index 0000000..5fb8f75
--- /dev/null
@@ -0,0 +1,30 @@
+- project:
+    name: pre-fetch-mirror
+    jobs:
+        - pre-fetch-mirror-weekly
+
+- job-template:
+    name: 'pre-fetch-mirror-weekly'
+    project-type: freestyle
+    concurrent: false
+    node: master
+
+    build-discarder:
+      days-to-keep: 30
+      num-to-keep: 40
+      artifact-days-to-keep: -1
+      artifact-num-to-keep: 5
+
+    triggers:
+      - timed: '@weekly'
+
+    wrappers:
+      - agl-infra-wrappers:
+          build-timeout: '{build-timeout}'
+
+    builders:
+      - shell:
+            !include-raw-escape: include-prefetch.sh
+      - shell:
+            !include-raw-escape: include-rsync-prefetch.sh
+