-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
129 additions
and
25 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,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 |
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,43 @@ | ||
--- | ||
name: Pull Request Build, Tag, & Push | ||
on: | ||
pull_request: | ||
branches: | ||
- develop | ||
- main | ||
- master | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
- closed | ||
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 |
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,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 |
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,36 +1,54 @@ | ||
FROM ubuntu:20.04 | ||
|
||
# Note that these labels need to be manually updated with the actual contents of the image | ||
LABEL maintainer="[email protected]" | ||
LABEL us.kbase.ubuntu="20.04" | ||
LABEL us.kbase.python="3.8.4" | ||
LABEL us.kbase.sdk="1.0.18" | ||
LABEL us.kbase.python="3.9.12" | ||
LABEL us.kbase.sdk="1.2.1" | ||
LABEL us.kbase.sdkcommit="8def489f648a7ff5657d33ed05f41c60f4766e1b" | ||
|
||
# Fix KBase Catalog Registration Issue | ||
ENV PIP_PROGRESS_BAR=off | ||
|
||
# Install system dependencies | ||
RUN \ | ||
apt-get -y update && \ | ||
apt-get -y upgrade && \ | ||
export DEBIAN_FRONTEND=noninteractive && \ | ||
export TZ=Etc/UTC && \ | ||
apt-get -y install gcc make curl git openjdk-8-jre | ||
apt-get -y install gcc make curl git openjdk-8-jre unzip htop | ||
|
||
# Copy in the SDK | ||
COPY --from=kbase/kb-sdk:20180808 /src /sdk | ||
COPY --from=kbase/kb-sdk:1.2.1 /src /sdk | ||
RUN sed -i 's|/src|/sdk|g' /sdk/bin/* | ||
|
||
|
||
# Install Conda version py39_4.12.0 and Python 3.9.12 | ||
ENV CONDA_VERSION=py39_4.12.0 | ||
ENV CONDA_INSTALL_DIR=/opt/conda/py39_4.12.0 | ||
|
||
RUN \ | ||
V=py38_4.10.3 && \ | ||
curl -o conda.sh -s https://repo.anaconda.com/miniconda/Miniconda3-${V}-Linux-x86_64.sh && \ | ||
sh ./conda.sh -b -p /opt/conda3 && \ | ||
echo "Installing to ${CONDA_INSTALL_DIR}" && \ | ||
curl -o conda.sh -s https://repo.anaconda.com/miniconda/Miniconda3-${CONDA_VERSION}-Linux-x86_64.sh && \ | ||
sh ./conda.sh -b -p ${CONDA_INSTALL_DIR} && \ | ||
rm conda.sh | ||
|
||
ENV PATH=/opt/conda3/bin:$PATH:/sdk/bin | ||
# Add in some legacy modules | ||
|
||
# Install packages including mamba | ||
RUN \ | ||
conda install -c conda-forge mamba | ||
ADD biokbase $CONDA_INSTALL_DIR/lib/biokbase | ||
ADD biokbase/user-env.sh /kb/deployment/user-env.sh | ||
ADD requirements.txt /tmp/requirements.txt | ||
|
||
ADD ./requirements.txt /tmp/ | ||
RUN \ | ||
pip install -r /tmp/requirements.txt | ||
ENV PATH=$CONDA_INSTALL_DIR/bin:/sdk/bin:$PATH | ||
run env | ||
|
||
# Add in some legacy modules | ||
ADD biokbase /opt/conda3/lib/python3.8/site-packages/biokbase | ||
# Configure Conda and Install Mamba | ||
RUN \ | ||
conda config --add channels conda-forge && \ | ||
conda config --set channel_priority strict && \ | ||
conda install -y mamba=0.15.3 | ||
|
||
#Install packages required for base image | ||
RUN \ | ||
which pip && \ | ||
pip install -r /tmp/requirements.txt |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env bash | ||
|
||
# In order to avoid `./scripts/entrypoint.sh: line 3: /kb/deployment/user-env.sh: No such file or directory` | ||
# This file is now here | ||
echo "user-env.sh is ignored" |
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,5 +1,7 @@ | ||
requests | ||
coverage | ||
nose | ||
sphinx | ||
jsonrpcbase | ||
requests==2.27.1 | ||
coverage==6.3.3 | ||
nose==1.3.7 | ||
sphinx==4.5.0 | ||
jsonrpcbase==0.2.0 | ||
pytest==7.1.1 | ||
pytest-cov==3.0.0 |