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

pathogen-repo-build improvements #101

Merged
merged 3 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/pathogen-repo-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,16 @@ on:
This is not supported for builds on AWS Batch because the workflow detaches from the build. Please use the `nextstrain build` command locally to reattach to AWS Batch builds to download outputs.
type: string
required: false
outputs:
aws-batch-job-id:
description: >-
AWS Batch job id of the build if it was run with the `aws-batch` runtime. This can be used to re-attach to the AWS Batch job with:


nextstrain build --aws-batch --attach <aws-batch-job-id>

This can be useful to download results from the build and use them in subsequent jobs.
value: ${{ jobs.run-build.outputs.AWS_BATCH_JOB_ID }}
workflow_dispatch:
inputs:
runtime:
Expand Down Expand Up @@ -287,6 +297,7 @@ jobs:
"$NEXTSTRAIN_GITHUB_DIR"/bin/write-envdir "$NEXTSTRAIN_RUNTIME_ENVDIR" \
AWS_ACCESS_KEY_ID \
AWS_SECRET_ACCESS_KEY \
AWS_DEFAULT_REGION \
${AWS_SESSION_TOKEN:+AWS_SESSION_TOKEN}
# This will overwrite the runtime AWS credential envvars configured above
# so if the build is using the aws-batch runtime, the Nextstrain CLI will
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/pathogen-repo-build.yaml.in
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,19 @@ on:
type: string
required: false

outputs:
aws-batch-job-id:
description: >-
AWS Batch job id of the build if it was run with the `aws-batch` runtime.
This can be used to re-attach to the AWS Batch job with:

nextstrain build --aws-batch --attach <aws-batch-job-id>

This can be useful to download results from the build and use them
in subsequent jobs.

value: ${{ jobs.run-build.outputs.AWS_BATCH_JOB_ID }}

workflow_dispatch:
inputs:
<<: *inputs
Expand Down Expand Up @@ -256,6 +269,7 @@ jobs:
"$NEXTSTRAIN_GITHUB_DIR"/bin/write-envdir "$NEXTSTRAIN_RUNTIME_ENVDIR" \
AWS_ACCESS_KEY_ID \
AWS_SECRET_ACCESS_KEY \
AWS_DEFAULT_REGION \
${AWS_SESSION_TOKEN:+AWS_SESSION_TOKEN}

# This will overwrite the runtime AWS credential envvars configured above
Expand Down