Add release and source generation for chinook in jjb 49/8649/2
authorJan-Simon Möller <jsmoeller@linuxfoundation.org>
Mon, 6 Mar 2017 21:08:55 +0000 (22:08 +0100)
committerJan-Simon Möller <jsmoeller@linuxfoundation.org>
Mon, 6 Mar 2017 21:12:54 +0000 (22:12 +0100)
Release (binary) generation and source tarball generation
for chinook as jjb template.

Change-Id: Ic2b8a8a86cce4d580a308ace96e839615c3f6fe1
Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
jjb/release-jjb-chinook-release/include-release-jjb-chinook-release-rsync.sh [new file with mode: 0644]
jjb/release-jjb-chinook-release/release-jjb-chinook-release.yaml [new file with mode: 0644]
jjb/release-jjb-chinook-sources/include-release-jjb-chinook-release-sources-rsync.sh [new file with mode: 0644]
jjb/release-jjb-chinook-sources/release-jjb-chinook-sources.yaml [new file with mode: 0644]

diff --git a/jjb/release-jjb-chinook-release/include-release-jjb-chinook-release-rsync.sh b/jjb/release-jjb-chinook-release/include-release-jjb-chinook-release-rsync.sh
new file mode 100644 (file)
index 0000000..7b453a5
--- /dev/null
@@ -0,0 +1,72 @@
+#!/bin/bash
+
+#set -x
+set -e
+
+if test x"" = x"${RELEASE_BRANCH}"; then
+    echo "RELEASE_BRANCH invalid"
+    exit 1
+fi
+
+if test x"" = x"${RELEASE_VERSION}"; then
+    echo "RELEASE_VERSION invalid"
+    exit 1
+fi
+
+if test x"" = x"${MACHINE}"; then
+    echo "MACHINE invalid"
+    exit 1
+fi
+
+echo "#######################################"
+echo "#######################################"
+ls -alh
+echo "#######################################"
+echo "#######################################"
+tree -L 2
+echo "#######################################"
+echo "#######################################"
+set | grep MACHINE
+echo "#######################################"
+echo "#######################################"
+set
+echo "#######################################"
+echo "#######################################"
+
+cd repoclone/output
+
+export REMOTEDST="/srv/download/AGL/release/${RELEASE_BRANCH}/${RELEASE_VERSION}/"
+export RSYNCDST="jenkins-slave@10.30.72.8:${REMOTEDST}"
+export RSYNCSRC=$(pwd)/UPLOAD/
+
+# construct upload folder
+mv UPLOAD UPLOAD2 || true
+rm -rf UPLOAD2 || true
+mkdir -p UPLOAD/${MACHINE}
+export DEST=$(pwd)/UPLOAD/${MACHINE}
+
+# save space ... remove the rpms
+rm -rf tmp/deploy/rpm || true
+
+rsync -avr --progress --delete tmp/deploy $DEST/
+rsync -avr --progress --delete tmp/log $DEST/
+
+cp ../../current_default.xml $DEST/${MACHINE}_repo_default.xml
+cp conf/local.conf $DEST/local.conf
+cp conf/auto.conf $DEST/auto.conf
+echo "$BUILD_URL" > $DEST/jenkins.build.url
+
+tree $DEST
+
+ls -alhR $DEST
+
+echo "would do rsync -avr -e \"ssh -o StrictHostKeyChecking=no\" $RSYNCSRC $RSYNCDST "
+
+
+if test x"yes" = x"$UPLOAD" ; then
+   ssh -o StrictHostKeyChecking=no jenkins-slave@10.30.72.8 mkdir -p ${REMOTEDST}
+   rsync -avr -e "ssh -o StrictHostKeyChecking=no" $RSYNCSRC $RSYNCDST
+   ssh -o StrictHostKeyChecking=no jenkins-slave@10.30.72.8 sh -c "cd /srv/download/AGL/release/${RELEASE_BRANCH}/ ; rm latest ; ln -sf ${RELEASE_VERSION} latest ; echo ${RELEASE_VERSION} > latest.txt" || true
+fi
+
+exit 0
\ No newline at end of file
diff --git a/jjb/release-jjb-chinook-release/release-jjb-chinook-release.yaml b/jjb/release-jjb-chinook-release/release-jjb-chinook-release.yaml
new file mode 100644 (file)
index 0000000..840a46c
--- /dev/null
@@ -0,0 +1,88 @@
+- project:
+    name: release-jjb-chinook-release
+    jobs:
+        - release-jjb-chinook-release
+
+- job-template:
+    name: 'release-jjb-chinook-release'
+    project-type: matrix
+    concurrent: false
+    node: control-slave
+
+    parameters:
+      - string:
+          name: GERRIT_PROJECT
+          default: AGL/AGL-repo
+          description: "Project to build"
+      - string:
+          name: GERRIT_BRANCH
+          default: chinook
+          description: "branch to build"
+      - string:
+          name: GERRIT_REFSPEC
+          default: refs/tags/chinook_3.0.2
+          description: "refspec to build"
+      - string:
+          name: RELEASE_VERSION
+          default: 3.0.2
+          description: "release version number for build"
+      - string:
+          name: RELEASE_BRANCH
+          default: chinook
+          description: "release branch to build"
+      - string:
+          name: UPLOAD
+          default: yes_or_no
+          description: "Upload?"
+    axes:
+      - axis:
+          type: user-defined
+          name: MACHINE
+          values:
+            - qemux86-64
+            - porter-nogfx
+            - intel-corei7-64
+            - raspberrypi3
+            - dra7xx-evm
+      - axis:
+          type: slave
+          name: label
+          values:
+            - agl-test-slave
+
+    build-discarder:
+      days-to-keep: 30
+      num-to-keep: 40
+      artifact-days-to-keep: -1
+      artifact-num-to-keep: 5
+
+    triggers:
+      - gerrit-trigger-patch-submitted-silent:
+            name: 'AGL/AGL-repo'
+            branch: 'refs/tags/chinook/**'
+
+    wrappers:
+      - agl-infra-wrappers:
+          build-timeout: '{build-timeout}'
+
+    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-cat-auto-conf.sh
+                - ../common/include-agl-local-conf-archiver.sh
+#                - ../common/include-agl-local-conf-isafw.sh
+                - ../common/include-agl-local-conf-fstypes.sh
+                - ../common/include-agl-local-conf-vmdk.sh
+                - ../common/include-agl-bitbake-image.sh
+                - ../common/include-agl-bitbake-sdk.sh
+                - ../common/include-agl-test-nbd-short.sh
+      - shell:
+            !include-raw-escape:
+                - include-release-jjb-chinook-release-rsync.sh
+
diff --git a/jjb/release-jjb-chinook-sources/include-release-jjb-chinook-release-sources-rsync.sh b/jjb/release-jjb-chinook-sources/include-release-jjb-chinook-release-sources-rsync.sh
new file mode 100644 (file)
index 0000000..2958476
--- /dev/null
@@ -0,0 +1,52 @@
+#!/bin/bash
+
+#set -x
+set -e
+echo "#######################################"
+echo "#######################################"
+ls -alh
+echo "#######################################"
+echo "#######################################"
+tree -L 2
+echo "#######################################"
+echo "#######################################"
+set | grep MACHINE
+echo "#######################################"
+echo "#######################################"
+set
+echo "#######################################"
+echo "#######################################"
+
+cd repoclone/output
+
+export RSYNCDST="jenkins-slave@10.30.72.8:/srv/download/AGL/release/${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}
+
+# save space ... remove the rpms
+rm -rf tmp/deploy/rpm || true
+
+rsync -avr --progress --delete tmp/deploy $DEST/
+rsync -avr --progress --delete tmp/log $DEST/
+
+cp ../../current_default.xml $DEST/${MACHINE}_repo_default.xml
+cp conf/local.conf $DEST/local.conf
+cp conf/auto.conf $DEST/auto.conf
+echo "$BUILD_URL" > $DEST/jenkins.build.url
+
+tree $DEST
+
+ls -alhR $DEST
+
+echo "would do rsync -avr -e \"ssh -o StrictHostKeyChecking=no\" $RSYNCSRC $RSYNCDST "
+
+if test x"yes" = x"$UPLOAD" ; then
+   rsync -avr -e "ssh -o StrictHostKeyChecking=no" $RSYNCSRC $RSYNCDST
+fi
+
+exit 0
\ No newline at end of file
diff --git a/jjb/release-jjb-chinook-sources/release-jjb-chinook-sources.yaml b/jjb/release-jjb-chinook-sources/release-jjb-chinook-sources.yaml
new file mode 100644 (file)
index 0000000..284308e
--- /dev/null
@@ -0,0 +1,67 @@
+- project:
+    name: release-jjb-chinook-sources
+    jobs:
+        - release-jjb-chinook-sources
+
+- job-template:
+    name: 'release-jjb-chinook-sources'
+    project-type: freestyle
+    concurrent: false
+    node: agl-test-slave
+
+    parameters:
+      - string:
+          name: GERRIT_PROJECT
+          default: AGL/AGL-repo
+          description: "Project to build"
+      - string:
+          name: GERRIT_BRANCH
+          default: chinook
+          description: "branch to build"
+      - string:
+          name: GERRIT_REFSPEC
+          default: refs/tags/3.0.2
+          description: "refspec to build"
+      - string:
+          name: RELEASE_VERSION
+          default: 3.0.2
+          description: "release version number for build"
+      - string:
+          name: RELEASE_BRANCH
+          default: chinook
+          description: "release branch to build"
+      - string:
+          name: UPLOAD
+          default: yes_or_no
+          description: "Upload?"
+
+    build-discarder:
+      days-to-keep: 30
+      num-to-keep: 40
+      artifact-days-to-keep: -1
+      artifact-num-to-keep: 5
+
+    wrappers:
+      - agl-infra-wrappers:
+          build-timeout: '{build-timeout}'
+
+    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-cat-auto-conf.sh
+#                - ../common/include-agl-local-conf-archiver.sh
+#                - ../common/include-agl-local-conf-isafw.sh
+#                - ../common/include-agl-local-conf-vmdk.sh
+#                - ../common/include-agl-bitbake-image.sh
+#                - ../common/include-agl-bitbake-sdk.sh
+#                - ../common/include-agl-test-nbd-short.sh
+#      - shell:
+#            !include-raw-escape:
+#                 - include-release-jjb-chinook-release-sources-rsync.sh
+