From 503579a0e8c0b9cc13355ba73e2a3580ce48f1fc Mon Sep 17 00:00:00 2001 From: Jan-Simon Möller Date: Sat, 19 Dec 2020 00:10:18 +0100 Subject: Add release jobs for koi MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I3b99282f42268ad9ea206a491ecf79a5e05af8d2 Signed-off-by: Jan-Simon Möller --- .../include-release-jjb-release-sources-rsync.sh | 67 ++++++++++++++++++++++ .../release-jjb-sources.yaml | 44 ++++++++++++++ 2 files changed, 111 insertions(+) create mode 100644 jjb/release-jjb-koi-sources/include-release-jjb-release-sources-rsync.sh create mode 100644 jjb/release-jjb-koi-sources/release-jjb-sources.yaml (limited to 'jjb/release-jjb-koi-sources') diff --git a/jjb/release-jjb-koi-sources/include-release-jjb-release-sources-rsync.sh b/jjb/release-jjb-koi-sources/include-release-jjb-release-sources-rsync.sh new file mode 100644 index 00000000..7dc96407 --- /dev/null +++ b/jjb/release-jjb-koi-sources/include-release-jjb-release-sources-rsync.sh @@ -0,0 +1,67 @@ +#!/bin/bash + +#set -x +set -e + +mkdir -p ~/bin/ || true +curl https://storage.googleapis.com/git-repo-downloads/repo-1 > ~/bin/repo +chmod a+x ~/bin/repo +export PATH=$PATH:~/bin/ + +# construct upload folder + + +BRANCH=${RELEASE_BRANCH} +REVISION=${RELEASE_VERSION} + + +rm -rf AGLRELEASE || true + +mkdir agl-${BRANCH}-${REVISION} +pushd agl-${BRANCH}-${REVISION} + +repo init --reference=/opt/AGL/preclone -q -b ${GERRIT_BRANCH} -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo -m ${BRANCH}_${REVISION}.xml + +repo sync --force-sync + +repo manifest -r > ../${BRANCH}_${REVISION}.tar.xml + +rm -rf .repo +find . -name *.git | xargs rm -rf + +ln -sf meta-agl/README-AGL.md + +cat < aglsetup.sh +#!/bin/bash + +source ./meta-agl/scripts/aglsetup.sh \$@ +EOF + +chmod a+x aglsetup.sh + +popd + +tar -cjvf agl-${BRANCH}-${REVISION}.tar.bz2 agl-${BRANCH}-${REVISION} + +md5sum agl-${BRANCH}-${REVISION}.tar.bz2 > agl-${BRANCH}-${REVISION}.tar.bz2.md5sum +sha256sum agl-${BRANCH}-${REVISION}.tar.bz2 > agl-${BRANCH}-${REVISION}.tar.bz2.sha256sum + + + +rm -rf UPLOAD || true +mkdir -p UPLOAD/ + +cp -ar agl-${RELEASE_BRANCH}-${RELEASE_VERSION}.* UPLOAD/ + +export RSYNCSRC=$(pwd)/UPLOAD +export RSYNCDST="/srv/download/AGL/release/${RELEASE_BRANCH}/" + +ls -alh UPLOAD/ + +if test x"yes" = x"${UPLOAD}" ; then + set +x + ssh -o StrictHostKeyChecking=no jenkins-slave@10.30.72.8 "mkdir -p ${RSYNCDST}" + rsync -avr -e "ssh -o StrictHostKeyChecking=no" ${RSYNCSRC}/* jenkins-slave@10.30.72.8:${RSYNCDST} + ssh -o StrictHostKeyChecking=no jenkins-slave@10.30.72.8 "rm -rf ${RSYNCDST}/latest" + ssh -o StrictHostKeyChecking=no jenkins-slave@10.30.72.8 "ln -sf ${RELEASE_VERSION} ${RSYNCDST}/latest" +fi diff --git a/jjb/release-jjb-koi-sources/release-jjb-sources.yaml b/jjb/release-jjb-koi-sources/release-jjb-sources.yaml new file mode 100644 index 00000000..e02673bf --- /dev/null +++ b/jjb/release-jjb-koi-sources/release-jjb-sources.yaml @@ -0,0 +1,44 @@ +--- +- project: + name: release-jjb-koi-sources + jobs: + - release-jjb-koi-sources + +- job-template: + name: 'release-jjb-koi-sources' + project-type: freestyle + concurrent: false + node: agl-test-slave + + parameters: + - string: + name: GERRIT_BRANCH + default: master + description: "release version number for build" + - string: + name: RELEASE_VERSION + default: 10.91.0 + description: "release version number for build" + - string: + name: RELEASE_BRANCH + default: koi + 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: + - include-release-jjb-release-sources-rsync.sh -- cgit 1.2.3-korg