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/02/28 23:23:07 UTC

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

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



##########
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:
       How about just publishing them in the format "YEAR-MONTH-DAY-COMMITHASH.zip" with a policy to recycle them after 3 months without access?




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