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

Dev sync main #108

Merged
merged 36 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
ebd0e59
Update _version.py (#86)
YaphetKG Oct 5, 2023
b66eb64
Update _version.py
YaphetKG Oct 5, 2023
e7e5f7c
Rti merge (#84)
YaphetKG Oct 31, 2023
96c75df
Merge branch 'main' into develop
YaphetKG Oct 31, 2023
fee790d
adding v5.0
YaphetKG Nov 1, 2023
e15a373
cde-links branch
YaphetKG Nov 6, 2023
6aac2fd
pin linkml
YaphetKG Nov 6, 2023
487b2c1
Update config.yaml
YaphetKG Nov 7, 2023
bb61ab9
pop total items before result
YaphetKG Nov 8, 2023
48650b8
print extracted elements
YaphetKG Nov 8, 2023
1413e92
Merge pull request #92 from helxplatform/robokop-v5.0
HowardLander Nov 29, 2023
3cfe3f5
Update requirements.txt
YaphetKG Dec 21, 2023
21889ed
Keep edge provenance (#94)
YaphetKG Jan 4, 2024
85cbead
Merge branch 'main' into develop
YaphetKG Feb 19, 2024
2eb136a
Pipeline parameterize restructure (#95)
YaphetKG Apr 18, 2024
2aee7f3
Merge branch 'main' into develop
YaphetKG Apr 18, 2024
f671194
pin avalon
YaphetKG Apr 18, 2024
473816a
deleted jenkins and added workflows
pchachicho Jun 6, 2024
98257d9
unlinked helx-actions
pchachicho Jun 7, 2024
d7b1f7e
testing paths
pchachicho Jun 11, 2024
b0d8c92
testing again
pchachicho Jun 11, 2024
9bee088
d
pchachicho Jun 11, 2024
2b44c22
tests
pchachicho Jun 11, 2024
7a8cc6d
commented out pytest
pchachicho Jun 13, 2024
94253c9
try again for bandit
pchachicho Jun 13, 2024
7f37f91
commented out bandit
pchachicho Jun 13, 2024
e696854
changed dag to dags
pchachicho Jun 14, 2024
b909274
Added fixes
pchachicho Jun 21, 2024
44ea4df
Merge pull request #101 from helxplatform/gh_actions
pchachicho Jun 21, 2024
4532bda
Bagel (#103)
YaphetKG Aug 7, 2024
af41d8f
Dbgap programs (#104)
YaphetKG Aug 7, 2024
99a6e7b
adding bagel config parse to bool
YaphetKG Sep 19, 2024
a5fce45
Merge branch 'main' into dev-sync-main
YaphetKG Sep 19, 2024
77c21d4
remove jenkins file
YaphetKG Sep 19, 2024
db96446
bump apache version
YaphetKG Sep 19, 2024
02a071b
revert airflow version
YaphetKG Sep 19, 2024
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
86 changes: 86 additions & 0 deletions .github/workflows/build-push-dev-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Workflow responsible for the
# development release processes.
#
name: Build-Push-Dev-Image
on:
push:
branches:
- develop
paths-ignore:
- README.md
- .old_cicd/*
- .github/*
- .github/workflows/*
- LICENSE
- .gitignore
- .dockerignore
- .githooks
# Do not build another image on a pull request.
# Any push to develop will trigger a new build however.
pull_request:
branches-ignore:
- '*'

jobs:
build-push-dev-image:
runs-on: ubuntu-latest
steps:

- name: Checkout Code
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
# fetch-depth: 0 means, get all branches and commits
fetch-depth: 0

- name: Set short git commit SHA
id: vars
run: |
echo "short_sha=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_OUTPUT
# https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

- name: Confirm git commit SHA output
run: echo ${{ steps.vars.outputs.short_sha }}

# Docker Buildx is important to caching in the Build And Push Container
# step
# https://github.com/marketplace/actions/build-and-push-docker-images

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: |
network=host

- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
logout: true

- name: Login to Container Registry
uses: docker/login-action@v3
with:
registry: containers.renci.org
username: ${{ secrets.CONTAINERHUB_USERNAME }}
password: ${{ secrets.CONTAINERHUB_TOKEN }}
logout: true


# Notes on Cache:
# https://docs.docker.com/build/ci/github-actions/examples/#inline-cache
- name: Build Push Container
uses: docker/build-push-action@v5
with:
context: .
push: true
# Push to renci-registry and dockerhub here.
# cache comes from dockerhub.
tags: |
${{ github.repository }}:develop
${{ github.repository }}:${{ steps.vars.outputs.short_sha }}
containers.renci.org/${{ github.repository }}:develop
containers.renci.org/${{ github.repository }}:${{ steps.vars.outputs.short_sha }}
cache-from: type=registry,ref=${{ github.repository }}:buildcache-dev
cache-to: type=registry,ref=${{ github.repository }}:buildcache-dev,mode=max
131 changes: 131 additions & 0 deletions .github/workflows/build-push-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# Workflow responsible for the
# major release processes.
#

name: Build-Push-Release
on:
push:
branches:
- master
- main
paths-ignore:
- README.md
- .old_cicd/*
- .github/*
- .github/workflows/*
- LICENSE
- .gitignore
- .dockerignore
- .githooks
tags-ignore:
- '*'
jobs:
build-push-release:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
fetch-depth: 0

- name: Set short git commit SHA
id: vars
run: |
echo "short_sha=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_OUTPUT
# https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

- name: Confirm git commit SHA output
run: echo ${{ steps.vars.outputs.short_sha }}

# https://github.com/marketplace/actions/git-semantic-version
- name: Semver Check
uses: paulhatch/semantic-version@v5.0.3
id: version
with:
# The prefix to use to identify tags
tag_prefix: "v"
# A string which, if present in a git commit, indicates that a change represents a
# major (breaking) change, supports regular expressions wrapped with '/'
major_pattern: "/breaking:|major:/"
# A string which indicates the flags used by the `major_pattern` regular expression. Supported flags: idgs
major_regexp_flags: "ig"
# Same as above except indicating a minor change, supports regular expressions wrapped with '/'
minor_pattern: "/feat:|feature:|minor:/"
# A string which indicates the flags used by the `minor_pattern` regular expression. Supported flags: idgs
minor_regexp_flags: "ig"
# A string to determine the format of the version output
# version_format: "${major}.${minor}.${patch}-prerelease${increment}"
version_format: "${major}.${minor}.${patch}"
search_commit_body: false

# Docker Buildx is important to caching in the Build And Push Container
# step
# https://github.com/marketplace/actions/build-and-push-docker-images
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: |
network=host

- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
logout: true

- name: Login to Container Registry
uses: docker/login-action@v3
with:
registry: containers.renci.org
username: ${{ secrets.CONTAINERHUB_USERNAME }}
password: ${{ secrets.CONTAINERHUB_TOKEN }}
logout: true

# Notes on Cache:
# https://docs.docker.com/build/ci/github-actions/examples/#inline-cache
- name: Build Push Container
uses: docker/build-push-action@v5
with:
push: true
# Push to renci-registry and dockerhub here.
# cache comes from dockerhub.
tags: |
containers.renci.org/${{ github.repository }}:v${{ steps.version.outputs.version }}
containers.renci.org/${{ github.repository }}:latest
containers.renci.org/${{ github.repository }}:${{ steps.vars.outputs.short_sha }}
${{ github.repository }}:v${{ steps.version.outputs.version }}
${{ github.repository }}:latest
${{ github.repository }}:${{ steps.vars.outputs.short_sha }}
cache-from: type=registry,ref=${{ github.repository }}:buildcache-release
cache-to: type=registry,ref=${{ github.repository }}:buildcache-release,mode=max

#==========================TAG & RELEASE W/ NOTES =========================

# Note: GITHUB_TOKEN is autogenerated feature of github app
# which is auto-enabled when using github actions.
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication
# https://docs.github.com/en/rest/git/tags?apiVersion=2022-11-28#create-a-tag-object
# https://docs.github.com/en/rest/git/refs?apiVersion=2022-11-28#create-a-reference
# This creates a "lightweight" ref tag.
- name: Create Tag for Release
run: |
curl \
-s --fail -X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${{ github.repository }}/git/refs \
-d '{"ref":"refs/tags/v${{ steps.version.outputs.version }}","sha":"${{ github.sha }}"}'

# https://cli.github.com/manual/gh_release_create
- name: Create Release
env:
RELEASE_VERSION: ${{ steps.version.outputs.version }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create ${{ env.RELEASE_VERSION }} \
-t "${{ env.RELEASE_VERSION }}" \
--generate-notes \
--latest
129 changes: 129 additions & 0 deletions .github/workflows/code-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# Workflow responsible for core acceptance testing.
# Tests Currently Run:
# - flake8-linter
# - PYTest
# - Bandit
# For PR Vulnerability Scanning a separate workflow will run.
# The build-push-dev-image and build-push-release workflows
# handle the develop and release image storage respectively.
#
#

name: Code-Checks
on:
push:
branches-ignore:
- master
- main
- develop
pull_request:
branches:
- develop
- master
- main
types: [opened, synchronize]
paths-ignore:
- README.md
- .old_cicd/*
- .github/*
- .github/workflows/*
- LICENSE
- .gitignore
- .dockerignore
- .githooks

jobs:
############################## flake8-linter ##############################
flake8-linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"

# Currently actions/setup-python supports caching
# but the cache is not as robust as cache action.
# Here we cache the entire python env which speeds subsequent builds up alot. (alot being scientific term)
# Ref: https://blog.allenai.org/python-caching-in-github-actions-e9452698e98d
- uses: actions/cache@v3
name: Cache Python
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('pyproject.toml') }}

- name: Install Requirements
run: |
pip install -r requirements.txt

- name: Lint with flake8
run: |
pip install flake8
flake8 --ignore=E,W dags
# We continue on error here until the code is clean
# flake8 --ignore=E,W --exit-zero .
continue-on-error: true

################################### PYTEST ###################################
# pytest:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: Set up Python
# uses: actions/setup-python@v4
# with:
# python-version: '3.12'

# - name: Install Requirements
# run: |
# pip install -r requirements.txt
# pip install coverage
# pip install ./tests

# - name: Test with pytest
# run: |
# make test
############################## test-image-build ##############################
test-image-build:
runs-on: ubuntu-latest
# if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- uses: actions/checkout@v3

- name: Set short git commit SHA
id: vars
run: |
echo "short_sha=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_OUTPUT
# https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
- name: Confirm git commit SHA output
run: echo ${{ steps.vars.outputs.short_sha }}

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

- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
logout: true

- name: Parse Github Reference Name
id: branch
run: |
REF=${{ github.ref_name }}
echo "GHR=${REF%/*}" >> $GITHUB_OUTPUT

# Notes on Cache:
# https://docs.docker.com/build/ci/github-actions/examples/#inline-cache
- name: Build Container
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
${{ github.repository }}:test_${{ steps.branch.outputs.GHR }}
cache-from: type=registry,ref=${{ github.repository }}:buildcache
cache-to: type=registry,ref=${{ github.repository }}:buildcache,mode=max
Loading
Loading