Skip to content

Commit b572fb5

Browse files
authored
new bucket for pipeline deploys (#929)
* new bucket for pipeline deploys * Update dataproc vep init * add to the build
1 parent 497d36f commit b572fb5

File tree

5 files changed

+15
-29
lines changed

5 files changed

+15
-29
lines changed

.cloudbuild/docker.cloudbuild.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ steps:
77
- --dockerfile=v03_pipeline/deploy/Dockerfile
88
- --cache=true
99
- --cache-ttl=168h
10+
- --build-arg=PIPELINE_RUNNER_APP_VERSION=${COMMIT_SHA}
1011

1112
timeout: 1800s

.github/workflows/dev-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ jobs:
4343

4444
- name: Copy files to release directory
4545
run: |-
46-
gcloud storage rm -r gs://seqr-luigi/releases/dev/latest/ || echo 'No latest release'
47-
gcloud storage cp v03_pipeline/bin/* gs://seqr-luigi/releases/dev/latest/bin/
48-
gcloud storage cp dist/*.whl gs://seqr-luigi/releases/dev/latest/pyscripts.zip
46+
gcloud storage rm -r gs://seqr-pipeline-runner-builds/releases/dev/latest/ || echo 'No latest release'
47+
gcloud storage cp v03_pipeline/bin/* gs://seqr-pipeline-runner-builds/releases/dev/latest/bin/
48+
gcloud storage cp dist/*.whl gs://seqr-pipeline-runner-builds/releases/dev/latest/pyscripts.zip

.github/workflows/prod-release.yml

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,6 @@ jobs:
3232
python -m pip install build
3333
python -m build
3434
35-
- name: set tag name
36-
shell: bash
37-
run: |
38-
tag_name=`python3 -c "import v03_pipeline;print(v03_pipeline.__version__)"`
39-
echo "TAG_NAME=$tag_name" >> $GITHUB_ENV
40-
4135
- name: authenticate to google cloud
4236
id: "auth"
4337
uses: google-github-actions/auth@v0
@@ -51,26 +45,13 @@ jobs:
5145
- name: Copy files to release directory
5246
shell: bash
5347
run: |-
54-
gcloud storage rm -r gs://seqr-luigi/releases/prod/latest/ || echo 'No latest release'
55-
gcloud storage cp v03_pipeline/bin/* gs://seqr-luigi/releases/prod/latest/bin/
56-
gcloud storage cp dist/*.whl gs://seqr-luigi/releases/prod/latest/pyscripts.zip
57-
gcloud storage cp v03_pipeline/bin/* gs://seqr-luigi/releases/prod/$TAG_NAME/bin/
58-
gcloud storage cp dist/*.whl gs://seqr-luigi/releases/prod/$TAG_NAME/pyscripts.zip
48+
gcloud storage rm -r gs://seqr-pipeline-runner-builds/releases/latest/ || echo 'No latest release'
49+
gcloud storage cp v03_pipeline/bin/* gs://seqr-pipeline-runner-builds/releases/latest/bin/
50+
gcloud storage cp dist/*.whl gs://seqr-pipeline-runner-builds/releases/latest/pyscripts.zip
51+
gcloud storage cp v03_pipeline/bin/* gs://seqr-pipeline-runner-builds/releases/${{ github.event.workflow_run.head_sha }}/bin/
52+
gcloud storage cp dist/*.whl gs://seqr-pipeline-runner-builds/releases/${{ github.event.workflow_run.head_sha }}/pyscripts.zip
5953
gcloud storage cp -r v03_pipeline/var/vep/* gs://seqr-reference-data/vep/
6054
61-
- name: Create tag
62-
uses: actions/github-script@v7
63-
with:
64-
github-token: ${{ secrets.GITHUB_TOKEN }}
65-
script: |
66-
github.rest.git.createRef({
67-
owner: context.repo.owner,
68-
repo: context.repo.repo,
69-
ref: 'refs/tags/${{ env.TAG_NAME }}',
70-
sha: context.sha
71-
})
72-
73-
7455
docker:
7556
runs-on: ubuntu-latest
7657
if: ${{ github.event.workflow_run.conclusion == 'success' }}

v03_pipeline/bin/dataproc_vep_init.bash

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ set -x
1616
export PROJECT="$(gcloud config get-value project)"
1717
export ENVIRONMENT="$(/usr/share/google/get_metadata_value attributes/ENVIRONMENT)"
1818
export REFERENCE_GENOME="$(/usr/share/google/get_metadata_value attributes/REFERENCE_GENOME)"
19+
export PIPELINE_RUNNER_APP_VERSION="$(/usr/share/google/get_metadata_value attributes/PIPELINE_RUNNER_APP_VERSION)"
1920

2021
# Install docker
2122
apt-get update
@@ -52,10 +53,10 @@ EOF
5253
gcc -Wall -Werror -O2 /vep.c -o /vep
5354
chmod u+s /vep
5455

55-
gcloud storage cp gs://seqr-luigi/releases/$ENVIRONMENT/latest/bin/download_vep_reference_data.bash /download_vep_reference_data.bash
56+
gcloud storage cp gs://seqr-pipeline-runner-builds/releases/$ENVIRONMENT/$PIPELINE_RUNNER_APP_VERSION/bin/download_vep_reference_data.bash /download_vep_reference_data.bash
5657
chmod +x /download_vep_reference_data.bash
5758
./download_vep_reference_data.bash $REFERENCE_GENOME
5859

59-
gcloud storage cp gs://seqr-luigi/releases/$ENVIRONMENT/latest/bin/vep /vep.bash
60+
gcloud storage cp gs://seqr-pipeline-runner-builds/releases/$ENVIRONMENT/$PIPELINE_RUNNER_APP_VERSION/bin/vep /vep.bash
6061
chmod +x /vep.bash
6162

v03_pipeline/deploy/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ FROM hailgenetics/hail:0.2.132-py3.10
33
COPY --from=BUILD /usr/local/bin/docker /usr/local/bin/docker
44
LABEL maintainer="Broad TGG"
55

6+
ARG PIPELINE_RUNNER_APP_VERSION
7+
ENV PIPELINE_RUNNER_APP_VERSION=${PIPELINE_RUNNER_APP_VERSION}
8+
69
RUN curl -sSL https://sdk.cloud.google.com | bash
710
ENV PATH $PATH:/root/google-cloud-sdk/bin
811

0 commit comments

Comments
 (0)