diff --git a/.github/workflows/push-tests.yml b/.github/workflows/push-tests.yml index c29b29fe3d..976738d9cd 100644 --- a/.github/workflows/push-tests.yml +++ b/.github/workflows/push-tests.yml @@ -195,7 +195,7 @@ jobs: docker buildx build --cache-from=type=registry,ref=${{ secrets.ECR_REPO }}/genepi-backend:branch-trunk -t ${{ secrets.ECR_REPO }}/genepi-backend:latest src/backend make local-init LOCALDEV_PROFILE=backend make backend-test - gisaid-test: + workflows-gisaid-pangolin-test: runs-on: ubuntu-20.04 steps: - name: Configure AWS prod Credentials @@ -221,9 +221,12 @@ jobs: make gha-setup # Build gisaid image # docker buildx build --cache-from=type=registry,ref=${{ secrets.ECR_REPO }}/genepi-backend:branch-trunk -t ${{ secrets.ECR_REPO }}/genepi-gisaid:latest -f src/backend/Dockerfile.gisaid src/backend + # Build pangolin image + # docker buildx build --cache-from=type=registry,ref=${{ secrets.ECR_REPO }}/genepi-backend:branch-trunk -t ${{ secrets.ECR_REPO }}/genepi-pangolin:latest -f src/backend/Dockerfile.pangolin src/backend make local-init LOCALDEV_PROFILE=gisaid python3 -m pip install miniwdl make pipeline-test-gisaid + make pipeline-test-pangolin build-push-images: if: github.ref == 'refs/heads/trunk' runs-on: ubuntu-20.04 diff --git a/.happy/terraform/modules/sfn_config/pangolin-ondemand.wdl b/.happy/terraform/modules/sfn_config/pangolin-ondemand.wdl index faeba854bb..51551e8190 100644 --- a/.happy/terraform/modules/sfn_config/pangolin-ondemand.wdl +++ b/.happy/terraform/modules/sfn_config/pangolin-ondemand.wdl @@ -2,13 +2,12 @@ version 1.1 workflow pangolin { input { - String docker_image_id = "pangolin:latest" + String docker_image_id = "genepi-pangolin:latest" String aws_region = "us-west-2" String genepi_config_secret_name String remote_dev_prefix = "" Array[String] samples } - call pangolin_workflow { input: docker_image_id = docker_image_id, @@ -29,6 +28,7 @@ task pangolin_workflow { } command <<< + export AWS_REGION="~{aws_region}" export GENEPI_CONFIG_SECRET_NAME="~{genepi_config_secret_name}" if [ "~{remote_dev_prefix}" != "" ]; then export REMOTE_DEV_PREFIX="~{remote_dev_prefix}" diff --git a/Makefile b/Makefile index b233b8449f..54e556c946 100644 --- a/Makefile +++ b/Makefile @@ -269,6 +269,18 @@ pipeline-test-gisaid: miniwdl run --cfg miniwdl.cfg --env AWS_ACCESS_KEY_ID --env AWS_SECRET_ACCESS_KEY --env BOTO_ENDPOINT_URL --input test_inputs.json --verbose -o output.json ../../../.happy/terraform/modules/sfn_config/gisaid.wdl $(docker_compose) run --no-deps --rm backend make pipeline-test-gisaid +.PHONY: pipeline-test-pangolin +pipeline-test-pangolin: + source .env.ecr; \ + export DOCKER_REPO; \ + export BOTO_ENDPOINT_URL=http://localstack.genepinet.localdev:4566; \ + export AWS_ACCESS_KEY_ID=NONCE; \ + export AWS_SECRET_ACCESS_KEY=NONCE; \ + export MINIWDL_CFG=miniwdl.cfg; \ + cd src/backend/pipeline_tests; \ + cat test_data/pangolin_pipeline_inputs.json | envsubst > test_inputs.json; \ + miniwdl run --debug --cfg miniwdl.cfg --env AWS_ACCESS_KEY_ID --env AWS_SECRET_ACCESS_KEY --env BOTO_ENDPOINT_URL --input test_inputs.json --verbose -o output.json ../../../.happy/terraform/modules/sfn_config/pangolin-ondemand.wdl + $(docker_compose) run --no-deps --rm backend make pipeline-test-pangolin ### WDL ################################################### .PHONY: wdl-lint diff --git a/src/backend/pipeline_tests/test_data/pangolin_pipeline_inputs.json b/src/backend/pipeline_tests/test_data/pangolin_pipeline_inputs.json new file mode 100644 index 0000000000..d00c30c016 --- /dev/null +++ b/src/backend/pipeline_tests/test_data/pangolin_pipeline_inputs.json @@ -0,0 +1,6 @@ +{ +"docker_image_id": "${DOCKER_REPO}genepi-pangolin:latest", +"aws_region": "us-west-2", +"genepi_config_secret_name": "genepi-config", +"samples": ["OCPH20", "OCPH21", "OCPH22", "OCPH23", "OCPH24"] +} \ No newline at end of file