Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d266829

Browse files
author
Will Feng
committed
Move manager.7z s3 cp to build.sh
1 parent a64d2f5 commit d266829

2 files changed

Lines changed: 9 additions & 20 deletions

File tree

.circleci/config.yml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -65,27 +65,7 @@ pytorch_tutorial_build_defaults: &pytorch_tutorial_build_defaults
6565
# =================== The following code will be executed inside Docker container ===================
6666
set -ex
6767
68-
export JOB_BASE_NAME_BACKUP=${JOB_BASE_NAME}
69-
export COMMIT_SOURCE_BACKUP=${COMMIT_SOURCE}
70-
7168
.jenkins/build.sh
72-
73-
export JOB_BASE_NAME=${JOB_BASE_NAME_BACKUP}
74-
export COMMIT_SOURCE=${COMMIT_SOURCE_BACKUP}
75-
76-
if [[ "$COMMIT_SOURCE" == master ]]; then
77-
export BUCKET_NAME=pytorch-tutorial-build-master
78-
else
79-
export BUCKET_NAME=pytorch-tutorial-build-pull-request
80-
fi
81-
82-
if [[ "${JOB_BASE_NAME}" == *manager ]]; then
83-
7z a manager.7z docs
84-
aws s3 cp manager.7z s3://${BUCKET_NAME}/${COMMIT_ID}/manager.7z --acl public-read
85-
86-
# yf225 TODO: push new html pages to gh-pages
87-
# make sure to git add -f all the files in docs/ !!!
88-
fi
8969
# =================== The above code will be executed inside Docker container ===================
9070
EOL
9171
chmod +x /home/circleci/project/ci_build_script.sh

.jenkins/build.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,15 @@ elif [[ "${JOB_BASE_NAME}" == *manager ]]; then
149149

150150
# Step 5: Copy all static files into docs
151151
rsync -av docs_with_plot/docs/ docs --exclude beginner --exclude intermediate --exclude advanced
152+
153+
# Step 6: Copy generated HTML files and static files to S3
154+
7z a manager.7z docs
155+
aws s3 cp manager.7z s3://${BUCKET_NAME}/${COMMIT_ID}/manager.7z --acl public-read
156+
157+
# yf225 TODO: push new html pages to gh-pages
158+
# make sure to git add -f all the files in docs/ !!!
159+
# if [[ "$COMMIT_SOURCE" == master ]]; then
160+
# fi
152161
else
153162
make docs
154163
fi

0 commit comments

Comments
 (0)