Skip to content

Commit

Permalink
Merge pull request #451 from Knowledge-Graph-Hub/fix_build_publish
Browse files Browse the repository at this point in the history
Need to call multi_indexer directly
  • Loading branch information
caufieldjh authored Mar 28, 2022
2 parents 218fddc + 2eb6514 commit 267c9be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ pipeline {
//
// put $S3PROJECTDIR/$BUILDSTARTDATE/ and $S3PROJECTDIR/current in s3 bucket
//
sh '. venv/bin/activate && python3.8 multi_indexer -v --directory $S3PROJECTDIR --prefix https://kg-hub.berkeleybop.io/$S3PROJECTDIR/ -x -u'
sh '. venv/bin/activate && multi_indexer -v --directory $S3PROJECTDIR --prefix https://kg-hub.berkeleybop.io/$S3PROJECTDIR/ -x -u'
// for existing builds on s3, we just made an index.html that will clobber the existing (correct) s3 index.html
// here we download the existing index.html and clobber the local one instead
sh ". venv/bin/activate && for dir in `s3cmd ls s3://kg-hub-public-data/kg-covid-19/ | grep '\\/\$' | awk '{print \$NF}' | grep -w -v -E 'raw|current' | xargs -n1 basename`; do s3cmd get --force --continue s3://kg-hub-public-data/kg-covid-19/\$dir/index.html $S3PROJECTDIR/\$dir/ || true; done"
Expand All @@ -200,7 +200,7 @@ pipeline {

// Build the top level index.html
// "External" packages required to run these scripts.
sh '. venv/bin/activate && python3.8 multi_indexer --bucket kg-hub-public-data --prefix https://kg-hub.berkeleybop.io/ > top-level-index.html'
sh '. venv/bin/activate && multi_indexer --bucket kg-hub-public-data --prefix https://kg-hub.berkeleybop.io/ > top-level-index.html'
sh '. venv/bin/activate && s3cmd -c $S3CMD_CFG put --acl-public --mime-type=text/html --cf-invalidate top-level-index.html s3://kg-hub-public-data/index.html'

// Invalidate the CDN now that the new files are up.
Expand Down

0 comments on commit 267c9be

Please sign in to comment.