From fe2c65284b3679c520b0198e98c15334da13182b Mon Sep 17 00:00:00 2001 From: Jan-Simon Moeller Date: Thu, 5 Mar 2020 23:52:48 +0100 Subject: Streamline and simplify release jobs Extend automation. Signed-off-by: Jan-Simon Moeller Change-Id: I959da9e8048dcf8fe87bf6ae23d7350947ec5b40 --- .../release-jjb-release.yaml | 23 +++++----- .../include-release-jjb-release-sources-rsync.sh | 51 ++++++++++++++++------ .../release-jjb-sources.yaml | 6 ++- .../release-jjb-release.yaml | 23 +++++----- .../include-release-jjb-release-sources-rsync.sh | 51 ++++++++++++++++------ .../release-jjb-sources.yaml | 6 ++- .../release-jjb-release.yaml | 23 +++++----- .../include-release-jjb-release-sources-rsync.sh | 51 ++++++++++++++++------ .../release-jjb-sources.yaml | 6 ++- 9 files changed, 156 insertions(+), 84 deletions(-) diff --git a/jjb/release-jjb-guppy-release/release-jjb-release.yaml b/jjb/release-jjb-guppy-release/release-jjb-release.yaml index 3e7b6508..f1079651 100644 --- a/jjb/release-jjb-guppy-release/release-jjb-release.yaml +++ b/jjb/release-jjb-guppy-release/release-jjb-release.yaml @@ -11,26 +11,18 @@ node: control-slave parameters: - - string: - name: GERRIT_PROJECT - default: AGL/AGL-repo - description: "Project to build" - string: name: GERRIT_BRANCH - default: master + default: guppy description: "branch to build" - - string: - name: GERRIT_REFSPEC - default: refs/tags/guppy_6.99.1 - description: "refspec to build" - - string: - name: RELEASE_VERSION - default: 6.99.1 - description: "release version number for build" - string: name: RELEASE_BRANCH default: guppy description: "release branch to build" + - string: + name: RELEASE_VERSION + default: 7.0.0 + description: "release version number for build" - string: name: UPLOAD default: yes_or_no @@ -50,3 +42,8 @@ - shell: !include-raw-escape: - include-release-jjb-release-move-sandbox.sh + - trigger-builds: + - project: "release-jjb-guppy-sources" + current-parameters: true + block: true + same-node: true diff --git a/jjb/release-jjb-guppy-sources/include-release-jjb-release-sources-rsync.sh b/jjb/release-jjb-guppy-sources/include-release-jjb-release-sources-rsync.sh index e458a17d..ceac3acd 100644 --- a/jjb/release-jjb-guppy-sources/include-release-jjb-release-sources-rsync.sh +++ b/jjb/release-jjb-guppy-sources/include-release-jjb-release-sources-rsync.sh @@ -2,38 +2,61 @@ #set -x set -e -#export RSYNCDST="jenkins-slave@10.30.72.8:/srv/download/AGL/release/${RELEASE_BRANCH}/${RELEASE_VERSION}/" -#export RSYNCSRC=$(pwd)/UPLOAD/ # construct upload folder BRANCH=${RELEASE_BRANCH} -RELVER=${RELEASE_VERSION} +REVISION=${RELEASE_VERSION} -rm -rf release-upload || true -git clone -b ${RELEASE_BRANCH} https://gerrit.automotivelinux.org/gerrit/p/staging/release-upload.git -cd release-upload +rm -rf AGLRELEASE || true -gpg --keyserver pool.sks-keyservers.net --recv D6DD2170 +mkdir agl-${BRANCH}-${REVISION} +pushd agl-${BRANCH}-${REVISION} -ls | grep -q agl-${RELEASE_BRANCH}-${RELEASE_VERSION}.tar.bz2 +repo init --reference=/opt/AGL/preclone -q -b ${GERRIT_BRANCH} -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo -m ${BRANCH}_${REVISION}.xml -( gpg --verify agl-${RELEASE_BRANCH}-${RELEASE_VERSION}.tar.bz2.sig agl-${RELEASE_BRANCH}-${RELEASE_VERSION}.tar.bz2 2>&1 | grep -e "Good signature.*Jan-Simon.*Moeller.*AGL.*Release" -q && echo "gpg key verification succeeded" ) || ( echo "gpg key verification failed" && exit 1 ) +repo sync --force-sync -rm -rf ../UPLOAD || true -mkdir -p ../UPLOAD/ +repo manifest -r > ../${BRANCH}_${REVISION}.tar.xml -cp -ar agl-${RELEASE_BRANCH}-${RELEASE_VERSION}.* ../UPLOAD/ +rm -rf .repo +find . -name *.git | xargs rm -rf -export RSYNCSRC=$(pwd)/../UPLOAD +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 \ No newline at end of file +fi diff --git a/jjb/release-jjb-guppy-sources/release-jjb-sources.yaml b/jjb/release-jjb-guppy-sources/release-jjb-sources.yaml index a4332f96..4e33fabc 100644 --- a/jjb/release-jjb-guppy-sources/release-jjb-sources.yaml +++ b/jjb/release-jjb-guppy-sources/release-jjb-sources.yaml @@ -11,9 +11,13 @@ node: agl-test-slave parameters: + - string: + name: GERRIT_BRANCH + default: guppy + description: "release version number for build" - string: name: RELEASE_VERSION - default: 6.99.1 + default: 7.0.0 description: "release version number for build" - string: name: RELEASE_BRANCH diff --git a/jjb/release-jjb-halibut-release/release-jjb-release.yaml b/jjb/release-jjb-halibut-release/release-jjb-release.yaml index 607ee68d..bee34019 100644 --- a/jjb/release-jjb-halibut-release/release-jjb-release.yaml +++ b/jjb/release-jjb-halibut-release/release-jjb-release.yaml @@ -11,26 +11,18 @@ node: control-slave parameters: - - string: - name: GERRIT_PROJECT - default: AGL/AGL-repo - description: "Project to build" - string: name: GERRIT_BRANCH - default: master + default: halibut description: "branch to build" - - string: - name: GERRIT_REFSPEC - default: refs/tags/halibut_7.99.1 - description: "refspec to build" - - string: - name: RELEASE_VERSION - default: 7.99.1 - description: "release version number for build" - string: name: RELEASE_BRANCH default: halibut description: "release branch to build" + - string: + name: RELEASE_VERSION + default: 8.0.0 + description: "release version number for build" - string: name: UPLOAD default: yes_or_no @@ -50,3 +42,8 @@ - shell: !include-raw-escape: - include-release-jjb-release-move-sandbox.sh + - trigger-builds: + - project: "release-jjb-halibut-sources" + current-parameters: true + block: true + same-node: true diff --git a/jjb/release-jjb-halibut-sources/include-release-jjb-release-sources-rsync.sh b/jjb/release-jjb-halibut-sources/include-release-jjb-release-sources-rsync.sh index e458a17d..ceac3acd 100644 --- a/jjb/release-jjb-halibut-sources/include-release-jjb-release-sources-rsync.sh +++ b/jjb/release-jjb-halibut-sources/include-release-jjb-release-sources-rsync.sh @@ -2,38 +2,61 @@ #set -x set -e -#export RSYNCDST="jenkins-slave@10.30.72.8:/srv/download/AGL/release/${RELEASE_BRANCH}/${RELEASE_VERSION}/" -#export RSYNCSRC=$(pwd)/UPLOAD/ # construct upload folder BRANCH=${RELEASE_BRANCH} -RELVER=${RELEASE_VERSION} +REVISION=${RELEASE_VERSION} -rm -rf release-upload || true -git clone -b ${RELEASE_BRANCH} https://gerrit.automotivelinux.org/gerrit/p/staging/release-upload.git -cd release-upload +rm -rf AGLRELEASE || true -gpg --keyserver pool.sks-keyservers.net --recv D6DD2170 +mkdir agl-${BRANCH}-${REVISION} +pushd agl-${BRANCH}-${REVISION} -ls | grep -q agl-${RELEASE_BRANCH}-${RELEASE_VERSION}.tar.bz2 +repo init --reference=/opt/AGL/preclone -q -b ${GERRIT_BRANCH} -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo -m ${BRANCH}_${REVISION}.xml -( gpg --verify agl-${RELEASE_BRANCH}-${RELEASE_VERSION}.tar.bz2.sig agl-${RELEASE_BRANCH}-${RELEASE_VERSION}.tar.bz2 2>&1 | grep -e "Good signature.*Jan-Simon.*Moeller.*AGL.*Release" -q && echo "gpg key verification succeeded" ) || ( echo "gpg key verification failed" && exit 1 ) +repo sync --force-sync -rm -rf ../UPLOAD || true -mkdir -p ../UPLOAD/ +repo manifest -r > ../${BRANCH}_${REVISION}.tar.xml -cp -ar agl-${RELEASE_BRANCH}-${RELEASE_VERSION}.* ../UPLOAD/ +rm -rf .repo +find . -name *.git | xargs rm -rf -export RSYNCSRC=$(pwd)/../UPLOAD +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 \ No newline at end of file +fi diff --git a/jjb/release-jjb-halibut-sources/release-jjb-sources.yaml b/jjb/release-jjb-halibut-sources/release-jjb-sources.yaml index 192e4bae..c55d0db9 100644 --- a/jjb/release-jjb-halibut-sources/release-jjb-sources.yaml +++ b/jjb/release-jjb-halibut-sources/release-jjb-sources.yaml @@ -11,9 +11,13 @@ node: agl-test-slave parameters: + - string: + name: GERRIT_BRANCH + default: halibut + description: "release version number for build" - string: name: RELEASE_VERSION - default: 7.99.1 + default: 8.0.0 description: "release version number for build" - string: name: RELEASE_BRANCH diff --git a/jjb/release-jjb-icefish-release/release-jjb-release.yaml b/jjb/release-jjb-icefish-release/release-jjb-release.yaml index e2355fe2..1bb6db80 100644 --- a/jjb/release-jjb-icefish-release/release-jjb-release.yaml +++ b/jjb/release-jjb-icefish-release/release-jjb-release.yaml @@ -11,26 +11,18 @@ node: control-slave parameters: - - string: - name: GERRIT_PROJECT - default: AGL/AGL-repo - description: "Project to build" - string: name: GERRIT_BRANCH - default: master + default: icefish description: "branch to build" - - string: - name: GERRIT_REFSPEC - default: refs/tags/icefish_8.99.1 - description: "refspec to build" - - string: - name: RELEASE_VERSION - default: 8.99.1 - description: "release version number for build" - string: name: RELEASE_BRANCH default: icefish description: "release branch to build" + - string: + name: RELEASE_VERSION + default: 9.0.0 + description: "release version number for build" - string: name: UPLOAD default: yes_or_no @@ -50,3 +42,8 @@ - shell: !include-raw-escape: - include-release-jjb-release-move-sandbox.sh + - trigger-builds: + - project: "release-jjb-icefish-sources" + current-parameters: true + block: true + same-node: true diff --git a/jjb/release-jjb-icefish-sources/include-release-jjb-release-sources-rsync.sh b/jjb/release-jjb-icefish-sources/include-release-jjb-release-sources-rsync.sh index e458a17d..ceac3acd 100644 --- a/jjb/release-jjb-icefish-sources/include-release-jjb-release-sources-rsync.sh +++ b/jjb/release-jjb-icefish-sources/include-release-jjb-release-sources-rsync.sh @@ -2,38 +2,61 @@ #set -x set -e -#export RSYNCDST="jenkins-slave@10.30.72.8:/srv/download/AGL/release/${RELEASE_BRANCH}/${RELEASE_VERSION}/" -#export RSYNCSRC=$(pwd)/UPLOAD/ # construct upload folder BRANCH=${RELEASE_BRANCH} -RELVER=${RELEASE_VERSION} +REVISION=${RELEASE_VERSION} -rm -rf release-upload || true -git clone -b ${RELEASE_BRANCH} https://gerrit.automotivelinux.org/gerrit/p/staging/release-upload.git -cd release-upload +rm -rf AGLRELEASE || true -gpg --keyserver pool.sks-keyservers.net --recv D6DD2170 +mkdir agl-${BRANCH}-${REVISION} +pushd agl-${BRANCH}-${REVISION} -ls | grep -q agl-${RELEASE_BRANCH}-${RELEASE_VERSION}.tar.bz2 +repo init --reference=/opt/AGL/preclone -q -b ${GERRIT_BRANCH} -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo -m ${BRANCH}_${REVISION}.xml -( gpg --verify agl-${RELEASE_BRANCH}-${RELEASE_VERSION}.tar.bz2.sig agl-${RELEASE_BRANCH}-${RELEASE_VERSION}.tar.bz2 2>&1 | grep -e "Good signature.*Jan-Simon.*Moeller.*AGL.*Release" -q && echo "gpg key verification succeeded" ) || ( echo "gpg key verification failed" && exit 1 ) +repo sync --force-sync -rm -rf ../UPLOAD || true -mkdir -p ../UPLOAD/ +repo manifest -r > ../${BRANCH}_${REVISION}.tar.xml -cp -ar agl-${RELEASE_BRANCH}-${RELEASE_VERSION}.* ../UPLOAD/ +rm -rf .repo +find . -name *.git | xargs rm -rf -export RSYNCSRC=$(pwd)/../UPLOAD +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 \ No newline at end of file +fi diff --git a/jjb/release-jjb-icefish-sources/release-jjb-sources.yaml b/jjb/release-jjb-icefish-sources/release-jjb-sources.yaml index d0ee0879..86328176 100644 --- a/jjb/release-jjb-icefish-sources/release-jjb-sources.yaml +++ b/jjb/release-jjb-icefish-sources/release-jjb-sources.yaml @@ -11,9 +11,13 @@ node: agl-test-slave parameters: + - string: + name: GERRIT_BRANCH + default: icefish + description: "release version number for build" - string: name: RELEASE_VERSION - default: 8.99.1 + default: 9.0.0 description: "release version number for build" - string: name: RELEASE_BRANCH -- cgit 1.2.3-korg