diff options
author | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2023-05-11 22:27:14 +0200 |
---|---|---|
committer | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2023-05-11 22:27:14 +0200 |
commit | 6d7054c476b1a2f8bfabe409bf56d07da1266b6e (patch) | |
tree | 41b9f46e9a23574760b48536f2ac26e8624358f0 /jjb/release-jjb-octopus-release | |
parent | 11a623e3a2cf2ab987d14e8a1e4c4ab070a1a69b (diff) |
Signed-off-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Change-Id: I9847340a854086273fab07b9895e4a1c66cb4e39
Diffstat (limited to 'jjb/release-jjb-octopus-release')
-rw-r--r-- | jjb/release-jjb-octopus-release/include-release-jjb-release-move-sandbox.sh | 27 | ||||
-rw-r--r-- | jjb/release-jjb-octopus-release/release-jjb-release.yaml | 49 |
2 files changed, 76 insertions, 0 deletions
diff --git a/jjb/release-jjb-octopus-release/include-release-jjb-release-move-sandbox.sh b/jjb/release-jjb-octopus-release/include-release-jjb-release-move-sandbox.sh new file mode 100644 index 00000000..2f85a3ea --- /dev/null +++ b/jjb/release-jjb-octopus-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-octopus-release/release-jjb-release.yaml b/jjb/release-jjb-octopus-release/release-jjb-release.yaml new file mode 100644 index 00000000..a8b2fda1 --- /dev/null +++ b/jjb/release-jjb-octopus-release/release-jjb-release.yaml @@ -0,0 +1,49 @@ +--- +- project: + name: release-jjb-octopus-release-from-snapshot + jobs: + - release-jjb-octopus-release-from-snapshot + +- job-template: + name: 'release-jjb-octopus-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: octopus + description: "release branch to build" + - string: + name: RELEASE_VERSION + default: 14.92.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-octopus-sources" + current-parameters: true + block: true + |