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/02 18:27:45 UTC

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

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



##########
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
+    # back up versions folder
+    wget https://mxnet-website-static-artifacts.s3.us-east-2.amazonaws.com/versions.zip -O versions-backup.zip
+    aws s3 cp versions-backup.zip s3://mxnet-website-static-artifacts --acl public-read
+
+    zip -r9 versions.zip versions/.
+    aws s3 cp versions.zip s3://mxnet-website-static-artifacts --acl public-read

Review comment:
       This pipeline is for MXNet releases and should only be triggered to update the release version of website artifact. I think backing up by versions should be enough in this case. I changed the code to archive each released versions so the new back-up won't override the previous ones. The back-ups will have name `versions_backup_upto_$(release_version).zip'




----------------------------------------------------------------
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