Streamline and simplify release jobs 87/24187/1
authorJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Thu, 5 Mar 2020 22:52:48 +0000 (23:52 +0100)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Thu, 5 Mar 2020 22:54:17 +0000 (23:54 +0100)
Extend automation.

Signed-off-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Change-Id: I959da9e8048dcf8fe87bf6ae23d7350947ec5b40

jjb/release-jjb-guppy-release/release-jjb-release.yaml
jjb/release-jjb-guppy-sources/include-release-jjb-release-sources-rsync.sh
jjb/release-jjb-guppy-sources/release-jjb-sources.yaml
jjb/release-jjb-halibut-release/release-jjb-release.yaml
jjb/release-jjb-halibut-sources/include-release-jjb-release-sources-rsync.sh
jjb/release-jjb-halibut-sources/release-jjb-sources.yaml
jjb/release-jjb-icefish-release/release-jjb-release.yaml
jjb/release-jjb-icefish-sources/include-release-jjb-release-sources-rsync.sh
jjb/release-jjb-icefish-sources/release-jjb-sources.yaml

index 3e7b650..f107965 100644 (file)
     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
index e458a17..ceac3ac 100644 (file)
@@ -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 <<EOF > 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
index a4332f9..4e33fab 100644 (file)
     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
index 607ee68..bee3401 100644 (file)
     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
index e458a17..ceac3ac 100644 (file)
@@ -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 <<EOF > 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
index 192e4ba..c55d0db 100644 (file)
     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
index e2355fe..1bb6db8 100644 (file)
     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
index e458a17..ceac3ac 100644 (file)
@@ -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 <<EOF > 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
index d0ee087..8632817 100644 (file)
     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