-
-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve flexibility for publishing options (#2964)
Improve flexibility for publishing options Merging this in today so we can see how it goes with tonight's build, and so I can integrate the changes with #3086.
- Loading branch information
Showing
2 changed files
with
30 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ env: | |
GITHUB_REF: ${{ github.ref_name }} # This is changed to dev if running on a schedule | ||
GCE_INSTANCE: pudl-deployment-tag # This is changed to pudl-deployment-dev if running on a schedule | ||
GCE_INSTANCE_ZONE: ${{ secrets.GCE_INSTANCE_ZONE }} | ||
GCS_OUTPUT_BUCKET: gs://nightly-build-outputs.catalyst.coop | ||
|
||
jobs: | ||
build_and_deploy_pudl: | ||
|
@@ -34,6 +35,7 @@ jobs: | |
- name: Get HEAD of the branch (main or dev) | ||
run: | | ||
echo "ACTION_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV | ||
echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | ||
- name: Print action vars | ||
run: | | ||
|
@@ -83,6 +85,11 @@ jobs: | |
- name: Set up Cloud SDK | ||
uses: google-github-actions/setup-gcloud@v1 | ||
|
||
- name: Determine commit information | ||
run: |- | ||
echo "COMMIT_BRANCH=$(gitrev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV | ||
echo "COMMIT_TIME=$(git log -1 --format=%cd --date=format:%Y-%m-%d-%H%M)" >> $GITHUB_ENV | ||
# Deploy PUDL image to GCE | ||
- name: Deploy | ||
env: | ||
|
@@ -119,6 +126,7 @@ jobs: | |
--container-env DAGSTER_PG_DB="dagster-storage" \ | ||
--container-env FLY_ACCESS_TOKEN=${{ secrets.FLY_ACCESS_TOKEN }} \ | ||
--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 }} | ||
# Start the VM | ||
- name: Start the deploy-pudl-vm | ||
|
@@ -129,6 +137,6 @@ jobs: | |
uses: slackapi/[email protected] | ||
with: | ||
channel-id: "C03FHB9N0PQ" | ||
slack-message: "build-deploy-pudl status: ${{ job.status }}\n${{ env.ACTION_SHA }}-${{ env.GITHUB_REF }}" | ||
slack-message: "build-deploy-pudl status: ${{ job.status }}\n${{ env.COMMIT_TIME}}-${{ env.SHORT_SHA }}-${{ env.COMMIT_BRANCH }}" | ||
env: | ||
SLACK_BOT_TOKEN: ${{ secrets.PUDL_DEPLOY_SLACK_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters