public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Alexander Smirnov <asmirnov@ilbers.de>
To: isar-users@googlegroups.com
Cc: Alexander Smirnov <asmirnov@ilbers.de>
Subject: [PATCH 4/5] scripts/ci_build: Update build script
Date: Sun, 27 Aug 2017 17:38:39 +0300	[thread overview]
Message-ID: <20170827143840.12436-5-asmirnov@ilbers.de> (raw)
In-Reply-To: <20170827143840.12436-1-asmirnov@ilbers.de>

Rework the build script for Jenkins CI.

Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
---
 scripts/ci_build.sh | 46 +++++++++++++++++++++++++---------------------
 1 file changed, 25 insertions(+), 21 deletions(-)

diff --git a/scripts/ci_build.sh b/scripts/ci_build.sh
index 3deadbf..2cacdf1 100755
--- a/scripts/ci_build.sh
+++ b/scripts/ci_build.sh
@@ -1,29 +1,33 @@
-# Script for GitLab runner
+# Script for Jenkins build
 #
 # Alexander Smirnov <asmirnov@ilbers.de>
-# Copyright (c) 2016 ilbers GmbH
+# Copyright (c) 2016-2017 ilbers GmbH
 
 #!/bin/sh
 
 # Export $PATH to use 'parted' tool
 export PATH=$PATH:/sbin
 
-WORKSPACE=`pwd`
-
-. isar-init-build-env build
-bitbake multiconfig:qemuarm:isar-image-base multiconfig:rpi:isar-image-base multiconfig:qemuarm:isar-image-debug multiconfig:rpi:isar-image-debug
-
-cd $WORKSPACE
-mkdir images
-cd images
-
-# Get QEMU image
-cp ../build/tmp/deploy/images/isar-image-base-qemuarm.ext4.img .
-gzip -9 isar-image-base-qemuarm.ext4.img
-
-# Get RPi SD card image
-cp ../build/tmp/deploy/images/isar-image-base.rpi-sdimg .
-gzip -9 isar-image-base.rpi-sdimg
-
-cd ..
-sudo rm -rf build
+# Get parameters from the command line
+WORKSPACE=$1
+GIT_COMMIT=$2
+
+# Go to Isar root
+cd $(dirname $0)/..
+
+# Setup build folder for current revision
+if [ ! -d /build/$WORKSPACE/$GIT_COMMIT ]; then
+        mkdir -p /build/$WORKSPACE/$GIT_COMMIT
+fi
+source isar-init-build-env /build/$WORKSPACE/$GIT_COMMIT
+
+# Start build for all possible configurations
+bitbake \
+        multiconfig:qemuarm-wheezy:isar-image-base \
+        multiconfig:qemuarm-jessie:isar-image-base \
+        multiconfig:qemuarm-stretch:isar-image-base \
+        multiconfig:qemui386-jessie:isar-image-base \
+        multiconfig:qemui386-stretch:isar-image-base \
+        multiconfig:qemuamd64-jessie:isar-image-base \
+        multiconfig:qemuamd64-stretch:isar-image-base \
+        multiconfig:rpi-jessie:isar-image-base
-- 
2.1.4


  parent reply	other threads:[~2017-08-27 14:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-27 14:38 [PATCH 0/5] Isar fixes Alexander Smirnov
2017-08-27 14:38 ` [PATCH 1/5] classes/base: Fix fetch task dependency Alexander Smirnov
2017-08-28 14:57   ` Henning Schild
2017-08-29  6:27     ` Alexander Smirnov
2017-08-29  7:43       ` Henning Schild
2017-08-29  7:54         ` Alexander Smirnov
2017-08-27 14:38 ` [PATCH 2/5] meta-isar/hello: Update recipe version Alexander Smirnov
2017-08-27 14:38 ` [PATCH 3/5] debian/stretch: Use ftp.d.o instead of deb.d.o Alexander Smirnov
2017-08-27 14:38 ` Alexander Smirnov [this message]
2017-08-27 14:38 ` [PATCH 5/5] doc/technical_overview: Fix formatting Alexander Smirnov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170827143840.12436-5-asmirnov@ilbers.de \
    --to=asmirnov@ilbers.de \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox