summaryrefslogtreecommitdiffstats
path: root/jjb/dovetail/dovetail-artifacts-upload.sh
diff options
context:
space:
mode:
authorJun Li <matthew.lijun@huawei.com>2016-12-21 01:45:10 +0000
committerGerrit Code Review <gerrit@opnfv.org>2016-12-21 01:45:10 +0000
commitbc36d59615bcf6e22f3efef2635a0fe8fffd8cdd (patch)
tree121f5381b36b4015b1acb0dbd547fc81cf4f8c81 /jjb/dovetail/dovetail-artifacts-upload.sh
parentbd5b2d590ab6c5640a3982efc2fb52b1051e9329 (diff)
parent6bf42ca351fdb0ceff5f34daa27d95cdf24bcd05 (diff)
Merge "dovetail: upload artifacts job added"
Diffstat (limited to 'jjb/dovetail/dovetail-artifacts-upload.sh')
-rwxr-xr-xjjb/dovetail/dovetail-artifacts-upload.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/jjb/dovetail/dovetail-artifacts-upload.sh b/jjb/dovetail/dovetail-artifacts-upload.sh
new file mode 100755
index 000000000..5ec6b375d
--- /dev/null
+++ b/jjb/dovetail/dovetail-artifacts-upload.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+# SPDX-license-identifier: Apache-2.0
+##############################################################################
+# Copyright (c) 2016 Huawei Technologies Co.,Ltd and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+set -o pipefail
+
+echo "dovetail: pull and save the images"
+
+[[ -d ${CACHE_DIR} ]] || mkdir -p ${CACHE_DIR}
+
+cd ${CACHE_DIR}
+sudo docker pull ${DOCKER_REPO_NAME}:${DOCKER_TAG}
+sudo docker save -o ${STORE_FILE_NAME} ${DOCKER_REPO_NAME}:${DOCKER_TAG}
+
+echo "dovetail: upload image to artifacts.opnfv.org, which can be for offline usage"
+gsutil cp ${CACHE_DIR}/${STORE_FILE_NAME} ${STORE_URL}
+
+echo "dovetail: uploading done"