Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug 1483072: make awscli profile optional #1137

Merged
merged 1 commit into from Sep 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 8 additions & 3 deletions Jenkinsfile
Expand Up @@ -11,10 +11,10 @@ def buildSite() {
}
}

def syncS3(String bucket) {
def syncS3(String bucket, String extra_args='') {
stage ('s3 sync') {
try {
sh "bin/s3-sync.sh " + bucket
sh "bin/s3-sync.sh ${bucket} ${extra_args}"
} catch(err) {
sh "bin/irc-notify.sh --stage 's3 sync " + env.BRANCH_NAME + "' --status 'failed'"
throw err
Expand All @@ -38,6 +38,11 @@ node {
}
if ( env.BRANCH_NAME == 'prod' ) {
buildSite()
syncS3(is_mozmeao_pipeline() ? 'mdninteractive' : 'mdninteractive-b77d14bceaaa9ea4')
if (is_mozmeao_pipeline()) {
// TODO: After cutover to IT-owned services, remove this branch.
syncS3('mdninteractive', '--profile mdninteractive')
} else {
syncS3('mdninteractive-b77d14bceaaa9ea4')
}
}
}
2 changes: 1 addition & 1 deletion bin/s3-sync.sh
Expand Up @@ -7,7 +7,7 @@ fi

SHORT_CACHE="--cache-control max-age=1800" # 30 minutes
LONG_CACHE="--cache-control max-age=2629800" # 1 month
ARGS="--acl public-read --delete --profile mdninteractive"
ARGS="--acl public-read --delete ${@:2}"
cd docs

for path in pages live-examples; do
Expand Down