Skip to content

Commit 9719893

Browse files
authored
Merge pull request #439 from kbase/develop
D->Main
2 parents 9ecb3b3 + 1414ddf commit 9719893

19 files changed

Lines changed: 273 additions & 141 deletions

.github/workflows/build_feature_branch.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/build_on_push.yaml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/ee2-tests.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
name: Execution Engine 2 Test Suite
1212

1313
on:
14-
[push, pull_request]
14+
[pull_request]
1515

1616
jobs:
1717
build:
@@ -43,4 +43,3 @@ jobs:
4343
cp test/env/test.travis.env test.env
4444
make test-coverage
4545
codecov
46-

.github/workflows/manual-build.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
name: Manual Build & Push
3+
on:
4+
workflow_dispatch:
5+
jobs:
6+
build-push:
7+
uses: kbase/.github/.github/workflows/reusable_build-push.yml@main
8+
with:
9+
name: '${{ github.event.repository.name }}-develop'
10+
tags: br-${{ github.ref_name }}
11+
secrets: inherit

.github/workflows/pr_build.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
name: Pull Request Build, Tag, & Push
3+
on:
4+
pull_request:
5+
branches:
6+
- develop
7+
- main
8+
- master
9+
types:
10+
- opened
11+
- reopened
12+
- synchronize
13+
- merged
14+
jobs:
15+
build-develop-open:
16+
if: github.base_ref == 'develop' && github.event.pull_request.merged == false
17+
uses: kbase/.github/.github/workflows/reusable_build.yml@main
18+
secrets: inherit
19+
build-develop-merge:
20+
if: github.base_ref == 'develop' && github.event.pull_request.merged == true
21+
uses: kbase/.github/.github/workflows/reusable_build-push.yml@main
22+
with:
23+
name: '${{ github.event.repository.name }}-develop'
24+
tags: pr-${{ github.event.number }},latest
25+
secrets: inherit
26+
build-main-open:
27+
if: (github.base_ref == 'main' || github.base_ref == 'master') && github.event.pull_request.merged == false
28+
uses: kbase/.github/.github/workflows/reusable_build-push.yml@main
29+
with:
30+
name: '${{ github.event.repository.name }}'
31+
tags: pr-${{ github.event.number }}
32+
secrets: inherit
33+
build-main-merge:
34+
if: (github.base_ref == 'main' || github.base_ref == 'master') && github.event.pull_request.merged == true
35+
uses: kbase/.github/.github/workflows/reusable_build-push.yml@main
36+
with:
37+
name: '${{ github.event.repository.name }}'
38+
tags: pr-${{ github.event.number }},latest-rc
39+
secrets: inherit
40+
trivy-scans:
41+
if: (github.base_ref == 'develop' || github.base_ref == 'main' || github.base_ref == 'master' ) && github.event.pull_request.merged == false
42+
uses: kbase/.github/.github/workflows/reusable_trivy-scans.yml@main
43+
secrets: inherit

.github/workflows/prod_release.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Release - Build & Push Image
3+
on:
4+
release:
5+
branches:
6+
- main
7+
- master
8+
types: [ published ]
9+
jobs:
10+
check-source-branch:
11+
uses: kbase/.github/.github/workflows/reusable_validate-branch.yml@main
12+
with:
13+
build_branch: '${{ github.event.release.target_commitish }}'
14+
validate-release-tag:
15+
needs: check-source-branch
16+
uses: kbase/.github/.github/workflows/reusable_validate-release-tag.yml@main
17+
with:
18+
release_tag: '${{ github.event.release.tag_name }}'
19+
build-push:
20+
needs: validate-release-tag
21+
uses: kbase/.github/.github/workflows/reusable_build-push.yml@main
22+
with:
23+
name: '${{ github.event.repository.name }}'
24+
tags: '${{ github.event.release.tag_name }},latest'
25+
secrets: inherit

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
repos:
22
- repo: https://github.com/ambv/black
3-
rev: 21.5b0
3+
rev: 22.1.0
44
hooks:
55
- id: black
66
exclude: '.+Impl.py'
77
- repo: https://gitlab.com/pycqa/flake8
8-
rev: ''
8+
rev: '3.9.2'
99
hooks:
1010
- id: flake8

Dockerfile

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
FROM quay.io/kbase/sdkbase2:python
1+
FROM kbase/sdkpython:3.8.0
22
MAINTAINER KBase Developer
33

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

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

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

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

21-
# install jars
22-
# perhaps we should have test and prod dockerfiles to avoid jars and mongo installs in prod
23-
RUN cd /opt \
24-
&& git clone https://github.com/kbase/jars \
25-
&& cd -
26-
27-
# Remove due to cve-2021-4104 issue in spin (log4j)
28-
RUN rm /opt/jars/lib/jars/dockerjava/docker-java-shaded-3.0.14.jar
21+
22+
# Install DOCKERIZE
23+
RUN curl -o /tmp/dockerize.tgz https://raw.githubusercontent.com/kbase/dockerize/dist/dockerize-linux-amd64-v0.5.0.tar.gz && \
24+
cd /usr/bin && \
25+
tar xvzf /tmp/dockerize.tgz && \
26+
rm /tmp/dockerize.tgz
2927

3028

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

66+
# Remove Jars and old Conda for Trivy Scans and after compilation is done
67+
RUN rm -rf /sdk && rm -rf /opt
68+
RUN rm -rf /miniconda-latest/pkgs/conda-4.12.0-py39h06a4308_0/info/test/tests/data/env_metadata
69+
6870
WORKDIR /kb/module/scripts
6971
RUN chmod +x download_runner.sh && ./download_runner.sh
7072

Pipfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ slackclient = "==2.7.1"
6464
toml = "==0.10.1"
6565
tqdm = "==4.42.1"
6666
typing-extensions = "==3.7.4.3"
67-
ujson = "==1.35"
67+
ujson = "==5.2.0"
6868
urllib3 = "==1.25.8"
6969
uvloop = "==0.12.2"
7070
websockets = "==6.0"

0 commit comments

Comments
 (0)