Skip to content

Commit

Permalink
Merge pull request #439 from kbase/develop
Browse files Browse the repository at this point in the history
D->Main
  • Loading branch information
bio-boris authored Jun 24, 2022
2 parents 9ecb3b3 + 1414ddf commit 9719893
Show file tree
Hide file tree
Showing 19 changed files with 273 additions and 141 deletions.
26 changes: 0 additions & 26 deletions .github/workflows/build_feature_branch.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/build_on_push.yaml

This file was deleted.

3 changes: 1 addition & 2 deletions .github/workflows/ee2-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
name: Execution Engine 2 Test Suite

on:
[push, pull_request]
[pull_request]

jobs:
build:
Expand Down Expand Up @@ -43,4 +43,3 @@ jobs:
cp test/env/test.travis.env test.env
make test-coverage
codecov
11 changes: 11 additions & 0 deletions .github/workflows/manual-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: Manual Build & Push
on:
workflow_dispatch:
jobs:
build-push:
uses: kbase/.github/.github/workflows/reusable_build-push.yml@main
with:
name: '${{ github.event.repository.name }}-develop'
tags: br-${{ github.ref_name }}
secrets: inherit
43 changes: 43 additions & 0 deletions .github/workflows/pr_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: Pull Request Build, Tag, & Push
on:
pull_request:
branches:
- develop
- main
- master
types:
- opened
- reopened
- synchronize
- merged
jobs:
build-develop-open:
if: github.base_ref == 'develop' && github.event.pull_request.merged == false
uses: kbase/.github/.github/workflows/reusable_build.yml@main
secrets: inherit
build-develop-merge:
if: github.base_ref == 'develop' && github.event.pull_request.merged == true
uses: kbase/.github/.github/workflows/reusable_build-push.yml@main
with:
name: '${{ github.event.repository.name }}-develop'
tags: pr-${{ github.event.number }},latest
secrets: inherit
build-main-open:
if: (github.base_ref == 'main' || github.base_ref == 'master') && github.event.pull_request.merged == false
uses: kbase/.github/.github/workflows/reusable_build-push.yml@main
with:
name: '${{ github.event.repository.name }}'
tags: pr-${{ github.event.number }}
secrets: inherit
build-main-merge:
if: (github.base_ref == 'main' || github.base_ref == 'master') && github.event.pull_request.merged == true
uses: kbase/.github/.github/workflows/reusable_build-push.yml@main
with:
name: '${{ github.event.repository.name }}'
tags: pr-${{ github.event.number }},latest-rc
secrets: inherit
trivy-scans:
if: (github.base_ref == 'develop' || github.base_ref == 'main' || github.base_ref == 'master' ) && github.event.pull_request.merged == false
uses: kbase/.github/.github/workflows/reusable_trivy-scans.yml@main
secrets: inherit
25 changes: 25 additions & 0 deletions .github/workflows/prod_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Release - Build & Push Image
on:
release:
branches:
- main
- master
types: [ published ]
jobs:
check-source-branch:
uses: kbase/.github/.github/workflows/reusable_validate-branch.yml@main
with:
build_branch: '${{ github.event.release.target_commitish }}'
validate-release-tag:
needs: check-source-branch
uses: kbase/.github/.github/workflows/reusable_validate-release-tag.yml@main
with:
release_tag: '${{ github.event.release.tag_name }}'
build-push:
needs: validate-release-tag
uses: kbase/.github/.github/workflows/reusable_build-push.yml@main
with:
name: '${{ github.event.repository.name }}'
tags: '${{ github.event.release.tag_name }},latest'
secrets: inherit
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
repos:
- repo: https://github.com/ambv/black
rev: 21.5b0
rev: 22.1.0
hooks:
- id: black
exclude: '.+Impl.py'
- repo: https://gitlab.com/pycqa/flake8
rev: ''
rev: '3.9.2'
hooks:
- id: flake8
32 changes: 17 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM quay.io/kbase/sdkbase2:python
FROM kbase/sdkpython:3.8.0
MAINTAINER KBase Developer

RUN apt-get clean all && apt-get update --fix-missing -y
RUN apt-get clean all && apt-get update --fix-missing -y && apt-get upgrade -y

# -----------------------------------------
# In this section, you can install any system dependencies required
Expand All @@ -11,21 +11,19 @@ RUN apt-get clean all && apt-get update --fix-missing -y
RUN apt-get install -y gcc wget vim htop tmpreaper
RUN mkdir -p /etc/apt/sources.list.d

# Install condor
RUN curl -fsSL https://get.htcondor.org | /bin/bash -s -- --no-dry-run

RUN DEBIAN_FRONTEND=noninteractive wget -qO - https://research.cs.wisc.edu/htcondor/debian/HTCondor-Release.gpg.key | apt-key add - \
&& echo "deb http://research.cs.wisc.edu/htcondor/debian/8.8/stretch stretch contrib" >> /etc/apt/sources.list \
&& echo "deb-src http://research.cs.wisc.edu/htcondor/debian/8.8/stretch stretch contrib" >> /etc/apt/sources.list \
&& apt-get update -y \
&& apt-get install -y condor
# Install jars for testing purposes
# Uncomment this if you want to run tests inside the ee2 container on MacOSX
# RUN cd /opt && git clone https://github.com/kbase/jars && cd -

# install jars
# perhaps we should have test and prod dockerfiles to avoid jars and mongo installs in prod
RUN cd /opt \
&& git clone https://github.com/kbase/jars \
&& cd -

# Remove due to cve-2021-4104 issue in spin (log4j)
RUN rm /opt/jars/lib/jars/dockerjava/docker-java-shaded-3.0.14.jar

# Install DOCKERIZE
RUN curl -o /tmp/dockerize.tgz https://raw.githubusercontent.com/kbase/dockerize/dist/dockerize-linux-amd64-v0.5.0.tar.gz && \
cd /usr/bin && \
tar xvzf /tmp/dockerize.tgz && \
rm /tmp/dockerize.tgz


# install mongodb
Expand Down Expand Up @@ -65,6 +63,10 @@ RUN mkdir -p /kb/module/work && chmod -R a+rw /kb/module && mkdir -p /etc/condor
WORKDIR /kb/module
RUN make all

# Remove Jars and old Conda for Trivy Scans and after compilation is done
RUN rm -rf /sdk && rm -rf /opt
RUN rm -rf /miniconda-latest/pkgs/conda-4.12.0-py39h06a4308_0/info/test/tests/data/env_metadata

WORKDIR /kb/module/scripts
RUN chmod +x download_runner.sh && ./download_runner.sh

Expand Down
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ slackclient = "==2.7.1"
toml = "==0.10.1"
tqdm = "==4.42.1"
typing-extensions = "==3.7.4.3"
ujson = "==1.35"
ujson = "==5.2.0"
urllib3 = "==1.25.8"
uvloop = "==0.12.2"
websockets = "==6.0"
Expand Down
Loading

0 comments on commit 9719893

Please sign in to comment.