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

Cg docker integration #1

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
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
38 changes: 38 additions & 0 deletions .github/workflows/merge_main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: 'Merge-main-CI'
on:
push:
branches:
- 'main'

jobs:
docker-image-push:
runs-on: ubuntu-latest
name: Create staging image
steps:
- name: Check out git repository
uses: actions/checkout@v2

- name: Extract branch name and remove illegal chars
id: get_branch_name
shell: bash
run: echo "##[set-output name=branch;]$(echo "$(tr "/" "-" <<<${GITHUB_REF#refs/heads/})")"

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1

- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: ./
file: ./Dockerfile
push: true
tags: "clinicalgenomics/scout-reviewer-service-stage:${{steps.get_branch_name.outputs.branch}}, clinicalgenomics/scout-reviewer-service-stage:latest"

63 changes: 63 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---

name: Pull Request Actions

on: [push]

jobs:
lint-only:
name: Lint only
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7]
steps:
- name: Check out git repository
uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version}}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version}}

- name: Black
uses: psf/black@stable
with:
black_args: ". --check --line-length 100"

- name: Run isort
uses: jamescurtin/isort-action@master
with:
configuration: "--check-only --diff -m 3 --tc --fgw 0 --up -n -l 100"

docker-image-push:
runs-on: ubuntu-latest
name: Create staging docker image
steps:
- name: Check out git repository
uses: actions/checkout@v2

- name: Extract branch name and remove illegal chars
id: get_branch_name
shell: bash
run: echo "##[set-output name=branch;]$(echo "$(tr "/" "-" <<<${GITHUB_REF#refs/heads/})")"

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1

- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: ./
file: ./Dockerfile
push: true
tags: "clinicalgenomics/scout-reviewer-service-stage:${{steps.get_branch_name.outputs.branch}}, clinicalgenomics/scout-reviewer-service-stage:latest"

39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---

name: Release Actions
on:
release:
types:
- created

jobs:
docker-image-release:
runs-on: ubuntu-latest
name: Push production docker image to dockerhub
steps:
- name: Check out git repository
uses: actions/checkout@v2

- name: Extract branch name and remove illegal chars
id: get_branch_name
shell: bash
run: echo "##[set-output name=branch;]$(echo "$(tr "/" "-" <<<${GITHUB_REF#refs/heads/})")"

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1

- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: ./
file: ./Dockerfile
push: true
tags: "clinicalgenomics/scout-reviewer-servicea:${{github.event.release.tag_name}}, clinicalgenomics/scout-reviewer-service:latest"
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ RUN set -ex; \
make;

COPY . /Scout-REViewer-service
COPY .env.docker .env
COPY cg.env.docker .env

RUN conda env create -f /Scout-REViewer-service/environment.yml

Expand Down
7 changes: 7 additions & 0 deletions cg.env.docker
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
HOST_DATA=/home/proj/
REV_REF_PATH=/host_data/production/rare-disease/references/references_10.0/grch37_homo_sapiens_-d5-.fasta
REV_CATALOG_PATH=/host_data/production/rare-disease/references/references_10.0/grch37_expansionhunter_variant_catalog_-4.0.2-.json

SRS_PORT=5050

REV_PATH=/REViewer/build/install/bin/REViewer