aboutsummaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
Diffstat (limited to 'jjb')
-rw-r--r--jjb/release-jjb-needlefish-release/include-release-jjb-release-move-sandbox.sh27
-rw-r--r--jjb/release-jjb-needlefish-release/release-jjb-release.yaml49
-rw-r--r--jjb/release-jjb-needlefish-sources/include-release-jjb-release-sources-rsync.sh67
-rw-r--r--jjb/release-jjb-needlefish-sources/release-jjb-sources.yaml44
4 files changed, 187 insertions, 0 deletions
diff --git a/jjb/release-jjb-needlefish-release/include-release-jjb-release-move-sandbox.sh b/jjb/release-jjb-needlefish-release/include-release-jjb-release-move-sandbox.sh
new file mode 100644
index 00000000..2f85a3ea
--- /dev/null
+++ b/jjb/release-jjb-needlefish-release/include-release-jjb-release-move-sandbox.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+#set -x
+set -e
+
+if test x"" = x"${RELEASE_BRANCH}"; then
+ echo "RELEASE_BRANCH invalid"
+ exit 1
+fi
+
+if test x"" = x"${RELEASE_VERSION}"; then
+ echo "RELEASE_VERSION invalid"
+ exit 1
+fi
+
+
+export REMOTESRC="/srv/download/AGL/upload/ci/${RELEASE_BRANCH}/${RELEASE_VERSION}/"
+export REMOTEDST="/srv/download/AGL/release/${RELEASE_BRANCH}/${RELEASE_VERSION}/"
+
+if test x"yes" = x"$UPLOAD" ; then
+ ssh -o StrictHostKeyChecking=no jenkins-slave@10.30.72.8 mkdir -p ${REMOTEDST}
+ ssh -o StrictHostKeyChecking=no jenkins-slave@10.30.72.8 mv ${REMOTESRC}/* ${REMOTEDST}/
+ ssh -o StrictHostKeyChecking=no jenkins-slave@10.30.72.8 rm -r ${REMOTESRC}
+ ssh -o StrictHostKeyChecking=no jenkins-slave@10.30.72.8 sh -c "cd /srv/download/AGL/release/${RELEASE_BRANCH}/ ; rm latest ; ln -sf ${RELEASE_VERSION} latest ; echo ${RELEASE_VERSION} > latest.txt"
+fi
+
+exit 0 \ No newline at end of file
diff --git a/jjb/release-jjb-needlefish-release/release-jjb-release.yaml b/jjb/release-jjb-needlefish-release/release-jjb-release.yaml
new file mode 100644
index 00000000..f604d003
--- /dev/null
+++ b/jjb/release-jjb-needlefish-release/release-jjb-release.yaml
@@ -0,0 +1,49 @@
+---
+- project:
+ name: release-jjb-needlefish-release-from-snapshot
+ jobs:
+ - release-jjb-needlefish-release-from-snapshot
+
+- job-template:
+ name: 'release-jjb-needlefish-release-from-snapshot'
+ project-type: freestyle
+ concurrent: false
+ node: agl-test-slave
+
+ parameters:
+ - string:
+ name: GERRIT_BRANCH
+ default: master
+ description: "branch to build"
+ - string:
+ name: RELEASE_BRANCH
+ default: needlefish
+ description: "release branch to build"
+ - string:
+ name: RELEASE_VERSION
+ default: 13.91.0
+ description: "release version number for 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-move-sandbox.sh
+ - trigger-builds:
+ - project: "release-jjb-needlefish-sources"
+ current-parameters: true
+ block: true
+
diff --git a/jjb/release-jjb-needlefish-sources/include-release-jjb-release-sources-rsync.sh b/jjb/release-jjb-needlefish-sources/include-release-jjb-release-sources-rsync.sh
new file mode 100644
index 00000000..b0947b8b
--- /dev/null
+++ b/jjb/release-jjb-needlefish-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 --repo-branch=repo-1 --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 <<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
diff --git a/jjb/release-jjb-needlefish-sources/release-jjb-sources.yaml b/jjb/release-jjb-needlefish-sources/release-jjb-sources.yaml
new file mode 100644
index 00000000..ac41822d
--- /dev/null
+++ b/jjb/release-jjb-needlefish-sources/release-jjb-sources.yaml
@@ -0,0 +1,44 @@
+---
+- project:
+ name: release-jjb-needlefish-sources
+ jobs:
+ - release-jjb-needlefish-sources
+
+- job-template:
+ name: 'release-jjb-needlefish-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: 13.91.0
+ description: "release version number for build"
+ - string:
+ name: RELEASE_BRANCH
+ default: needlefish
+ 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