X-Git-Url: https://gerrit.akraino.org/r/gitweb?p=ci-management.git;a=blobdiff_plain;f=jjb%2Fshell%2Fta-iso-deploy.sh;fp=jjb%2Fshell%2Fta-iso-deploy.sh;h=cbe86b9a794b492be9c3866246f58407d58801b4;hp=0000000000000000000000000000000000000000;hb=43090d9d26878bcabc7d46c0cce42f96ff7aaf6a;hpb=61e3624ffd3c9f9f61c0ade14c932114345cd0eb diff --git a/jjb/shell/ta-iso-deploy.sh b/jjb/shell/ta-iso-deploy.sh new file mode 100644 index 0000000..cbe86b9 --- /dev/null +++ b/jjb/shell/ta-iso-deploy.sh @@ -0,0 +1,37 @@ +#!/bin/bash +# SPDX-License-Identifier: EPL-1.0 +############################################################################## +# Copyright (c) 2017 The Linux Foundation and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +############################################################################## + +echo "---> ta-iso-deploy.sh" + +# Ensure we fail the job if any steps fail. +set -eu -o pipefail + +set -x # Trace commands for this script to make debugging easier. + +NEXUS_REPO=images-snapshots +release_path=TA/release-1 + +repo_dir="$WORKSPACE/work/nexus/$NEXUS_REPO" +upload_dir1="$repo_dir/$release_path/images/$BUILD_ID" +upload_dir2="$repo_dir/$release_path/images/latest" +nexus_repo_url="$NEXUS_URL/content/repositories/$NEXUS_REPO" + +mkdir -p "$upload_dir1" +mkdir -p "$upload_dir2" + +cp "$WORKSPACE/work/results/images/"* "$upload_dir1" +cp "$WORKSPACE/work/results/images/"* "$upload_dir2" + +echo "-----> Upload ISOs to Nexus" +lftools deploy nexus "$nexus_repo_url" "$repo_dir" + +set +x # Disable trace since we no longer need it. +echo "ISOs location: $nexus_repo_url"