From b76de43474cf1139d7a2da162516b22df3db4acc Mon Sep 17 00:00:00 2001 From: Jan-Simon Möller Date: Fri, 16 Nov 2018 07:50:22 +0100 Subject: Add release job for guppy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I4bac3775da003dc677d50bafab88fc00b8754890 Signed-off-by: Jan-Simon Möller --- jjb/common/include-agl-run-test-short-guppy.sh | 35 ++++++ .../include-release-jjb-guppy-snapshot-rsync.sh | 57 ++++++++++ .../release-jjb-guppy-snapshot.yaml | 117 +++++++++++++++++++++ 3 files changed, 209 insertions(+) create mode 100644 jjb/common/include-agl-run-test-short-guppy.sh create mode 100644 jjb/release-jjb-guppy-snapshot/include-release-jjb-guppy-snapshot-rsync.sh create mode 100644 jjb/release-jjb-guppy-snapshot/release-jjb-guppy-snapshot.yaml diff --git a/jjb/common/include-agl-run-test-short-guppy.sh b/jjb/common/include-agl-run-test-short-guppy.sh new file mode 100644 index 00000000..0b2edfb0 --- /dev/null +++ b/jjb/common/include-agl-run-test-short-guppy.sh @@ -0,0 +1,35 @@ +# (c) 2016 Jan-Simon Moeller dl9pf(at)gmx.de +# License GPLv2 + +################################################################################ +## Run SHORT CI test +################################################################################ + +set -x + +cd $REPODIR + +echo "# LAVA lab target: ${LAVA_LAB} #" +# releng-scripts depends on jinja2 >= 2.9 +echo "## Check version of python-jinja2: " +pip show jinja2 +CREATE_ARGS="" +CREATE_ARGS+="--machine ${releng_device} " +CREATE_ARGS+="--build-type release " +#[[ ! -z $RELEASE_BRANCH ]] && CREATE_ARGS+="--branch $RELEASE_BRANCH " +#[[ ! -z $RELEASE_VERSION ]] && CREATE_ARGS+="--version $RELEASE_VERSION " +CREATE_ARGS+="--url https://download.automotivelinux.org/AGL/upload/ci/${RELEASE_BRANCH}/${RELEASE_VERSION}/${MACHINE}/deploy/images/${MACHINE}/ " +BUILD_VERSION="AGL-gerrit-$RELEASE_BRANCH-$RELEASE_VERSION" +[[ -e output/repo-manifest-r.txt.sha1 ]] && BUILD_VERSION+="-$(cat output/repo-manifest-r.txt.sha1)" +CREATE_ARGS+="--name AGL-gerrit-$RELEASE_BRANCH-$RELEASE_VERSION " +CREATE_ARGS+="--build-version $BUILD_VERSION " +CREATE_ARGS+="--callback-from ${LAVA_LAB} " +CREATE_ARGS+="--test all" +$RELENG/utils/create-jobs.py ${CREATE_ARGS} > testjob.yaml + +if [ $? != 0 ]; then + echo "ERROR: Machine ${releng_device}: LAVA job creation failed." + exit 0 +else + cat testjob.yaml +fi diff --git a/jjb/release-jjb-guppy-snapshot/include-release-jjb-guppy-snapshot-rsync.sh b/jjb/release-jjb-guppy-snapshot/include-release-jjb-guppy-snapshot-rsync.sh new file mode 100644 index 00000000..9be7c6f8 --- /dev/null +++ b/jjb/release-jjb-guppy-snapshot/include-release-jjb-guppy-snapshot-rsync.sh @@ -0,0 +1,57 @@ +#!/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 REMOTEDST="/srv/download/AGL/upload/ci/${RELEASE_BRANCH}/${RELEASE_VERSION}/${MACHINE}/" +export RSYNCDST="jenkins-slave@10.30.72.8:${REMOTEDST}" +export RSYNCSRC=$(pwd)/UPLOAD/${MACHINE} + +# 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 rm -rf ${REMOTEDST} + ssh -o StrictHostKeyChecking=no jenkins-slave@10.30.72.8 mkdir -p ${REMOTEDST} + rsync --delete -avr -e "ssh -o StrictHostKeyChecking=no" $RSYNCSRC/* $RSYNCDST +fi + +exit 0 \ No newline at end of file diff --git a/jjb/release-jjb-guppy-snapshot/release-jjb-guppy-snapshot.yaml b/jjb/release-jjb-guppy-snapshot/release-jjb-guppy-snapshot.yaml new file mode 100644 index 00000000..b438bb70 --- /dev/null +++ b/jjb/release-jjb-guppy-snapshot/release-jjb-guppy-snapshot.yaml @@ -0,0 +1,117 @@ +--- +- project: + name: release-jjb-guppy-snapshot + jobs: + - release-jjb-guppy-snapshot + +- job-template: + name: 'release-jjb-guppy-snapshot' + 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: master + description: "branch to build" + - string: + name: GERRIT_REFSPEC + default: refs/tags/guppy_6.0.0 + description: "refspec to build" + - string: + name: RELEASE_VERSION + default: 6.0.0 + description: "release version number for build" + - string: + name: RELEASE_BRANCH + default: guppy + description: "release branch to build" + - string: + name: UPLOAD + default: yes_or_no + description: "Upload?" + axes: + - axis: + type: user-defined + name: MACHINE + values: + - qemux86-64 + - qemuarm + - qemuarm64 + - intel-corei7-64 + - raspberrypi3 + - dra7xx-evm + - m3ulcb-nogfx + - dragonboard-410c + # for aarch64 + - 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: 'tags/guppy/**' + + wrappers: + - agl-infra-wrappers: + build-timeout: '{build-timeout}' + - 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-export-eula.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-include-ptest.sh + - ../common/include-agl-local-conf-DISTROFEATURES-AGLCI.sh + - ../common/include-agl-local-conf-vmdk.sh + - ../common/include-agl-local-conf-rpi3-imagetype.sh + #- ../common/include-agl-bitbake-image.sh + - ../common/include-agl-bitbake-sdk.sh + - shell: + !include-raw-escape: include-release-jjb-guppy-snapshot-rsync.sh + - shell: + !include-raw-escape: + - ../common/include-agl-run-test-prepare.sh + #- ../common/include-agl-run-test-rsync-release.sh + - ../common/include-agl-lava-labs-prepare.sh + - ../common/include-agl-run-test-short-guppy.sh + - ../common/include-agl-lava-jobs-submit-only.sh -- cgit 1.2.3-korg