Skip to content

Commit

Permalink
Attempt to create sandbox data release in nightly builds. (#3158)
Browse files Browse the repository at this point in the history
* Attempt to create sandbox data release in nightly builds.

* Update conda-lock.yml and rendered conda environment files.

---------

Co-authored-by: zaneselvans <[email protected]>
  • Loading branch information
zaneselvans and zaneselvans authored Dec 14, 2023
1 parent b1b3278 commit 66c73b4
Show file tree
Hide file tree
Showing 6 changed files with 118 additions and 109 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-deploy-pudl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ jobs:
--container-env DAGSTER_PG_HOST="104.154.182.24" \
--container-env DAGSTER_PG_DB="dagster-storage" \
--container-env FLY_ACCESS_TOKEN=${{ secrets.FLY_ACCESS_TOKEN }} \
--container-env ZENODO_SANDBOX_TOKEN_PUBLISH=${{ secrets.ZENODO_SANDBOX_TOKEN_PUBLISH }} \
--container-env PUDL_SETTINGS_YML="/home/mambauser/src/pudl/package_data/settings/etl_full.yml" \
--container-env PUDL_GCS_OUTPUT=${{ env.GCS_OUTPUT_BUCKET }}/${{ env.COMMIT_TIME }}-${{ env.SHORT_SHA }}-${{ env.COMMIT_BRANCH }}
Expand Down
10 changes: 10 additions & 0 deletions docker/gcp_pudl_etl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ function copy_outputs_to_distribution_bucket() {
aws s3 cp "$PUDL_OUTPUT/" "s3://intake.catalyst.coop/$GITHUB_REF" --recursive
}

function zenodo_data_release() {
echo "Creating a new PUDL data release on Zenodo."
~/devtools/zenodo/zenodo_data_release.py --publish --env sandbox --source-dir $PUDL_OUTPUT
}


function notify_slack() {
# Notify pudl-builds slack channel of deployment status
Expand Down Expand Up @@ -125,9 +130,14 @@ if [[ $ETL_SUCCESS == 0 ]]; then
if [ $GITHUB_ACTION_TRIGGER = "push" ] || [ $GITHUB_REF = "dev" ]; then
copy_outputs_to_distribution_bucket
ETL_SUCCESS=${PIPESTATUS[0]}
zenodo_data_release 2>&1 | tee -a $LOGFILE
ETL_SUCCESS=${PIPESTATUS[0]}
fi
fi

# This way we also save the logs from latter steps in the script
gsutil cp $LOGFILE ${PUDL_GCS_OUTPUT}

# Notify slack about entire pipeline's success or failure;
# PIPESTATUS[0] either refers to the failed ETL run or the last distribution
# task that was run above
Expand Down
12 changes: 6 additions & 6 deletions environments/conda-linux-64.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 66c73b4

Please sign in to comment.