-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: upgrade FOCA & major app rewrite (#248)
Co-authored-by: Alex Kanitz <alexander.kanitz@alumni.ethz.ch> Co-authored-by: Alex Kanitz <alexander.kanitz@unibas.ch>
- Loading branch information
1 parent
00b7c46
commit b4958f8
Showing
70 changed files
with
2,541 additions
and
3,302 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: cwl-WES checks | ||
|
||
on: | ||
push: | ||
branches: [dev] | ||
pull_request: | ||
branches: [dev] | ||
|
||
jobs: | ||
lint: | ||
name: Run linting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.7" | ||
- name: Install requirements | ||
run: | | ||
pip install . | ||
pip install -r requirements_dev.txt | ||
- name: Lint with Flake8 | ||
run: flake8 cwl_wes/ setup.py | ||
- name: Lint with Pylint | ||
run: pylint cwl_wes/ setup.py | ||
test: | ||
name: Run tests | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
- name: Deploy app | ||
run: docker-compose up -d --build | ||
- name: Wait for app startup | ||
shell: bash | ||
run: sleep 20 | ||
- name: Run integration tests | ||
shell: bash | ||
run: bash tests/integration_tests.sh | ||
- name: Tear down app | ||
run: docker-compose down | ||
publish: | ||
name: Build and publish app image | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event_name == 'push' }} | ||
needs: [lint, test] | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
- name: Generate tag | ||
run: | | ||
echo "TAG=$(date '+%Y%m%d')" >> $GITHUB_ENV | ||
- name: Build and publish image | ||
id: docker | ||
uses: philips-software/docker-ci-scripts@v5.0.0 | ||
with: | ||
dockerfile: . | ||
image-name: "cwl-wes" | ||
tags: "latest ${{ env.TAG }}" | ||
push-branches: "${{ github.event.repository.default_branch }}" | ||
env: | ||
REGISTRY_USERNAME: ${{ secrets.DOCKERHUB_LOGIN }} | ||
REGISTRY_TOKEN: "${{ secrets.DOCKERHUB_TOKEN }}" | ||
DOCKER_ORGANIZATION: ${{ secrets.DOCKERHUB_ORG }} | ||
GITHUB_ORGANIZATION: ${{ github.repository_owner }} | ||
- name: Verify that image was pushed | ||
run: | | ||
echo "Push indicator: ${{ steps.docker.outputs.push-indicator }}" | ||
echo "# Set to 'true' if image was pushed, empty string otherwise" | ||
test "${{ steps.docker.outputs.push-indicator }}" == "true" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,24 @@ | ||
##### BASE IMAGE ##### | ||
FROM python:3.7-slim-stretch | ||
FROM elixircloud/foca:20221110-py3.7 | ||
|
||
##### METADATA ##### | ||
LABEL base.image="python:3.6-slim-stretch" | ||
LABEL version="1.1" | ||
LABEL version="2.0" | ||
LABEL software="cwl-WES" | ||
LABEL software.version="1.0" | ||
LABEL software.description="Flask microservice implementing the Global Alliance for Genomics and Health (GA4GH) Workflow Execution Service (WES) API specification." | ||
LABEL software.description="Trigger CWL workflows via GA4GH WES and TES" | ||
LABEL software.website="https://github.com/elixir-cloud-aai/cwl-WES" | ||
LABEL software.documentation="https://github.com/elixir-cloud-aai/cwl-WES" | ||
LABEL software.license="https://github.com/elixir-cloud-aai/cwl-WES/blob/master/LICENSE" | ||
LABEL software.tags="General" | ||
LABEL maintainer="alexander.kanitz@alumni.ethz.ch" | ||
LABEL maintainer.organisation="Biozentrum, University of Basel" | ||
LABEL maintainer.location="Klingelbergstrasse 50/70, CH-4056 Basel, Switzerland" | ||
LABEL maintainer.lab="ELIXIR Cloud & AAI" | ||
LABEL maintainer.license="https://spdx.org/licenses/Apache-2.0" | ||
LABEL software.license="https://spdx.org/licenses/Apache-2.0" | ||
LABEL maintainer="cloud-service@elixir-europe.org" | ||
LABEL maintainer.organisation="ELIXIR Cloud & AAI" | ||
|
||
# Python UserID workaround for OpenShift/K8S | ||
ENV LOGNAME=ipython | ||
ENV USER=ipython | ||
ENV HOME=/tmp/user | ||
|
||
# Install general dependencies | ||
RUN apt-get update && apt-get install -y nodejs openssl git build-essential python3-dev curl jq | ||
|
||
## Set working directory | ||
WORKDIR /app | ||
|
||
## Copy Python requirements | ||
COPY ./requirements.txt /app/requirements.txt | ||
RUN pip install -r requirements.txt | ||
COPY ./ . | ||
RUN pip install -e . | ||
|
||
## Install Python dependencies | ||
RUN cd /app \ | ||
&& pip install -r requirements.txt \ | ||
&& cd /app/src/cwl-tes \ | ||
&& python setup.py develop \ | ||
&& cd / \ | ||
&& mkdir -p /tmp/user | ||
|
||
## Copy remaining app files | ||
COPY ./ /app | ||
|
||
## Install app & set write permissions for specs directory | ||
RUN cd /app \ | ||
&& python setup.py develop \ | ||
&& cd / \ | ||
&& chmod g+w /app/cwl_wes/api/ \ | ||
&& chmod g+w -R /tmp/user | ||
|
||
## Add permissions for storing updated API specification | ||
## (required by FOCA) | ||
RUN chmod -R a+rwx /app/cwl_wes/api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '0.15.0' | ||
"""cwl-WES package.""" |
Empty file.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.