You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2021/03/05 20:54:32 UTC

[GitHub] [incubator-mxnet] szha commented on a change in pull request #19955: [website] Automate website artifacts uploading

szha commented on a change in pull request #19955:
URL: https://github.com/apache/incubator-mxnet/pull/19955#discussion_r588695556



##########
File path: ci/docker/runtime_functions.sh
##########
@@ -1212,6 +1212,30 @@ build_docs_beta() {
     popd
 }
 
+push_docs() {
+    folder_name=$1
+    set -ex
+    pip3 install --user awscli
+    export PATH=~/.local/bin:$PATH
+    pushd docs/_build
+    tar -xzf full_website.tgz --strip-components 1
+    # check if folder_name already exists in versions
+    pushd versions
+    if [ -d "$folder_name" ]; then
+        echo "Folder $folder_name already exists in versions. Please double check the FOLDER_NAME variable in Jenkens pipeline"
+        exit 1
+    fi
+    mv master $folder_name
+    popd
+    zip -r9 versions.zip versions/.
+    # Upload versions folder
+    aws s3 cp versions.zip s3://mxnet-website-static-artifacts --acl public-read
+    # Backup versions folder with the latest version name
+    backup_file="versions_backup_upto_$folder_name.zip"
+    aws s3 cp versions.zip s3://mxnet-website-static-artifacts/$backup_file --acl public-read

Review comment:
       Copy between s3 locations will make it more efficient.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org