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

Fix trial rebuilds #239

Merged
merged 2 commits into from
Feb 16, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 24 additions & 7 deletions .github/workflows/rebuild-hmpxv1-big.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,34 @@ on:
workflow_dispatch:
inputs:
trial_name:
description: "If set, result will be at nextstrain.org/staging/trial/trial_name/mpox/mpxv"
description: "If set, result will be at nextstrain.org/staging/trial/${trial_name}/${auspice_name}"
required: false
image:
description: 'Specific container image to use for build (will override the default of "nextstrain build")'
required: false

env:
TRIAL_NAME: ${{ github.event.inputs.trial_name }}
NEXTSTRAIN_DOCKER_IMAGE: ${{ github.event.inputs.image }}

jobs:
set_config_overrides:
runs-on: ubuntu-latest
steps:
- id: config
name: Set config overrides
env:
TRIAL_NAME: ${{ inputs.trial_name }}
run: |
config=""
if [[ "$TRIAL_NAME" ]]; then
config+="--config"
config+=" deploy_url='s3://nextstrain-staging/'"
config+=" auspice_prefix='"$TRIAL_NAME"'"
fi

echo "config=$config" >> "$GITHUB_OUTPUT"
outputs:
config_overrides: ${{ steps.config.outputs.config }}

rebuild_hmpxv1_big:
needs: [set_config_overrides]
permissions:
id-token: write
uses: nextstrain/.github/.github/workflows/pathogen-repo-build.yaml@master
Expand All @@ -29,8 +45,9 @@ jobs:
runtime: aws-batch
env: |
NEXTSTRAIN_DOCKER_IMAGE: ${{ inputs.image }}
CONFIG_OVERRIDES: ${{ needs.set_config_overrides.outputs.config_overrides }}
GITHUB_RUN_ID: ${{ github.run_id }}
SLACK_CHANNELS: ${{ vars.SLACK_CHANNELS }}
SLACK_CHANNELS: ${{ inputs.trial_name && vars.TEST_SLACK_CHANNEL || vars.SLACK_CHANNELS }}
BUILD_DIR: phylogenetic
BUILD_NAME: hmpxv1_big
run: |
Expand All @@ -47,4 +64,4 @@ jobs:
. \
notify_on_deploy \
--configfiles $BUILD_DIR/config/$BUILD_NAME/config.yaml $BUILD_DIR/config/nextstrain_automation.yaml \
--config auspice_prefix=$TRIAL_NAME --directory $BUILD_DIR --snakefile $BUILD_DIR/Snakefile
$CONFIG_OVERRIDES --directory $BUILD_DIR --snakefile $BUILD_DIR/Snakefile
31 changes: 24 additions & 7 deletions .github/workflows/rebuild-hmpxv1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,34 @@ on:
workflow_dispatch:
inputs:
trial_name:
description: "If set, result will be at nextstrain.org/staging/trial/trial_name/mpox/mpxv"
description: "If set, result will be at nextstrain.org/staging/trial/${trial_name}/${auspice_name}"
required: false
image:
description: 'Specific container image to use for build (will override the default of "nextstrain build")'
required: false

env:
TRIAL_NAME: ${{ github.event.inputs.trial_name }}
NEXTSTRAIN_DOCKER_IMAGE: ${{ github.event.inputs.image }}

jobs:
set_config_overrides:
runs-on: ubuntu-latest
steps:
- id: config
name: Set config overrides
env:
TRIAL_NAME: ${{ inputs.trial_name }}
run: |
config=""
if [[ "$TRIAL_NAME" ]]; then
config+="--config"
config+=" deploy_url='s3://nextstrain-staging/'"
config+=" auspice_prefix='"$TRIAL_NAME"'"
fi

echo "config=$config" >> "$GITHUB_OUTPUT"
outputs:
config_overrides: ${{ steps.config.outputs.config }}

rebuild_hmpxv1:
needs: [set_config_overrides]
permissions:
id-token: write
uses: nextstrain/.github/.github/workflows/pathogen-repo-build.yaml@master
Expand All @@ -29,8 +45,9 @@ jobs:
runtime: aws-batch
env: |
NEXTSTRAIN_DOCKER_IMAGE: ${{ inputs.image }}
CONFIG_OVERRIDES: ${{ needs.set_config_overrides.outputs.config_overrides }}
GITHUB_RUN_ID: ${{ github.run_id }}
SLACK_CHANNELS: ${{ vars.SLACK_CHANNELS }}
SLACK_CHANNELS: ${{ inputs.trial_name && vars.TEST_SLACK_CHANNEL || vars.SLACK_CHANNELS }}
BUILD_DIR: phylogenetic
BUILD_NAME: hmpxv1
run: |
Expand All @@ -47,4 +64,4 @@ jobs:
. \
notify_on_deploy \
--configfiles $BUILD_DIR/config/$BUILD_NAME/config.yaml $BUILD_DIR/config/nextstrain_automation.yaml \
--config auspice_prefix=$TRIAL_NAME --directory $BUILD_DIR --snakefile $BUILD_DIR/Snakefile
$CONFIG_OVERRIDES --directory $BUILD_DIR --snakefile $BUILD_DIR/Snakefile
31 changes: 24 additions & 7 deletions .github/workflows/rebuild-mpxv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,34 @@ on:
workflow_dispatch:
inputs:
trial_name:
description: "If set, result will be at nextstrain.org/staging/trial/trial_name/mpox/mpxv"
description: "If set, result will be at nextstrain.org/staging/trial/${trial_name}/${auspice_name}"
required: false
image:
description: 'Specific container image to use for build (will override the default of "nextstrain build")'
required: false

env:
TRIAL_NAME: ${{ github.event.inputs.trial_name }}
NEXTSTRAIN_DOCKER_IMAGE: ${{ github.event.inputs.image }}

jobs:
set_config_overrides:
runs-on: ubuntu-latest
steps:
- id: config
name: Set config overrides
env:
TRIAL_NAME: ${{ inputs.trial_name }}
run: |
config=""
if [[ "$TRIAL_NAME" ]]; then
config+="--config"
config+=" deploy_url='s3://nextstrain-staging/'"
config+=" auspice_prefix='"$TRIAL_NAME"'"
fi

echo "config=$config" >> "$GITHUB_OUTPUT"
outputs:
config_overrides: ${{ steps.config.outputs.config }}

rebuild_mpxv:
needs: [set_config_overrides]
permissions:
id-token: write
uses: nextstrain/.github/.github/workflows/pathogen-repo-build.yaml@master
Expand All @@ -29,8 +45,9 @@ jobs:
runtime: aws-batch
env: |
NEXTSTRAIN_DOCKER_IMAGE: ${{ inputs.image }}
CONFIG_OVERRIDES: ${{ needs.set_config_overrides.outputs.config_overrides }}
GITHUB_RUN_ID: ${{ github.run_id }}
SLACK_CHANNELS: ${{ vars.SLACK_CHANNELS }}
SLACK_CHANNELS: ${{ inputs.trial_name && vars.TEST_SLACK_CHANNEL || vars.SLACK_CHANNELS }}
BUILD_DIR: phylogenetic
BUILD_NAME: mpxv
run: |
Expand All @@ -47,4 +64,4 @@ jobs:
. \
notify_on_deploy \
--configfiles $BUILD_DIR/config/$BUILD_NAME/config.yaml $BUILD_DIR/config/nextstrain_automation.yaml \
--config auspice_prefix=$TRIAL_NAME --directory $BUILD_DIR --snakefile $BUILD_DIR/Snakefile
$CONFIG_OVERRIDES --directory $BUILD_DIR --snakefile $BUILD_DIR/Snakefile
Loading